[dpdk-dev] [PATCH 4/5] ethdev: clarify RSS action in flow API

Adrien Mazarguil adrien.mazarguil at 6wind.com
Tue Jan 10 14:08:29 CET 2017


Contrary to the current description, mbuf RSS hash result storage does not
overlap with the returned MARK value (hash.fdir.lo vs. hash.fdir.hi), and
both may be combined.

Reflect this change by allowing testpmd to display both values
simultaneously.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
Cc: Jingjing Wu <jingjing.wu at intel.com>
Cc: John McNamara <john.mcnamara at intel.com>
---
 app/test-pmd/rxonly.c              | 3 ++-
 doc/guides/prog_guide/rte_flow.rst | 8 +++-----
 lib/librte_ether/rte_flow.h        | 8 +++-----
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c
index cf00576..dcc8346 100644
--- a/app/test-pmd/rxonly.c
+++ b/app/test-pmd/rxonly.c
@@ -148,7 +148,8 @@ pkt_burst_receive(struct fwd_stream *fs)
 		if (ol_flags & PKT_RX_RSS_HASH) {
 			printf(" - RSS hash=0x%x", (unsigned) mb->hash.rss);
 			printf(" - RSS queue=0x%x",(unsigned) fs->rx_queue);
-		} else if (ol_flags & PKT_RX_FDIR) {
+		}
+		if (ol_flags & PKT_RX_FDIR) {
 			printf(" - FDIR matched ");
 			if (ol_flags & PKT_RX_FDIR_ID)
 				printf("ID=0x%x",
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index a6acbbf..93d0dc2 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -1187,11 +1187,9 @@ Action: ``RSS``
 Similar to QUEUE, except RSS is additionally performed on packets to spread
 them among several queues according to the provided parameters.
 
-Note: RSS hash result is normally stored in the ``hash.rss`` mbuf field,
-however it conflicts with `Action: MARK`_ as they share the same space. When
-both actions are specified, the RSS hash is discarded and
-``PKT_RX_RSS_HASH`` is not set in ``ol_flags``. MARK has priority. The mbuf
-structure should eventually evolve to store both.
+Note: RSS hash result is stored in the ``hash.rss`` mbuf field which
+overlaps ``hash.fdir.lo``. Since `Action: MARK`_ sets the ``hash.fdir.hi``
+field only, both can be requested simultaneously.
 
 - Terminating by default.
 
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index c2b9fc5..59dc1ef 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -696,11 +696,9 @@ struct rte_flow_action_dup {
  * Similar to QUEUE, except RSS is additionally performed on packets to
  * spread them among several queues according to the provided parameters.
  *
- * Note: RSS hash result is normally stored in the hash.rss mbuf field,
- * however it conflicts with the MARK action as they share the same
- * space. When both actions are specified, the RSS hash is discarded and
- * PKT_RX_RSS_HASH is not set in ol_flags. MARK has priority. The mbuf
- * structure should eventually evolve to store both.
+ * Note: RSS hash result is stored in the hash.rss mbuf field which overlaps
+ * hash.fdir.lo. Since the MARK action sets the hash.fdir.hi field only,
+ * both can be requested simultaneously.
  *
  * Terminating by default.
  */
-- 
2.1.4



More information about the dev mailing list