net/mlx5e: Fix wrong use of skb_tcp_all_headers() with encapsulation
authorGal Pressman <gal@nvidia.com>
Sun, 17 Jul 2022 11:04:29 +0000 (14:04 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 28 Jul 2022 20:55:25 +0000 (13:55 -0700)
Use skb_inner_tcp_all_headers() instead of skb_tcp_all_headers() when
transmitting an encapsulated packet in mlx5e_tx_get_gso_ihs().

Fixes: 504148fedb85 ("net: add skb_[inner_]tcp_all_headers helpers")
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c

index dc1e01e..27f791f 100644 (file)
@@ -152,7 +152,7 @@ mlx5e_tx_get_gso_ihs(struct mlx5e_txqsq *sq, struct sk_buff *skb, int *hopbyhop)
 
        *hopbyhop = 0;
        if (skb->encapsulation) {
-               ihs = skb_tcp_all_headers(skb);
+               ihs = skb_inner_tcp_all_headers(skb);
                stats->tso_inner_packets++;
                stats->tso_inner_bytes += skb->len - ihs;
        } else {