Commit 3517dfe6 authored by Maxim Mikityanskiy's avatar Maxim Mikityanskiy Committed by David S. Miller

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: default avatarMaxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6437866e
...@@ -172,15 +172,8 @@ static inline u16 mlx5e_calc_min_inline(enum mlx5_inline_modes mode, ...@@ -172,15 +172,8 @@ static inline u16 mlx5e_calc_min_inline(enum mlx5_inline_modes mode,
hlen += VLAN_HLEN; hlen += VLAN_HLEN;
break; break;
case MLX5_INLINE_MODE_IP: case MLX5_INLINE_MODE_IP:
/* When transport header is set to zero, it means no transport hlen = mlx5e_skb_l3_header_offset(skb);
* header. When transport header is set to 0xff's, it means break;
* transport header wasn't set.
*/
if (skb_transport_offset(skb)) {
hlen = mlx5e_skb_l3_header_offset(skb);
break;
}
/* fall through */
case MLX5_INLINE_MODE_L2: case MLX5_INLINE_MODE_L2:
default: default:
hlen = mlx5e_skb_l2_header_offset(skb); hlen = mlx5e_skb_l2_header_offset(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment