[7/7] net/mlx5e: Trust kernel regarding transport offset
diff mbox series

Message ID 20190114131841.1932-8-maximmi@mellanox.com
State Changes Requested
Delegated to: David Miller
Headers show
  • AF_PACKET transport_offset fix
Related show

Commit Message

Maxim Mikityanskiy Jan. 14, 2019, 1:19 p.m. UTC
After AF_PACKET is fixed to calculate the transport header offset
correctly, trust the value set by the kernel. If the offset wasn't set,
it means there is no transport header in the packet.

Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 4 ----
 1 file changed, 4 deletions(-)

diff mbox series

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
index 563fdb1dd15e..119bbbbe4ad0 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
@@ -148,12 +148,8 @@  static inline int mlx5e_skb_l2_header_offset(struct sk_buff *skb)
 static inline int mlx5e_skb_l3_header_offset(struct sk_buff *skb)
-	struct flow_keys keys;
 	if (skb_transport_header_was_set(skb))
 		return skb_transport_offset(skb);
-	else if (skb_flow_dissect_flow_keys(skb, &keys, 0))
-		return keys.control.thoff;
 		return mlx5e_skb_l2_header_offset(skb);