From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9E757A051C for ; Tue, 11 Feb 2020 12:40:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8FF3B1BFED; Tue, 11 Feb 2020 12:40:58 +0100 (CET) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by dpdk.org (Postfix) with ESMTP id 2C80B1BFED for ; Tue, 11 Feb 2020 12:40:57 +0100 (CET) Received: by mail-wr1-f44.google.com with SMTP id k11so11919735wrd.9 for ; Tue, 11 Feb 2020 03:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=duQbfLAwnrE0dpxW2HfQpDM4A6PjkumJX7wLf20CQ6Q=; b=aBhGI4M21EQqtg59pI3lxf2LxPtY1nyYhF8Xkd5/LyFoZ1ni3OHQt2vgvpcdUOohHW JK/5uuXr6Dgjgxp7/ZVc/nt/3zE2zBW0rqsaRuxPphjNRCC8q62M/88gfaN0RJgrjQQ6 1Cufh2I7ARfTGxWavJU0GR7z4FPgjcn8fgHINTd36qVdR/YGAd3wIzEvi+kGLCzJlwUE e6O6Jr47UoHT4EVdmR1ChX67+Zz7KRQWOwYTW3to8uQDX1kXoi1GO8lTDcG2PZbEsnn7 kd2elQjf9SyjRsxo9I/sshbDeblRJL8gp/8lMetQGhGfIjYtO+4cfyWyD3ttPdOo5OoS tMGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=duQbfLAwnrE0dpxW2HfQpDM4A6PjkumJX7wLf20CQ6Q=; b=VNrkGd1FBCiN+owrDQTtbvuEBLvTMyoyNHVBp/DBllHjulY5ju3FqCZQrdd/ueV8SE U9toj5YBg0KE7f2buEdOOG/Mj8IcFdl8AciJmGrQsAJLdqAR40NhZm8e0weZrDMvWKmF LBMYQeCokuhvloKgGu/zeZs4YG3jU/Qu/1ycKSgPSb+bG1LDDLOi1jb9xIRfGIbofO2R buZWOOT5lsEpWOja8syey6Vn/aJByXrTqyzsLkt0Usr7zn/WvzmD2yRkxp4RVGHNkCQk jkDypwxSz/0qY7rjjFIWrf2Va86WCV/w6/81MegThpMVp+dUG0kYq1O5Ze9Rs0l4HHB4 M5bA== X-Gm-Message-State: APjAAAXef9+xVxthgNwbw+U4p14xuEjrKrHFvCD5tGOCBg5jXD0HIZZ6 VMraX3FLB+vlUuCwShD1mE0Kd5QrzMY= X-Google-Smtp-Source: APXvYqwND6XWzahO/xngENfTP3ePZbp46WFgKU03MfPYbkZMUDUk+ijh4oslDFi9qJ8NYPNIlgPH0A== X-Received: by 2002:a5d:67c7:: with SMTP id n7mr8029367wrw.319.1581421256792; Tue, 11 Feb 2020 03:40:56 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id y20sm3279658wmi.25.2020.02.11.03.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:40:56 -0800 (PST) From: luca.boccassi@gmail.com To: Shiri Kuzin Cc: Viacheslav Ovsiienko , dpdk stable Date: Tue, 11 Feb 2020 11:21:41 +0000 Message-Id: <20200211112216.3929-155-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix ICMPv6 header rewrite actions' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From f312d00e87545dad43a07beeec6ab4327f61a7c0 Mon Sep 17 00:00:00 2001 From: Shiri Kuzin Date: Wed, 22 Jan 2020 14:37:54 +0000 Subject: [PATCH] net/mlx5: fix ICMPv6 header rewrite actions [ upstream commit 0e2ceb639d8a32b7221d5fd2acba8a3798cb35d0 ] The ConnectX-5 HW cannot calculate the checksum for ICMPv6, therefore flows with pattern 'ipv6 proto is 58' with actions that change the header should be rejected. the actions that change the header in this type of flow are 'set_ipv6_src' and 'set_ipv6_dst'. Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs") Signed-off-by: Shiri Kuzin Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_dv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 6aedb3c0bc..295627fab3 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -4233,6 +4233,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, uint8_t next_protocol = 0xff; uint16_t ether_type = 0; int actions_n = 0; + uint8_t item_ipv6_proto = 0; const struct rte_flow_item *gre_item = NULL; struct rte_flow_item_tcp nic_tcp_mask = { .hdr = { @@ -4340,6 +4341,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, if (items->mask != NULL && ((const struct rte_flow_item_ipv6 *) items->mask)->hdr.proto) { + item_ipv6_proto = + ((const struct rte_flow_item_ipv6 *) + items->spec)->hdr.proto; next_protocol = ((const struct rte_flow_item_ipv6 *) items->spec)->hdr.proto; @@ -4705,6 +4709,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, error); if (ret < 0) return ret; + if (item_ipv6_proto == IPPROTO_ICMPV6) + return rte_flow_error_set(error, ENOTSUP, + RTE_FLOW_ERROR_TYPE_ACTION, + actions, + "Can't change header " + "with ICMPv6 proto"); /* Count all modify-header actions as one action. */ if (!(action_flags & MLX5_FLOW_MODIFY_HDR_ACTIONS)) ++actions_n; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:44.024900802 +0000 +++ 0155-net-mlx5-fix-ICMPv6-header-rewrite-actions.patch 2020-02-11 11:17:38.740007704 +0000 @@ -1,15 +1,16 @@ -From 0e2ceb639d8a32b7221d5fd2acba8a3798cb35d0 Mon Sep 17 00:00:00 2001 +From f312d00e87545dad43a07beeec6ab4327f61a7c0 Mon Sep 17 00:00:00 2001 From: Shiri Kuzin Date: Wed, 22 Jan 2020 14:37:54 +0000 Subject: [PATCH] net/mlx5: fix ICMPv6 header rewrite actions +[ upstream commit 0e2ceb639d8a32b7221d5fd2acba8a3798cb35d0 ] + The ConnectX-5 HW cannot calculate the checksum for ICMPv6, therefore flows with pattern 'ipv6 proto is 58' with actions that change the header should be rejected. the actions that change the header in this type of flow are 'set_ipv6_src' and 'set_ipv6_dst'. Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs") -Cc: stable@dpdk.org Signed-off-by: Shiri Kuzin Acked-by: Viacheslav Ovsiienko @@ -18,10 +19,10 @@ 1 file changed, 10 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c -index c2900c5d0d..6987592e60 100644 +index 6aedb3c0bc..295627fab3 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c -@@ -4402,6 +4402,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, +@@ -4233,6 +4233,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, uint8_t next_protocol = 0xff; uint16_t ether_type = 0; int actions_n = 0; @@ -29,7 +30,7 @@ const struct rte_flow_item *gre_item = NULL; struct rte_flow_item_tcp nic_tcp_mask = { .hdr = { -@@ -4509,6 +4510,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, +@@ -4340,6 +4341,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, if (items->mask != NULL && ((const struct rte_flow_item_ipv6 *) items->mask)->hdr.proto) { @@ -39,7 +40,7 @@ next_protocol = ((const struct rte_flow_item_ipv6 *) items->spec)->hdr.proto; -@@ -4881,6 +4885,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, +@@ -4705,6 +4709,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, error); if (ret < 0) return ret;