summaryrefslogtreecommitdiff
path: root/include/net/lwtunnel.h
diff options
context:
space:
mode:
authorSean Tranchetti <stranche@codeaurora.org>2019-05-28 12:22:54 -0600
committerDavid S. Miller <davem@davemloft.net>2019-05-30 11:10:39 -0700
commitf2696099c6c619aec4fe2b9691f0a81429957e65 (patch)
tree2fa99b8df392eab2bcc926e095f6b71998a49b3f /include/net/lwtunnel.h
parent58e8b37069ff2609c4c972c2f127a73a0855c6aa (diff)
udp: Avoid post-GRO UDP checksum recalculation
Currently, when resegmenting an unexpected UDP GRO packet, the full UDP checksum will be calculated for every new SKB created by skb_segment() because the netdev features passed in by udp_rcv_segment() lack any information about checksum offload capabilities. Usually, we have no need to perform this calculation again, as 1) The GRO implementation guarantees that any packets making it to the udp_rcv_segment() function had correct checksums, and, more importantly, 2) Upon the successful return of udp_rcv_segment(), we immediately pull the UDP header off and either queue the segment to the socket or hand it off to a new protocol handler. Unless userspace has set the IP_CHECKSUM sockopt to indicate that they want the final checksum values, we can pass the needed netdev feature flags to __skb_gso_segment() to avoid checksumming each segment in skb_segment(). Fixes: cf329aa42b66 ("udp: cope with UDP GRO packet misdirection") Cc: Paolo Abeni <pabeni@redhat.com> Cc: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Signed-off-by: Sean Tranchetti <stranche@codeaurora.org> Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/lwtunnel.h')
0 files changed, 0 insertions, 0 deletions