summaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorDavide Caratti <dcaratti@redhat.com>2017-05-18 15:44:41 +0200
committerDavid S. Miller <davem@davemloft.net>2017-05-19 19:21:29 -0400
commit43c26a1a45938624fb9301e8bf7dfabbed293619 (patch)
tree3989a9aa42c468ea4121b3c7886eb7e64e561420 /include/linux/netdevice.h
parentdba003067a43a9699bef0c4bdbe320ece5a109b8 (diff)
downloadop-kernel-dev-43c26a1a45938624fb9301e8bf7dfabbed293619.zip
op-kernel-dev-43c26a1a45938624fb9301e8bf7dfabbed293619.tar.gz
net: more accurate checksumming in validate_xmit_skb()
skb_csum_hwoffload_help() uses netdev features and skb->csum_not_inet to determine if skb needs software computation of Internet Checksum or crc32c (or nothing, if this computation can be done by the hardware). Use it in place of skb_checksum_help() in validate_xmit_skb() to avoid corruption of non-GSO SCTP packets having skb->ip_summed equal to CHECKSUM_PARTIAL. While at it, remove references to skb_csum_off_chk* functions, since they are not present anymore in Linux _ see commit cf53b1da73bd ("Revert "net: Add driver helper functions to determine checksum offloadability""). Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c1611ac..f8f7cd5 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3930,6 +3930,9 @@ void netdev_rss_key_fill(void *buffer, size_t len);
int dev_get_nest_level(struct net_device *dev);
int skb_checksum_help(struct sk_buff *skb);
int skb_crc32c_csum_help(struct sk_buff *skb);
+int skb_csum_hwoffload_help(struct sk_buff *skb,
+ const netdev_features_t features);
+
struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
netdev_features_t features, bool tx_path);
struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb,
OpenPOWER on IntegriCloud