Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 868c86bc authored by Al Viro's avatar Al Viro Committed by David S. Miller
Browse files

[NET]: annotate csum_ipv6_magic() callers in net/*

parent 2bda2853
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -89,9 +89,9 @@ static __inline__ int udp_lib_checksum_complete(struct sk_buff *skb)
 * 	@skb: 	sk_buff containing the filled-in UDP header
 * 	        (checksum field must be zeroed out)
 */
static inline u32 udp_csum_outgoing(struct sock *sk, struct sk_buff *skb)
static inline __wsum udp_csum_outgoing(struct sock *sk, struct sk_buff *skb)
{
	u32 csum = csum_partial(skb->h.raw, sizeof(struct udphdr), 0);
	__wsum csum = csum_partial(skb->h.raw, sizeof(struct udphdr), 0);

	skb_queue_walk(&sk->sk_write_queue, skb) {
		csum = csum_add(csum, skb->csum);
+2 −2
Original line number Diff line number Diff line
@@ -124,10 +124,10 @@ static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh)
	return cscov;
}

static inline u32 udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
{
	u32 csum = 0;
	int off, len, cscov = udplite_sender_cscov(udp_sk(sk), skb->h.uh);
	__wsum csum = 0;

	skb->ip_summed = CHECKSUM_NONE;     /* no HW support for checksumming */

+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ static void dccp_v6_hash(struct sock *sk)
}

/* add pseudo-header to DCCP checksum stored in skb->csum */
static inline u16 dccp_v6_csum_finish(struct sk_buff *skb,
static inline __sum16 dccp_v6_csum_finish(struct sk_buff *skb,
				      struct in6_addr *saddr,
				      struct in6_addr *daddr)
{
+7 −7
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct
						      len, fl->proto,
						      skb->csum);
	} else {
		u32 tmp_csum = 0;
		__wsum tmp_csum = 0;

		skb_queue_walk(&sk->sk_write_queue, skb) {
			tmp_csum = csum_add(tmp_csum, skb->csum);
@@ -242,10 +242,10 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct

		tmp_csum = csum_partial((char *)icmp6h,
					sizeof(struct icmp6hdr), tmp_csum);
		tmp_csum = csum_ipv6_magic(&fl->fl6_src,
		icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src,
						      &fl->fl6_dst,
					   len, fl->proto, tmp_csum);
		icmp6h->icmp6_cksum = tmp_csum;
						      len, fl->proto,
						      tmp_csum);
	}
	ip6_push_pending_frames(sk);
out:
@@ -636,8 +636,8 @@ static int icmpv6_rcv(struct sk_buff **pskb)
			break;
		/* fall through */
	case CHECKSUM_NONE:
		skb->csum = ~csum_ipv6_magic(saddr, daddr, skb->len,
					     IPPROTO_ICMPV6, 0);
		skb->csum = ~csum_unfold(csum_ipv6_magic(saddr, daddr, skb->len,
					     IPPROTO_ICMPV6, 0));
		if (__skb_checksum_complete(skb)) {
			LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [" NIP6_FMT " > " NIP6_FMT "]\n",
				       NIP6(*saddr), NIP6(*daddr));
+2 −2
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ struct mld2_grec {
struct mld2_report {
	__u8	type;
	__u8	resv1;
	__u16	csum;
	__sum16	csum;
	__be16	resv2;
	__be16	ngrec;
	struct mld2_grec grec[0];
@@ -100,7 +100,7 @@ struct mld2_report {
struct mld2_query {
	__u8 type;
	__u8 code;
	__u16 csum;
	__sum16 csum;
	__be16 mrc;
	__be16 resv1;
	struct in6_addr mca;
Loading