From: Lior Margalit <lmargalit@nvidia.com>
To: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Cc: Matan Azrad <matan@nvidia.com>,
Lior Margalit <lmargalit@nvidia.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH v1] ethdev:: fix redundant flow after RSS expansion
Date: Mon, 21 Jun 2021 17:51:05 +0300 [thread overview]
Message-ID: <20210621145105.963179-1-lmargalit@nvidia.com> (raw)
[ upstream commit c1d397a67eed3b9d7adce5e73c5352de040b3b65 ]
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.
[1]: commit 09315fc83861 ("ethdev: add VLAN attributes to ethernet and VLAN items")
[2]: commit 86b59a1af671 ("net/mlx5: support VLAN matching fields")
This redundant flow will cause failure in some scenarios on group 0 due
to they are the same FTE.
Fixes: 4ed05fcd441b ("ethdev: add flow API to expand RSS flows")
Cc: stable@dpdk.org
Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
---
lib/librte_ethdev/rte_flow.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
index 9964a241c..cf0b46780 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -1204,23 +1204,5 @@ rte_flow_expand_rss(struct rte_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));
- addr = (void *)(((uintptr_t)addr) +
- elt * sizeof(*item));
- }
- }
return lsize;
}
--
2.25.1
reply other threads:[~2021-06-21 14:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210621145105.963179-1-lmargalit@nvidia.com \
--to=lmargalit@nvidia.com \
--cc=christian.ehrhardt@canonical.com \
--cc=matan@nvidia.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).