summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-09-13 07:58:56 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-19 22:43:47 +0200
commit6bf32cda46ebfbaf13da3c48a0a009adae925703 (patch)
tree2196c2e84c41d663d19b7f2a29a41c4683ed45b0 /net/ipv4
parent5123ffdad65954b3c308e055b388db08987a13ff (diff)
net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends
After working on IP defragmentation lately, I found that some large packets defeat CHECKSUM_COMPLETE optimization because of NIC adding zero paddings on the last (small) fragment. While removing the padding with pskb_trim_rcsum(), we set skb->ip_summed to CHECKSUM_NONE, forcing a full csum validation, even if all prior fragments had CHECKSUM_COMPLETE set. We can instead compute the checksum of the part we are trimming, usually smaller than the part we keep. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 88078d98d1bb085d72af8437707279e203524fa5) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4')
0 files changed, 0 insertions, 0 deletions