From: Shiri Kuzin Date: Tue, 18 Feb 2020 11:52:54 +0000 (+0200) Subject: net/mlx5: fix ICMPv6 header rewrite action validation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e649994972cda23fc777f45f7b40c528313543ed;p=dpdk.git net/mlx5: fix ICMPv6 header rewrite action validation ICMPv6 header contains the checksum field, that includes the IP addresses from IP header. The ConnectX-5 hardware does not support ICMPv6 checksum calculation and in case of IP header modification the checksum will contain the wrong value. The patch rejects the header modification actions related to IP addresses if ICMPv6 protocol is detected in pattern. This issue was also partly fixed in commit below which rejects flows with the pattern "ipv6 proto is 58". Fixes: 0e2ceb639d8a ("net/mlx5: fix ICMPv6 header rewrite actions") Cc: stable@dpdk.org Signed-off-by: Shiri Kuzin Acked-by: Viacheslav Ovsiienko Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 341d51152a..1c01269117 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -4621,6 +4621,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, error); if (ret < 0) return ret; + item_ipv6_proto = IPPROTO_ICMPV6; last_item = MLX5_FLOW_LAYER_ICMP6; break; case RTE_FLOW_ITEM_TYPE_TAG: