ethdev: fix flow expansion matching types

Message ID 0f6611f2322f21df8e64682a6b8d74ab21983178.1531291755.git.nelio.laranjeiro@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series ethdev: fix flow expansion matching types |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Nélio Laranjeiro July 11, 2018, 6:49 a.m. UTC
  Node RSS types are generally covering more RSS kind than the user is
requesting, it should accept to expand even if only a single bit is
remains after masking.  Setting the correct RSS kind for the rule
remains the driver job.

Fixes: 959823ce4c47 ("ethdev: add flow API to expand RSS flows")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 lib/librte_ethdev/rte_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Adrien Mazarguil July 11, 2018, 7:16 a.m. UTC | #1
On Wed, Jul 11, 2018 at 08:49:35AM +0200, Nelio Laranjeiro wrote:
> Node RSS types are generally covering more RSS kind than the user is
> requesting, it should accept to expand even if only a single bit is
> remains after masking.  Setting the correct RSS kind for the rule
> remains the driver job.
> 
> Fixes: 959823ce4c47 ("ethdev: add flow API to expand RSS flows")
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
  
Thomas Monjalon July 12, 2018, 9:28 p.m. UTC | #2
11/07/2018 09:16, Adrien Mazarguil:
> On Wed, Jul 11, 2018 at 08:49:35AM +0200, Nelio Laranjeiro wrote:
> > Node RSS types are generally covering more RSS kind than the user is
> > requesting, it should accept to expand even if only a single bit is
> > remains after masking.  Setting the correct RSS kind for the rule
> > remains the driver job.
> > 
> > Fixes: 959823ce4c47 ("ethdev: add flow API to expand RSS flows")
> > 
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> 
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
index 2b13efca7..e06cc2193 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -585,7 +585,7 @@  rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
 	node = next_node ? &graph[*next_node] : NULL;
 	while (node) {
 		flow_items[stack_pos].type = node->type;
-		if ((node->rss_types & types) == node->rss_types) {
+		if (node->rss_types & types) {
 			/*
 			 * compute the number of items to copy from the
 			 * expansion and copy it.