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 3403FA04F5 for ; Wed, 11 Dec 2019 22:28:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 29CEE1B994; Wed, 11 Dec 2019 22:28:01 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id C9BC51B994 for ; Wed, 11 Dec 2019 22:27:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576099679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=suemGJBkL2lXRM0/DHdAhI/zKT4+NNZLcC+uBrrK7YI=; b=QNOUohOV9JhAHlyvzmmj6VIZn4pwrxsUsxjIjZ9Fqwl1VxhZMCI6JhWlnth4HGtq9SH1RX s2Tq6b0r09yd9+TAEJDtvI3FlXmuYyQkZF7soCF8oOJjWJHC4PrIM6FoBmdzoGQa4zOmxR JP2C1Vaeqx8ye6M5+nDyXhQeiEA3OZQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-78-8CrBrieBP-SvqPqFM_g3hw-1; Wed, 11 Dec 2019 16:27:55 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 15D99801E70; Wed, 11 Dec 2019 21:27:54 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id CABC110013A1; Wed, 11 Dec 2019 21:27:52 +0000 (UTC) From: Kevin Traynor To: Xiaoyu Min Cc: Ori Kam , Viacheslav Ovsiienko , dpdk stable Date: Wed, 11 Dec 2019 21:26:05 +0000 Message-Id: <20191211212702.27851-13-ktraynor@redhat.com> In-Reply-To: <20191211212702.27851-1-ktraynor@redhat.com> References: <20191211212702.27851-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: 8CrBrieBP-SvqPqFM_g3hw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/mlx5: allow pattern start from IP' has been queued to LTS release 18.11.6 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 LTS release 18.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/17/19. 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 rebasi= ng (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/7ee4881da1851b7dce= 7ad9e2cc041f14a9ab7130 Thanks. Kevin. --- >From 7ee4881da1851b7dce7ad9e2cc041f14a9ab7130 Mon Sep 17 00:00:00 2001 From: Xiaoyu Min Date: Tue, 5 Nov 2019 10:03:09 +0200 Subject: [PATCH] net/mlx5: allow pattern start from IP [ upstream commit 0be2fba2f07d91aa7436fcf452aaff05ff5c6a62 ] Some applications, i.e. OVS, have rule like: [1] pattern ipv4 / end actions ... which intends to match ipv4 only on non-vlan ethernet and MLX5 NIC supports this. So PMD should accept this. Fixes: 906a2efae8da ("net/mlx5: validate flow rule item order") Signed-off-by: Xiaoyu Min Acked-by: Ori Kam Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index cf9cdcfe3..2bf535213 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1069,9 +1069,15 @@ mlx5_flow_validate_item_eth(const struct rte_flow_it= em *item, =09=09=09=09=09 RTE_FLOW_ERROR_TYPE_ITEM, item, =09=09=09=09=09 "multiple L2 layers not supported"); -=09if (tunnel && (item_flags & MLX5_FLOW_LAYER_INNER_L3)) +=09if ((!tunnel && (item_flags & MLX5_FLOW_LAYER_OUTER_L3)) || +=09 (tunnel && (item_flags & MLX5_FLOW_LAYER_INNER_L3))) =09=09return rte_flow_error_set(error, EINVAL, =09=09=09=09=09 RTE_FLOW_ERROR_TYPE_ITEM, item, -=09=09=09=09=09 "inner L2 layer should not " -=09=09=09=09=09 "follow inner L3 layers"); +=09=09=09=09=09 "L2 layer should not follow " +=09=09=09=09=09 "L3 layers"); +=09if ((!tunnel && (item_flags & MLX5_FLOW_LAYER_OUTER_VLAN)) || +=09 (tunnel && (item_flags & MLX5_FLOW_LAYER_INNER_VLAN))) +=09=09return rte_flow_error_set(error, EINVAL, +=09=09=09=09=09 RTE_FLOW_ERROR_TYPE_ITEM, item, +=09=09=09=09=09 "L2 layer should not follow VLAN"); =09if (!mask) =09=09mask =3D &rte_flow_item_eth_mask; @@ -1117,6 +1123,4 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_it= em *item, =09=09=09=09=09MLX5_FLOW_LAYER_OUTER_VLAN; =20 -=09const uint64_t l2m =3D tunnel ? MLX5_FLOW_LAYER_INNER_L2 : -=09=09=09=09 MLX5_FLOW_LAYER_OUTER_L2; =09if (item_flags & vlanm) =09=09return rte_flow_error_set(error, EINVAL, @@ -1126,9 +1130,5 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_it= em *item, =09=09return rte_flow_error_set(error, EINVAL, =09=09=09=09=09 RTE_FLOW_ERROR_TYPE_ITEM, item, -=09=09=09=09=09 "L2 layer cannot follow L3/L4 layer"); -=09else if ((item_flags & l2m) =3D=3D 0) -=09=09return rte_flow_error_set(error, EINVAL, -=09=09=09=09=09 RTE_FLOW_ERROR_TYPE_ITEM, item, -=09=09=09=09=09 "no L2 layer before VLAN"); +=09=09=09=09=09 "VLAN cannot follow L3/L4 layer"); =09if (!mask) =09=09mask =3D &rte_flow_item_vlan_mask; @@ -1197,8 +1197,4 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_it= em *item, =09=09=09=09=09 RTE_FLOW_ERROR_TYPE_ITEM, item, =09=09=09=09=09 "L3 cannot follow an L4 layer."); -=09else if (!tunnel && !(item_flags & MLX5_FLOW_LAYER_OUTER_L2)) -=09=09return rte_flow_error_set(error, EINVAL, -=09=09=09=09=09 RTE_FLOW_ERROR_TYPE_ITEM, item, -=09=09=09=09=09 "no L2 layer before IPV4"); =09if (!mask) =09=09mask =3D &rte_flow_item_ipv4_mask; @@ -1265,8 +1261,4 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_it= em *item, =09=09=09=09=09 RTE_FLOW_ERROR_TYPE_ITEM, item, =09=09=09=09=09 "L3 cannot follow an L4 layer."); -=09else if (!tunnel && !(item_flags & MLX5_FLOW_LAYER_OUTER_L2)) -=09=09return rte_flow_error_set(error, EINVAL, -=09=09=09=09=09 RTE_FLOW_ERROR_TYPE_ITEM, item, -=09=09=09=09=09 "no L2 layer before IPV6"); =09if (!mask) =09=09mask =3D &rte_flow_item_ipv6_mask; --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-11 21:24:13.796624458 +0000 +++ 0013-net-mlx5-allow-pattern-start-from-IP.patch=092019-12-11 21:24:12.5= 94652726 +0000 @@ -1 +1 @@ -From 0be2fba2f07d91aa7436fcf452aaff05ff5c6a62 Mon Sep 17 00:00:00 2001 +From 7ee4881da1851b7dce7ad9e2cc041f14a9ab7130 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 0be2fba2f07d91aa7436fcf452aaff05ff5c6a62 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 54f4cfe04..e90301ccd 100644 +index cf9cdcfe3..2bf535213 100644 @@ -29 +30 @@ -@@ -1277,9 +1277,15 @@ mlx5_flow_validate_item_eth(const struct rte_flow_i= tem *item, +@@ -1069,9 +1069,15 @@ mlx5_flow_validate_item_eth(const struct rte_flow_i= tem *item, @@ -48 +49 @@ -@@ -1328,6 +1334,4 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_i= tem *item, +@@ -1117,6 +1123,4 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_i= tem *item, @@ -55 +56 @@ -@@ -1337,9 +1341,5 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_i= tem *item, +@@ -1126,9 +1130,5 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_i= tem *item, @@ -66 +67 @@ -@@ -1465,8 +1465,4 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_i= tem *item, +@@ -1197,8 +1197,4 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_i= tem *item, @@ -68 +69 @@ - =09=09=09=09=09 "L3 cannot follow an NVGRE layer."); + =09=09=09=09=09 "L3 cannot follow an L4 layer."); @@ -75 +76 @@ -@@ -1571,8 +1567,4 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_i= tem *item, +@@ -1265,8 +1261,4 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_i= tem *item, @@ -77 +78 @@ - =09=09=09=09=09 "L3 cannot follow an NVGRE layer."); + =09=09=09=09=09 "L3 cannot follow an L4 layer.");