From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by dpdk.org (Postfix) with ESMTP id 33006324B for ; Thu, 22 Mar 2018 10:28:25 +0100 (CET) Received: by mail-wr0-f172.google.com with SMTP id s18so7909753wrg.9 for ; Thu, 22 Mar 2018 02:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=aWZdlxDlaxJY4peIK6eg13oGQ9rwZ4eRCCm5rdmIKuA=; b=sJINWysB8mQsrc00lAbZv/WdtKvejuwvAxqXw6u3PpT2KmTgy5TtUchrGVH3OD6Fu2 pxGGJG/CzT+cXXJgVBZaIOsuSwaNcpoW/AYJXJSwYkzQ5/uzPXXDMbM4nVRsB/WSYese UZUcQxk/KhQtnAQjUK4lsO2Bq9yAkk9A28D5OSZrogViJ5IN3hp/L0X0YI9Nmw5maj6b 4GVu0mcfVNlt3idfTjFVNK8cMX2Eb0JATF719TfjLSK+jbtQMyO7py4lrXtmEL5kAFS6 Xn5pYSuGA6iwCCHgzXjPE/+q/YdQHLwT9NfbCBk7lZOHbURSFb3WsOpo9V+tAHT7S4Gb 0rUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=aWZdlxDlaxJY4peIK6eg13oGQ9rwZ4eRCCm5rdmIKuA=; b=Zznmzc/JCwRknbK8wtfp7ULhDb3EaEQI46qLAwLmVWlg3dyOHeg7vfo/1HTXf4C8jH xjLxGpOZlv+k/LIcS7XRpkrCAgyiGiLgdoprTm580xvIwIazpshgNmtforN7Twu180gv 2i/9O/3yowdE1U0shscaWqzbhlDVHzObYkspDtl12wmFmjaECYTcwyWyq8gUPc8m3WdE QCcnt//Hgkf9Fi70MwkiohLJViKM00RZYMxU9wOpvECJ7oDPqP6tTmaCTcOksdghJzGT 639mzqPQE3Cr0C7cor5jG/tt4Y7T9aNTyY8d3XNKMmoZwtXjRHxH9rufuE7X3RvPIEtU WMUw== X-Gm-Message-State: AElRT7Fs+hW7LnB1J8vbPt5igjQrunLFp5b12tbE7cDx4U8iPNNNKmGZ zuLuTa2q6fu+lMowTTVKnuhj X-Google-Smtp-Source: AG47ELuKz977oH6cPie3W1l29JX1zsGb2r7/sQe9nKZhyic/d+xtSsFNc8Xv8mf91nI/zHdg+cvg1w== X-Received: by 10.223.184.68 with SMTP id u4mr18305501wrf.154.1521710904829; Thu, 22 Mar 2018 02:28:24 -0700 (PDT) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id m35sm13711793wrm.59.2018.03.22.02.28.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Mar 2018 02:28:24 -0700 (PDT) Date: Thu, 22 Mar 2018 10:27:34 +0100 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: "Hanoch Haim (hhaim)" Cc: Yongseok Koh , "dev@dpdk.org" Message-ID: <20180322092734.6iulb7yxfkbdsi3h@laranjeiro-vm.dev.6wind.com> References: <1b6a9384a5604f15948162766cde90a9@XCH-RTP-017.cisco.com> <20180321214749.GA53128@yongseok-MBP.local> <20180322085441.a3o2eyvols7jkzxo@laranjeiro-vm.dev.6wind.com> <92a7d23b9df748b6af83f7dda88672e4@XCH-RTP-017.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <92a7d23b9df748b6af83f7dda88672e4@XCH-RTP-017.cisco.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] mlx5 reta size is dynamic 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: , X-List-Received-Date: Thu, 22 Mar 2018 09:28:25 -0000 Hi Hanoch, On Thu, Mar 22, 2018 at 09:02:19AM +0000, Hanoch Haim (hhaim) wrote: > Hi Nelio, > I think you didn't understand me. I suggest to keep the RETA table > size constant (maximum 512 in your case) and don't change its base on > the number of configured Rx-queue. It is even simpler, we can return the maximum size or a multiple of RTE_RETA_GROUP_SIZE according to the number of Rx queues being used, in the devop->dev_infos_get() as it is what the rte_eth_dev_rss_reta_update() implementation will expect. > This will make the DPDK API consistent. As a user I need to do tricks > (allocate an odd/prime number of rx-queues) to get the RETA size > constant at 512 I understand this issue, what I don't fully understand your needs. > I'm not talking about changing the values in the RETA table which can > be done while there is traffic. On MLX5 changing the entries of the RETA table don't affect the current traffic, it needs a port restart to affect it and only for "default" flows, any flow created through the public flow API are not impacted by the RETA table. >>From my understanding, you wish to have a size returned by devop->dev_infos_get() usable directly by rte_eth_dev_rss_reta_update(). This is why you are asking for a fix size? So, if internally the PMD starts with a smaller RETA table does not really matter, until the RETA API works without any trick from the application side. Is this correct? Thanks, > Thanks, > Hanoh > > > -----Original Message----- > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com] > Sent: Thursday, March 22, 2018 10:55 AM > To: Hanoch Haim (hhaim) > Cc: Yongseok Koh; dev@dpdk.org > Subject: Re: [dpdk-dev] mlx5 reta size is dynamic > > On Thu, Mar 22, 2018 at 06:52:53AM +0000, Hanoch Haim (hhaim) wrote: > > Hi Yongseok, > > > > > > RSS has a DPDK API,application can ask for the reta table size and > > configure it. In your case you are assuming specific use case and > > change the size dynamically which solve 90% of the use-cases but break > > the 10% use-case. > > Instead, you could provide the application a consistent API and with > > that 100% of the applications can work with no issue. This is what > > happen with Intel (ixgbe/i40e) Another minor issue the rss_key_size > > return as zero but internally it is 40 bytes > > Hi Hanoch, > > Legacy DPDK API has always considered there is only a single indirection table aka. RETA whereas this is not true [1][2] on this device. > > On MLX5 there is an indirection table per Hash Rx queue according to the list of queues making part of it. > The Hash Rx queue is configured to make the hash with configured > information: > - Algorithm, > - key > - hash field (Verbs hash field) > - Indirection table > An Hash Rx queue cannot handle multiple RSS configuration, we have an Hash Rx queue per protocol and thus a full configuration per protocol. > > In such situation, changing the RETA means stopping the traffic, destroying every single flow, hash Rx queue, indirection table to remake everything with the new configuration. > Until then, we always recommended to any application to restart the port on this device after a RETA update to apply this new configuration. > > Since the flow API is the new way to configure flows, application should move to this new one instead of using old API for such behavior. > We should also remove such devop from the PMD to avoid any confusion. > > Regards, > > > Thanks, > > Hanoh > > > > -----Original Message----- > > From: Yongseok Koh [mailto:yskoh@mellanox.com] > > 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, > > > > > > DPDK: 17.11 > > > Any reason mlx5 driver change the rate table size dynamically based > > > on the rx- queues# ? > > > > The device only supports 2^n-sized indirection table. For example, if the number 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 out 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 in order to mitigate the imbalance. > > > > > There is a hidden assumption that the user wants to distribute the > > > 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 multiple 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 = (1 << log2above((rxqs_n & (rxqs_n - 1)) ? > > > priv->ind_table_max_size : > > > rxqs_n)); > > > > Thanks, > > Yongseok > > [1] https://dpdk.org/ml/archives/dev/2015-October/024668.html > [2] https://dpdk.org/ml/archives/dev/2015-October/024669.html > > -- > Nélio Laranjeiro > 6WIND -- Nélio Laranjeiro 6WIND