From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 864375F36 for ; Wed, 21 Mar 2018 09:34:48 +0100 (CET) Received: by mail-wr0-f194.google.com with SMTP id u46so4258012wrc.11 for ; Wed, 21 Mar 2018 01:34:48 -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=YkjrLdQm4ev5A2Q4A/iGZz4npHeozjfGLEUoVIi9Lb4=; b=d4nd8jEtQVi4/LJq9BQh19Kinoy6HObkmzC/1vfGLb/EYZFi31H++M4ngZBp5Nvsqx ORHeOo8S4NV1LvogfgV+hrBH2tVvOh/Md1kdgQgXDmlXsk+e3VwXZmQqOLX9RrPlUkvT Icwo9S0N6LshIWAd+AiK0NYi8oTd1ZJHOqNWFc4z4SBlx5Fg8ZOLVJWVcp2ob7sVI1RB JWBFNoOBP1afGBHGPgHx+ZwIX5d1aVZsp50orS+9gBwNWVcasb9Py2Chufg0jI5gGtdu wBFrdM+HuvA/9ZiuT1aWJkGXl10eGfhUY7hvefo8JTGd50dX4r3kiJ2H7bLzUYQHdgkv BUAA== 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=YkjrLdQm4ev5A2Q4A/iGZz4npHeozjfGLEUoVIi9Lb4=; b=ZVx/j96DQjyzFeSne0rKp474mP1yQ+G8flhtiXn+f+TZph5R9DmiA72a3m407rtp9y nHWc1rCCeop4xnhIS8DQnvbgTA87v+JVp4uQU49LA9C23oH1Qnzc0p1OKT1zuMUnpZr4 oEyhr1p/42sVfJgp/u+DxLH+Alvs5UponeoaUt6Htb75ZKK2dGCP2iIClMSMFjNy7OfU 8s4JVGF6kEx2ENXz0svZUmBIIK6xNCJ6qhbOXYtEg/my785j/oTQH9ZMYuagkJkqMad7 pz2zge8vl6Iz01g7Yt58FzCRPVvWOI7VC0WAYp4QuIhTk2KVMcPDtKJKcCVhsI3HJStT ZcyA== X-Gm-Message-State: AElRT7G58GcOykyqlCCOPIFcU4Q7Ssnt8eLmOTK3OI1BJoDbJn/8dHXZ XG8/cayLBuFOVXmbC+Tjel0L X-Google-Smtp-Source: AG47ELvaeycqBJdXL9tz7S6Ow0e+LcsOXFmLjDEJJEVaVCwL+WHtMs1Iv41AcpfzVCQOIoKk0h59GQ== X-Received: by 10.223.131.37 with SMTP id 34mr16052130wrd.169.1521621288124; Wed, 21 Mar 2018 01:34:48 -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 w29sm3821747wra.84.2018.03.21.01.34.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Mar 2018 01:34:47 -0700 (PDT) Date: Wed, 21 Mar 2018 09:33:55 +0100 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Yongseok Koh , Allain Legacy Cc: adrien.mazarguil@6wind.com, dev@dpdk.org, matt.peters@windriver.com Message-ID: <20180321083355.7muji23cmca5gatw@laranjeiro-vm.dev.6wind.com> References: <20180319163007.11516-1-allain.legacy@windriver.com> <20180320122608.6noglggdsojbtqsx@laranjeiro-vm.dev.6wind.com> <20180320230710.GA49230@yongseok-MBP.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180320230710.GA49230@yongseok-MBP.local> 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: Wed, 21 Mar 2018 08:34:48 -0000 On Tue, Mar 20, 2018 at 04:07:11PM -0700, Yongseok Koh wrote: > On Tue, Mar 20, 2018 at 01:26:08PM +0100, Nélio Laranjeiro wrote: > > 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. > > It is good to have such feature like described in the commit message. And from > Allain's other email, it seems datapath of mlx5 ignores valid hash result from > HW for no reason if the number of queue is one. Single queue means no RSS, it is not the datapath which ignore it, it is the control plane which does not configure it. > Allain, you wanted to fix that, didn't you? >>From the patch above, it seems :) > Nelio, can you please share a bit more idea of what should be done further in > mlx5_flow.c for this, so that Allain can come up with a right patch? The engine is not trivial as it needs to convert flow API to Verbs flows which the restrictions from the MLX5 kernel driver. Trying to give instructions ends by writing it down directly as I need to test them to see if it does not break your requirements also. Allain, I will finalise this patch (today) and make some test, I'll contact you once it is finish to see if the behavior you expect is reached. Thanks, -- Nélio Laranjeiro 6WIND