patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/mlx5: fix redundant flow after RSS expansion
@ 2021-03-30 13:40 Xiaoyu Min
  2021-04-08  9:23 ` Matan Azrad
  2021-04-11  9:04 ` [dpdk-stable] [dpdk-dev] " Raslan Darawsheh
  0 siblings, 2 replies; 3+ messages in thread
From: Xiaoyu Min @ 2021-03-30 13:40 UTC (permalink / raw)
  To: Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko, Xiaoyu Min, Ori Kam
  Cc: dev, stable

When RSS expand, if there is no expansion happened but completion happened
because user only input next protocol field instead of item
i.e, ether type == 0x8100 instead of VLAN, an extra flow is created with
missing item in order to filter traffic strictly.

However, after [1] and [2] the rte_flow_item_eth itself is enough to
filter out VLAN traffic, the VLAN item is not needed.

This redundant flow will cause faiure in some scenarios on group 0 due
to they are the same FTE.

Fixes: fc2dd8dd492f ("ethdev: fix expand RSS flows")
Cc: stable@dpdk.org

[1]:
commit 09315fc83861 ("ethdev: add VLAN attributes to ethernet and
VLAN items")

[2]:
commit 86b59a1af671 ("net/mlx5: support VLAN matching fields")

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index c347f8130e..668c32cf51 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -385,22 +385,6 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
 		}
 		node = *next_node ? &graph[*next_node] : NULL;
 	};
-	/* no expanded flows but we have missed item, create one rule for it */
-	if (buf->entries == 1 && missed != 0) {
-		elt = 2;
-		lsize += elt * sizeof(*item) + user_pattern_size;
-		if (lsize <= size) {
-			buf->entry[buf->entries].priority = 1;
-			buf->entry[buf->entries].pattern = addr;
-			buf->entries++;
-			flow_items[0].type = missed_item.type;
-			flow_items[1].type = RTE_FLOW_ITEM_TYPE_END;
-			rte_memcpy(addr, buf->entry[0].pattern,
-				   user_pattern_size);
-			addr = (void *)(((uintptr_t)addr) + user_pattern_size);
-			rte_memcpy(addr, flow_items, elt * sizeof(*item));
-		}
-	}
 	return lsize;
 }
 
-- 
2.31.0


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

* Re: [dpdk-stable] [PATCH] net/mlx5: fix redundant flow after RSS expansion
  2021-03-30 13:40 [dpdk-stable] [PATCH] net/mlx5: fix redundant flow after RSS expansion Xiaoyu Min
@ 2021-04-08  9:23 ` Matan Azrad
  2021-04-11  9:04 ` [dpdk-stable] [dpdk-dev] " Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Matan Azrad @ 2021-04-08  9:23 UTC (permalink / raw)
  To: Jack Min, Shahaf Shuler, Slava Ovsiienko, Jack Min, Ori Kam; +Cc: dev, stable



From: Xiaoyu Min
> When RSS expand, if there is no expansion happened but completion happened
> because user only input next protocol field instead of item i.e, ether type ==
> 0x8100 instead of VLAN, an extra flow is created with missing item in order to
> filter traffic strictly.
> 
> However, after [1] and [2] the rte_flow_item_eth itself is enough to filter out
> VLAN traffic, the VLAN item is not needed.
> 
> This redundant flow will cause faiure in some scenarios on group 0 due to they
> are the same FTE.
> 
> Fixes: fc2dd8dd492f ("ethdev: fix expand RSS flows")
> Cc: stable@dpdk.org
> 
> [1]:
> commit 09315fc83861 ("ethdev: add VLAN attributes to ethernet and VLAN
> items")
> 
> [2]:
> commit 86b59a1af671 ("net/mlx5: support VLAN matching fields")
> 
> Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/mlx5: fix redundant flow after RSS expansion
  2021-03-30 13:40 [dpdk-stable] [PATCH] net/mlx5: fix redundant flow after RSS expansion Xiaoyu Min
  2021-04-08  9:23 ` Matan Azrad
@ 2021-04-11  9:04 ` Raslan Darawsheh
  1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2021-04-11  9:04 UTC (permalink / raw)
  To: Jack Min, Matan Azrad, Shahaf Shuler, Slava Ovsiienko, Jack Min, Ori Kam
  Cc: dev, stable

Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xiaoyu Min
> Sent: Tuesday, March 30, 2021 4:41 PM
> To: Matan Azrad <matan@nvidia.com>; Shahaf Shuler
> <shahafs@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Jack Min
> <jackmin@nvidia.com>; Ori Kam <orika@nvidia.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix redundant flow after RSS
> expansion
> 
> When RSS expand, if there is no expansion happened but completion
> happened
> because user only input next protocol field instead of item
> i.e, ether type == 0x8100 instead of VLAN, an extra flow is created with
> missing item in order to filter traffic strictly.
> 
> However, after [1] and [2] the rte_flow_item_eth itself is enough to
> filter out VLAN traffic, the VLAN item is not needed.
> 
> This redundant flow will cause faiure in some scenarios on group 0 due
> to they are the same FTE.
> 
> Fixes: fc2dd8dd492f ("ethdev: fix expand RSS flows")
> Cc: stable@dpdk.org
> 
> [1]:
> commit 09315fc83861 ("ethdev: add VLAN attributes to ethernet and
> VLAN items")
> 
> [2]:
> commit 86b59a1af671 ("net/mlx5: support VLAN matching fields")
> 
> Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
> ---

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

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

end of thread, other threads:[~2021-04-11  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 13:40 [dpdk-stable] [PATCH] net/mlx5: fix redundant flow after RSS expansion Xiaoyu Min
2021-04-08  9:23 ` Matan Azrad
2021-04-11  9:04 ` [dpdk-stable] [dpdk-dev] " Raslan Darawsheh

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