summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/iavf/iavf_main.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-02-29 09:39:08 +0000
committerDavid S. Miller <davem@davemloft.net>2024-03-04 08:47:06 +0000
commitcc15bd10e716fcb472d611f24d76c795acb0f8c7 (patch)
treeee624de454e831304d471110cf6f8aef0d3b0fb7 /drivers/net/ethernet/intel/iavf/iavf_main.c
parent80bfab79b8351c8d858e6928a091b57c103dce29 (diff)
net: adopt skb_network_header_len() more broadly
(skb_transport_header(skb) - skb_network_header(skb)) can be replaced by skb_network_header_len(skb) Add a DEBUG_NET_WARN_ON_ONCE() in skb_network_header_len() to catch cases were the transport_header was not set. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/iavf/iavf_main.c')
-rw-r--r--drivers/net/ethernet/intel/iavf/iavf_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 245c458e38ae..aefec6bd3b67 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -4428,7 +4428,7 @@ static netdev_features_t iavf_features_check(struct sk_buff *skb,
goto out_err;
/* IPLEN and EIPLEN can support at most 127 dwords */
- len = skb_transport_header(skb) - skb_network_header(skb);
+ len = skb_network_header_len(skb);
if (len & ~(127 * 4))
goto out_err;