From f4e7c8bc84641fcf32b069dce80c5443b3faf0b6 Mon Sep 17 00:00:00 2001 From: Adrien Mazarguil Date: Tue, 10 Jan 2017 14:08:29 +0100 Subject: [PATCH] ethdev: clarify RSS action in flow API 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 --- 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 cf005760dc..dcc83465db 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 a6acbbf39e..93d0dc2f87 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 c2b9fc5dbb..59dc1ef283 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.20.1