From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Hanoch Haim (hhaim)" Subject: Re: mlx5 reta size is dynamic Date: Thu, 22 Mar 2018 06:52:53 +0000 Message-ID: References: <1b6a9384a5604f15948162766cde90a9@XCH-RTP-017.cisco.com> <20180321214749.GA53128@yongseok-MBP.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Yongseok Koh Return-path: Received: from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72]) by dpdk.org (Postfix) with ESMTP id 123F2AABF for ; Thu, 22 Mar 2018 07:53:00 +0100 (CET) In-Reply-To: <20180321214749.GA53128@yongseok-MBP.local> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Yongseok,=20 RSS has a DPDK API,application can ask for the reta table size and configur= e it. In your case you are assuming specific use case and change the size d= ynamically which solve 90% of the use-cases but break the 10% use-case.=20 Instead, you could provide the application a consistent API and with that 1= 00% of the applications can work with no issue. This is what happen with In= tel (ixgbe/i40e) Another minor issue the rss_key_size return as zero but internally it is 40= bytes Thanks, Hanoh -----Original Message----- From: Yongseok Koh [mailto:yskoh@mellanox.com]=20 Sent: Wednesday, March 21, 2018 11:48 PM To: Hanoch Haim (hhaim) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] mlx5 reta size is dynamic On Wed, Mar 21, 2018 at 06:56:33PM +0000, Hanoch Haim (hhaim) wrote: > Hi mlx5 driver expert, >=20 > DPDK: 17.11 > Any reason mlx5 driver change the rate table size dynamically based on=20 > the rx- queues# ? The device only supports 2^n-sized indirection table. For example, if the n= umber of Rx queues is 6, device can't have 1-1 mapping but the size of ind = tbl could be 8, 16, 32 and so on. If we configure it as 8 for example, 2 ou= t of 6 queues will have 1/4 of traffic while the rest 4 queues receives 1/8= . We thought it was too much disparity and preferred setting the max size i= n order to mitigate the imbalance. > There is a hidden assumption that the user wants to distribute the=20 > packets evenly which is not always correct. But it is mostly correct because RSS is used for uniform distribution. The = decision wasn't made based on our speculation but by many request from mult= iple customers. > /* If the requested number of RX queues is not a power of two, use the > * maximum indirection table size for better balancing. > * The result is always rounded to the next power of two. */ > reta_idx_n =3D (1 << log2above((rxqs_n & (rxqs_n - 1)) ? > priv->ind_table_max_size : > rxqs_n)); Thanks, Yongseok