patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com
Cc: dev@dpdk.org, shahafs@mellanox.com,
	Yongseok Koh <yskoh@mellanox.com>,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH v2] net/mlx5: fix GRE flow rule
Date: Thu, 24 May 2018 10:56:48 -0700	[thread overview]
Message-ID: <20180524175648.14255-1-yskoh@mellanox.com> (raw)
In-Reply-To: <20180523015157.35716-1-yskoh@mellanox.com>

Creating a flow having pattern from the middle of a packet is allowed. For
example,

  testpmd> flow create 0 ingress pattern vxlan vni is 20 / end actions ...

Device can parse GRE protocol number in outer IP header but specifying from
GRE header can't differentiate it from VxLAN tunnel. As a result, the
following rule will be interpreted as a wildcard rule, which always matches
any packet.

  testpmd> flow create 0 ingress pattern gre / end actions ...

Fixes: 96c6c65a10d2 ("net/mlx5: support GRE tunnel flow")
Fixes: 1f106da2bf7b ("net/mlx5: support MPLS-in-GRE and MPLS-in-UDP")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---

v2:
* amend commit message.
* remove GRE entry from the head item regardless of HW support.

 drivers/net/mlx5/mlx5_flow.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 994be05be..adb995f0d 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -331,8 +331,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
 	[RTE_FLOW_ITEM_TYPE_END] = {
 		.items = ITEMS(RTE_FLOW_ITEM_TYPE_ETH,
 			       RTE_FLOW_ITEM_TYPE_VXLAN,
-			       RTE_FLOW_ITEM_TYPE_VXLAN_GPE,
-			       RTE_FLOW_ITEM_TYPE_GRE),
+			       RTE_FLOW_ITEM_TYPE_VXLAN_GPE),
 	},
 	[RTE_FLOW_ITEM_TYPE_ETH] = {
 		.items = ITEMS(RTE_FLOW_ITEM_TYPE_VLAN,
-- 
2.11.0

  parent reply	other threads:[~2018-05-24 17:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23  1:51 [dpdk-stable] [PATCH] " Yongseok Koh
2018-05-23  5:36 ` [dpdk-stable] [dpdk-dev] " Matan Azrad
2018-05-23 10:01   ` Yongseok Koh
2018-05-23 11:45     ` Matan Azrad
2018-05-23 18:34       ` Yongseok Koh
2018-05-23 22:55         ` Xueming(Steven) Li
2018-05-24  6:34         ` Matan Azrad
2018-05-24 17:56 ` Yongseok Koh [this message]
2018-06-19 23:23   ` [dpdk-stable] [PATCH v2] " Yongseok Koh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180524175648.14255-1-yskoh@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=shahafs@mellanox.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).