ipv4: mentions skb_gro_postpull_rcsum() in inet_gro_receive()
authorEric Dumazet <edumazet@google.com>
Wed, 1 Oct 2014 05:12:05 +0000 (22:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Oct 2014 17:44:05 +0000 (13:44 -0400)
Proper CHECKSUM_COMPLETE support needs to adjust skb->csum
when we remove one header. Its done using skb_gro_postpull_rcsum()

In the case of IPv4, we know that the adjustment is not really needed,
because the checksum over IPv4 header is 0. Lets add a comment to
ease code comprehension and avoid copy/paste errors.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/af_inet.c

index 28e589c5f32dd4c4e84f764dbb2f178134aa88bf..92db7a69f2b9d106d7d235388719d3a476eb91d5 100644 (file)
@@ -1369,6 +1369,9 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head,
         * immediately following this IP hdr.
         */
 
+       /* Note : No need to call skb_gro_postpull_rcsum() here,
+        * as we already checked checksum over ipv4 header was 0
+        */
        skb_gro_pull(skb, sizeof(*iph));
        skb_set_transport_header(skb, skb_gro_offset(skb));