From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro Subject: Re: [PATCH] net/mlx5: setup RSS regardless of queue count Date: Tue, 20 Mar 2018 13:26:08 +0100 Message-ID: <20180320122608.6noglggdsojbtqsx@laranjeiro-vm.dev.6wind.com> References: <20180319163007.11516-1-allain.legacy@windriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: adrien.mazarguil@6wind.com, yskoh@mellanox.com, dev@dpdk.org, matt.peters@windriver.com To: Allain Legacy Return-path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id C52D92965 for ; Tue, 20 Mar 2018 13:27:02 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id l16so3124807wmh.3 for ; Tue, 20 Mar 2018 05:27:02 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180319163007.11516-1-allain.legacy@windriver.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Mar 19, 2018 at 11:30:07AM -0500, Allain Legacy wrote: > From: Dahir Osman > > In some environments it is desirable to have the NIC perform RSS > normally on the packet regardless of the number of queues configured. > The RSS hash result that is stored in the mbuf can then be used by > the application to make decisions about how to distribute workloads > to threads, secondary processes, or even virtual machines if the > application is a virtual switch. This change to the mlx5 driver > aligns with how other drivers in the Intel family work. > > Signed-off-by: Allain Legacy > --- > drivers/net/mlx5/mlx5_rxq.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c > index ff58c4921..e6b05b0ad 100644 > --- a/drivers/net/mlx5/mlx5_rxq.c > +++ b/drivers/net/mlx5/mlx5_rxq.c > @@ -1028,7 +1028,8 @@ mlx5_priv_rxq_new(struct priv *priv, uint16_t idx, uint16_t desc, > tmpl->rxq.crc_present ? "disabled" : "enabled", > tmpl->rxq.crc_present << 2); > /* Save port ID. */ > - tmpl->rxq.rss_hash = priv->rxqs_n > 1; > + tmpl->rxq.rss_hash = (!!(dev->data->dev_conf.rxmode.mq_mode & > + ETH_MQ_RX_RSS)); > tmpl->rxq.port_id = dev->data->port_id; > tmpl->priv = priv; > tmpl->rxq.mp = mp; > -- > 2.12.1 Unfortunately, is not enough to have a valid RSS hash result when the PMD has a single Rx queue, a little more work needs to be handled in the mlx5_flow.c engine to configure the hash field in Verbs Hash Rx queues when a single queues is being used. Thanks, -- Nélio Laranjeiro 6WIND