Skip to content

Commit 66fefca

Browse files
jialiu02gregkh
authored andcommitted
net/mlx5e: Allow offloading ipv4 header re-write for icmp
[ Upstream commit 1ccef35 ] For ICMPv4, the checksum is calculated from the ICMP headers and data. Since the ICMPv4 checksum doesn't cover the IP header, we can allow to do L3 header re-write for this protocol. Fixes: bdd66ac ('net/mlx5e: Disallow TC offloading of unsupported match/action combinations') Signed-off-by: Jianbo Liu <[email protected]> Reviewed-by: Or Gerlitz <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent cb9e5a0 commit 66fefca

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+2
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,8 @@ static bool modify_header_match_supported(struct mlx5_flow_spec *spec,
13871387
}
13881388

13891389
ip_proto = MLX5_GET(fte_match_set_lyr_2_4, headers_v, ip_protocol);
1390-
if (modify_ip_header && ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) {
1390+
if (modify_ip_header && ip_proto != IPPROTO_TCP &&
1391+
ip_proto != IPPROTO_UDP && ip_proto != IPPROTO_ICMP) {
13911392
pr_info("can't offload re-write of ip proto %d\n", ip_proto);
13921393
return false;
13931394
}

0 commit comments

Comments
 (0)