From patchwork Wed Apr 3 08:48:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Barbette X-Patchwork-Id: 52162 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 500B35B2A; Wed, 3 Apr 2019 10:49:17 +0200 (CEST) Received: from smtp-3.sys.kth.se (smtp-3.sys.kth.se [130.237.48.192]) by dpdk.org (Postfix) with ESMTP id 0B6B34C9D for ; Wed, 3 Apr 2019 10:49:16 +0200 (CEST) Received: from smtp-3.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-3.sys.kth.se (Postfix) with ESMTP id C29C25783; Wed, 3 Apr 2019 10:49:15 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-3.sys.kth.se ([127.0.0.1]) by smtp-3.sys.kth.se (smtp-3.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RqWWe5Fz-SCR; Wed, 3 Apr 2019 10:49:15 +0200 (CEST) X-KTH-Auth: barbette [192.16.125.168] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kth.se; s=default; t=1554281355; bh=apLNYZdaNb53T4rCVw4YxkR+kOvW1RM5WnvghBMadsc=; h=From:To:Cc:Subject:Date; b=WPsaJF+8PDazp1l7QEpwbLpd8y9Ljgh11EvY33MZ98G6wjQSmeDQBBo/x//8CHW3n qJK2MK28ciTFD+A+a4gvN5FsNHhTF1fOdS8RGpwz517MT4/oyPaYhEE2AWDCkZIxgJ v8SyNKjfGYGYnDJucgYO/hKIaICw5WLQRH+VulpY= X-KTH-mail-from: barbette@kth.se Received: from nslrack08.ssvl.kth.se (nslrack08.ssvl.kth.se [192.16.125.168]) by smtp-3.sys.kth.se (Postfix) with ESMTPSA id CF5F15C94; Wed, 3 Apr 2019 10:49:14 +0200 (CEST) From: Tom Barbette To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com, arybchenko@solarflare.com, Tom Barbette Date: Wed, 3 Apr 2019 10:48:53 +0200 Message-Id: <1554281333-119866-1-git-send-email-barbette@kth.se> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] reta_query: Doc requirements on reta_conf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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().