DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wei Zhao <wei.zhao1@intel.com>
To: dev@dpdk.org
Cc: Wei Zhao <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH] net/ixgbe: add tci mask check in fdir pasrer
Date: Fri,  3 Feb 2017 16:43:57 +0800	[thread overview]
Message-ID: <1486111437-32778-1-git-send-email-wei.zhao1@intel.com> (raw)

Add more check on the tci mask of vlan and vxlan parser
in fdir filter rule pattern parser.If do not add such check,
it maybe cause error in fdir configuration set check.

Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 82aceed..d64cfd1 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -1400,7 +1400,7 @@ ixgbe_parse_fdir_act_attr(const struct rte_flow_attr *attr,
  * ETH		dst_addr
 		{0xAC, 0x7B, 0xA1,	{0xFF, 0xFF, 0xFF,
 		0x2C, 0x6D, 0x36}	0xFF, 0xFF, 0xFF}
- * MAC VLAN	tci	0x2016		0xFFFF
+ * MAC VLAN	tci	0x2016		0xEFFF
  *		tpid	0x8100		0xFFFF
  * END
  * Other members in mask and spec should set to 0x00.
@@ -1617,6 +1617,7 @@ ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr,
 			return -rte_errno;
 		}
 		rule->mask.vlan_tci_mask = vlan_mask->tci;
+		rule->mask.vlan_tci_mask &= 0xEFFF;
 		/* More than one tags are not supported. */
 
 		/**
@@ -2360,6 +2361,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 			return -rte_errno;
 		}
 		rule->mask.vlan_tci_mask = vlan_mask->tci;
+		rule->mask.vlan_tci_mask &= 0xEFFF;
 		/* More than one tags are not supported. */
 
 		/**
-- 
2.5.5

             reply	other threads:[~2017-02-03  8:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-03  8:43 Wei Zhao [this message]
2017-02-03 22:52 ` Ferruh Yigit
  -- strict thread matches above, loose matches on Subject: below --
2017-02-03  8:42 Wei Zhao

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=1486111437-32778-1-git-send-email-wei.zhao1@intel.com \
    --to=wei.zhao1@intel.com \
    --cc=dev@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).