patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
To: dev@dpdk.org
Cc: kaara.satwik@chelsio.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH] net/cxgbe: accept VLAN flow items without ethertype
Date: Mon, 21 Dec 2020 04:14:43 +0530	[thread overview]
Message-ID: <1608504283-29133-1-git-send-email-rahul.lakkireddy@chelsio.com> (raw)

From: Karra Satwik <kaara.satwik@chelsio.com>

When apps pass the RTE_FLOW_ITEM_TYPE_VLAN without setting the
ethertype field in RTE_FLOW_ITEM_TYPE_ETH, then assume 0x8100
VLAN by default and don't reject the rule.

Fixes: 55f003d8884c ("net/cxgbe: support flow API for matching QinQ VLAN")
Cc: stable@dpdk.org

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_flow.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index f7c4f3696..520a5a5c9 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -245,11 +245,6 @@ ch_rte_parsetype_vlan(const void *dmask, const struct rte_flow_item *item,
 	/* If user has not given any mask, then use chelsio supported mask. */
 	mask = umask ? umask : (const struct rte_flow_item_vlan *)dmask;
 
-	if (!fs->mask.ethtype)
-		return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
-					  item,
-					  "Can't parse VLAN item without knowing ethertype");
-
 	/* If ethertype is already set and is not VLAN (0x8100) or
 	 * QINQ(0x88A8), then don't proceed further. Otherwise,
 	 * reset the outer ethertype, so that it can be replaced by
@@ -275,7 +270,7 @@ ch_rte_parsetype_vlan(const void *dmask, const struct rte_flow_item *item,
 			fs->mask.ethtype = 0;
 			fs->val.ethtype = 0;
 		}
-	} else if (fs->val.ethtype == RTE_ETHER_TYPE_VLAN) {
+	} else {
 		CXGBE_FILL_FS(1, 1, ivlan_vld);
 		if (spec) {
 			if (spec->tci || (umask && umask->tci))
-- 
2.24.0


             reply	other threads:[~2020-12-20 23:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-20 22:44 Rahul Lakkireddy [this message]
2021-01-11 14:53 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit

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=1608504283-29133-1-git-send-email-rahul.lakkireddy@chelsio.com \
    --to=rahul.lakkireddy@chelsio.com \
    --cc=dev@dpdk.org \
    --cc=kaara.satwik@chelsio.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).