Skip to content

Commit 2c804d0

Browse files
edumazetdavem330
authored andcommitted
ipv4: mentions skb_gro_postpull_rcsum() in inet_gro_receive()
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>
1 parent eb51bba commit 2c804d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/ipv4/af_inet.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,9 @@ static struct sk_buff **inet_gro_receive(struct sk_buff **head,
13691369
* immediately following this IP hdr.
13701370
*/
13711371

1372+
/* Note : No need to call skb_gro_postpull_rcsum() here,
1373+
* as we already checked checksum over ipv4 header was 0
1374+
*/
13721375
skb_gro_pull(skb, sizeof(*iph));
13731376
skb_set_transport_header(skb, skb_gro_offset(skb));
13741377

0 commit comments

Comments
 (0)