Skip to content

Commit 1ccef35

Browse files
jialiu02Saeed Mahameed
authored andcommitted
net/mlx5e: Allow offloading ipv4 header re-write for icmp
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]>
1 parent 25eb0ea commit 1ccef35

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
@@ -1864,7 +1864,8 @@ static bool modify_header_match_supported(struct mlx5_flow_spec *spec,
18641864
}
18651865

18661866
ip_proto = MLX5_GET(fte_match_set_lyr_2_4, headers_v, ip_protocol);
1867-
if (modify_ip_header && ip_proto != IPPROTO_TCP && ip_proto != IPPROTO_UDP) {
1867+
if (modify_ip_header && ip_proto != IPPROTO_TCP &&
1868+
ip_proto != IPPROTO_UDP && ip_proto != IPPROTO_ICMP) {
18681869
pr_info("can't offload re-write of ip proto %d\n", ip_proto);
18691870
return false;
18701871
}

0 commit comments

Comments
 (0)