diff options
author | Maxim Mikityanskiy <maximmi@mellanox.com> | 2019-02-21 15:40:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-22 23:55:32 +0300 |
commit | 3517dfe6f23608951044cbfc833fa108603441fa (patch) | |
tree | fb2f6a96371dba4b8d0cf9aac18571d8a9447be4 /drivers/net/ethernet | |
parent | 6437866e493fa5aa5be03dfb94e1d686a7fc984b (diff) | |
download | linux-3517dfe6f23608951044cbfc833fa108603441fa.tar.xz |
net/mlx5e: Remove the wrong assumption about transport offset
skb_transport_offset() == 0 is not a special value. The only special
value is when skb->transport_header is ~0U, and it's checked by
skb_transport_header_was_set().
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c index c1334a8ac8f3..6ca834702306 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c @@ -172,15 +172,8 @@ static inline u16 mlx5e_calc_min_inline(enum mlx5_inline_modes mode, hlen += VLAN_HLEN; break; case MLX5_INLINE_MODE_IP: - /* When transport header is set to zero, it means no transport - * header. When transport header is set to 0xff's, it means - * transport header wasn't set. - */ - if (skb_transport_offset(skb)) { - hlen = mlx5e_skb_l3_header_offset(skb); - break; - } - /* fall through */ + hlen = mlx5e_skb_l3_header_offset(skb); + break; case MLX5_INLINE_MODE_L2: default: hlen = mlx5e_skb_l2_header_offset(skb); |