patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/sfc: cut non VLAN ID bits from TCI
@ 2018-07-11  9:46 Andrew Rybchenko
  2018-07-23 17:10 ` Luca Boccassi
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Rybchenko @ 2018-07-11  9:46 UTC (permalink / raw)
  To: arybchik; +Cc: stable

TCI may contain PCP or DEI bits. Matching of these bits is not
supported, but the bits still may be set in specification value and
not covered by mask. So, these bits should be ignored.

Fixes: 894080975e1e ("net/sfc: support VLAN in flow API filters")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
---
 drivers/net/sfc/sfc_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 5613d59a9..18387415e 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -371,7 +371,8 @@ sfc_flow_parse_vlan(const struct rte_flow_item *item,
 	 * the outer tag and the next matches the inner tag.
 	 */
 	if (mask->tci == supp_mask.tci) {
-		vid = rte_bswap16(spec->tci);
+		/* Apply mask to keep VID only */
+		vid = rte_bswap16(spec->tci & mask->tci);
 
 		if (!(efx_spec->efs_match_flags &
 		      EFX_FILTER_MATCH_OUTER_VID)) {
-- 
2.17.1

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [dpdk-stable] [PATCH] net/sfc: cut non VLAN ID bits from TCI
@ 2018-06-29 15:23 Andrew Rybchenko
  2018-07-04 17:43 ` Ferruh Yigit
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Rybchenko @ 2018-06-29 15:23 UTC (permalink / raw)
  To: dev; +Cc: stable

TCI may contain PCP or DEI bits. Matching of these bits is not
supported, but the bits still may be set in specification value and
not covered by mask. So, these bits should be ignored.

Fixes: 894080975e1e ("net/sfc: support VLAN in flow API filters")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
---
 drivers/net/sfc/sfc_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 5613d59a9..18387415e 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -371,7 +371,8 @@ sfc_flow_parse_vlan(const struct rte_flow_item *item,
 	 * the outer tag and the next matches the inner tag.
 	 */
 	if (mask->tci == supp_mask.tci) {
-		vid = rte_bswap16(spec->tci);
+		/* Apply mask to keep VID only */
+		vid = rte_bswap16(spec->tci & mask->tci);
 
 		if (!(efx_spec->efs_match_flags &
 		      EFX_FILTER_MATCH_OUTER_VID)) {
-- 
2.17.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-07-26 10:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-11  9:46 [dpdk-stable] [PATCH] net/sfc: cut non VLAN ID bits from TCI Andrew Rybchenko
2018-07-23 17:10 ` Luca Boccassi
2018-07-26  9:42   ` Andrew Rybchenko
2018-07-26  9:46     ` Luca Boccassi
2018-07-26  9:50       ` Andrew Rybchenko
2018-07-26  9:52         ` Andrew Rybchenko
2018-07-26 10:03           ` Luca Boccassi
  -- strict thread matches above, loose matches on Subject: below --
2018-06-29 15:23 Andrew Rybchenko
2018-07-04 17:43 ` Ferruh Yigit

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).