From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=pcmUUieNsjrXkzmnNUhCQVrQC4+aO33q0lvPRvtCLfg=; b=wjAjz6lrS0f5BUDLrieWkWuh8UK0kSAvHIgSTLqKMwo5xPX4HFHPCt4UQrXR6Nzsru eotI+8wR+4Zax4NtE5ZD62rxm7u8L+iYpW+h2uIvGHcZW3KUHVNe3cC5SY2mCaZddlbw B2FWjjqWVGucUpBNnZW5CcMGfF22XrYSl5X1Z9X1GqqZ8N1T0RzWXCbbwv8Zjo7t+Piy JtysiZ1kAF4DKMGGHaKAU9K0uSDpEUaddl/CQidFjTuU+pq/wAjqP3kCbKthIHF5wtf+ mL1VYXaBHy4gmUvckQfRI9jI1dWz7cuNcHLhjv83MnKjlTWZFsFFSZtIQj153WCcuITX M8qg== 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=pcmUUieNsjrXkzmnNUhCQVrQC4+aO33q0lvPRvtCLfg=; b=S+IfM7gkUWOZgI3ixXw5UMbDcf+sdyznIj+jY99g/nalfvtiPcz+hadgUf/wleKtmZ KG2ukbVaAa95pRK4lWCpu1vE/VbkVdsCP4Dqz7AH5WwIyi8evRJDeKrFQ1vK3WKJtNVM X4N2Qcd8bkMKXJVy79pvm7nIVmfLz0VROl2OFmUIPZnTChjo9nioxgeyYyYLcwCb8IQ2 Y3l3SUKnXvumyMg0HeIYnHD9OZ5n2pBVEBkUXq/DJCDefHHjcN/J2R6vOxlmDTHJLZNF lJzJE3YRrLYCRL6CKo94Yh9jn4Amu6s4G14KR0LojRyRPpyP5VTKuzYOXsnOFGZRYV3f t+Ow== X-Gm-Message-State: AElRT7HLf4Hc5F2tEaW4PFK+ceefNtXPelLCpUxIFVQZyMqtE04LV2Nx JR8Dh4gRzccFV5OswBOlu9EG X-Google-Smtp-Source: AG47ELtYM/7UehzUGGfGvopfi6r8pLT/bnMg1SFGDYYi87fGh6NyyWpIyaHenZ9W+9XjVBTAXe/DAg== X-Received: by 10.28.116.5 with SMTP id p5mr1767154wmc.117.1521548822419; Tue, 20 Mar 2018 05:27:02 -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 v23sm1217938wmh.30.2018.03.20.05.27.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Mar 2018 05:27:01 -0700 (PDT) Date: Tue, 20 Mar 2018 13:26:08 +0100 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Allain Legacy Cc: adrien.mazarguil@6wind.com, yskoh@mellanox.com, dev@dpdk.org, matt.peters@windriver.com 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180319163007.11516-1-allain.legacy@windriver.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] net/mlx5: setup RSS regardless of queue count 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: Tue, 20 Mar 2018 12:27:03 -0000 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