net/mlx5: fix redundant flow after RSS expansion
PATCH 1/1 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.
[1]:
commit 09315fc83861 ("ethdev: add VLAN attributes to ethernet and VLAN items")
[2]:
commit 86b59a1af671 ("net/mlx5: support VLAN matching fields")
--- drivers/net/mlx5/mlx5_flow.c | 16 ---------------- 1 file changed, 16 deletions(-)
drivers/net/mlx5/mlx5_flow.c +0 -16
@@ -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; }
Signature · 1 line
2.31.0
From: Xiaoyu Min
Quoted 14 lines
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 ==
0x8100instead 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_ethitself 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")
Quoted 8 lines
[1]:
commit09315fc83861("ethdev: add VLAN attributes to ethernet and VLAN items")[2]:
commit86b59a1af671("net/mlx5: support VLAN matching fields")Signed-off-by Xiaoyu Min <[email protected]>
Hi,
Quoted 29 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Xiaoyu Min
Sent: Tuesday, March 30, 2021 4:41 PM
To: Matan Azrad <[email protected]>; Shahaf Shuler <[email protected]>; Slava Ovsiienko <[email protected]>; Jack Min <[email protected]>; Ori Kam <[email protected]>
Cc: [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH] net/mlx5: fix redundant flow after RSS expansionWhen 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 ==0x8100instead 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_ethitself 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")[1]:
commit09315fc83861("ethdev: add VLAN attributes to ethernet and VLAN items")
Quoted 5 lines
[2]:
commit86b59a1af671("net/mlx5: support VLAN matching fields")Signed-off-by Xiaoyu Min <[email protected]>---
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh