diff options
author | Eric Dumazet <edumazet@google.com> | 2022-06-30 17:07:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-07-02 17:22:25 +0200 |
commit | 504148fedb854299972d164b001357b888a9193e (patch) | |
tree | 6039f99c8ba79b59026808ea7d9de215d1c59903 /drivers/net/ethernet/intel/ixgb | |
parent | qlogic/qed: fix repeated words in comments (diff) | |
download | linux-504148fedb854299972d164b001357b888a9193e.tar.xz linux-504148fedb854299972d164b001357b888a9193e.zip |
net: add skb_[inner_]tcp_all_headers helpers
Most drivers use "skb_transport_offset(skb) + tcp_hdrlen(skb)"
to compute headers length for a TCP packet, but others
use more convoluted (but equivalent) ways.
Add skb_tcp_all_headers() and skb_inner_tcp_all_headers()
helpers to harmonize this a bit.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgb')
-rw-r--r-- | drivers/net/ethernet/intel/ixgb/ixgb_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c index bca53625da33..45be9a1ab6af 100644 --- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c +++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c @@ -1187,7 +1187,7 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb) if (err < 0) return err; - hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); + hdr_len = skb_tcp_all_headers(skb); mss = skb_shinfo(skb)->gso_size; iph = ip_hdr(skb); iph->tot_len = 0; |