DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tom Barbette <barbette@kth.se>
To: dev@dpdk.org
Cc: thomas@monjalon.net, ferruh.yigit@intel.com,
	arybchenko@solarflare.com, Tom Barbette <barbette@kth.se>
Subject: [dpdk-dev] [PATCH] reta_query: Doc requirements on reta_conf
Date: Wed,  3 Apr 2019 10:48:53 +0200	[thread overview]
Message-ID: <1554281333-119866-1-git-send-email-barbette@kth.se> (raw)

As the librte function checks that bits of up to reta_size in reta_conf
are set, the arg passed must have the mask set to 1. I spent quite some
time before finding the issue here, so I thought updating the doc may
help other people.

The problem raise when the size of the table is not on a (byte?)
boundary, eg when using a power-of-2 amount of queues with mlx5, the
table size becomes the number of queue. Then a usual (bzero)
initialization raise EINVAL, because of this bits problem.

I'd say the requirement should go, one expects this functions to overwrite
whatever is passed as table arguments. Who would want to query the table
except a few entries?
Maybe (idk) mlx5 is actually the only device to support non-byte sized RSS
table, and mlx5 actually ignore the mask in reta_query...
---
 lib/librte_ethdev/rte_ethdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index e254da8..ace425f 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2941,7 +2941,7 @@ int rte_eth_dev_rss_reta_update(uint16_t port_id,
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param reta_conf
- *   RETA to query.
+ *   RETA to query. The mask bits must be set according to reta_size.
  * @param reta_size
  *   Redirection table size. The table size can be queried by
  *   rte_eth_dev_info_get().
-- 
2.7.4

             reply	other threads:[~2019-04-03  8:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03  8:48 Tom Barbette [this message]
2019-04-03  8:48 ` Tom Barbette
2019-04-04 17:00 ` Ferruh Yigit
2019-04-04 17:00   ` Ferruh Yigit

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=1554281333-119866-1-git-send-email-barbette@kth.se \
    --to=barbette@kth.se \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /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).