From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 4EAEA2BA1 for ; Tue, 27 Sep 2016 16:29:57 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id l132so16281034wmf.1 for ; Tue, 27 Sep 2016 07:29:57 -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=ZMtfJB7fEbMDRouXvtsdYIeYgpve6p5a880PpHhY8pU=; b=GJjHdru6LrViro/JMvL6gJIF2C3kCZUUODQt3eozDmp9mDoiNnpDDMfHyjwWU3UjQM sDQ6+fu5nQf1QD9Lshb6YxXMPmuaIaZzFt3bW9tQ3bhKsKxNPueKbjrw7F+YoFKVvYi5 wGbmUlp14A5AUBlEJocoecKWAYDXELWENOb0uyuzEAJDS4MPQ046iz0Ndouow6F0O61n IIi96wuOr6MA0oz1pYKIe1jtXhHdwc+7hUvf3LMl7R2cdGUqVrucmQ0eKlREtNIQVUNC rq4YPE8T9V144/f0tQL/0S0rGICcGUjxGDxxOg/iJ+lXm51unvHV0dgOOrmtFvGxgjY1 D1Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; 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=ZMtfJB7fEbMDRouXvtsdYIeYgpve6p5a880PpHhY8pU=; b=T9f+QxMPmatSGjLV9vuL5gZOjpIpxIYP141BfkAQNBfezE5nBpknaTXCzo1xyJdP0d GBSYh6gng8Lh3Q2XvN884jPnecJFD5X2NWl1ydnmkzQ3eghxIcCgNjyKaJpLcgXKylYJ MzzxIHzqPE5f3hZNqzXlT+OoRBoRFooLy4kCUl5qgqOQOOYStoj/jB3TOW35uyMy9OOY VK/pk+AnMYJZwXZsKxMy68BiEBAo2tadCuaa+QQUzucmMTfpIo3zzWI8MJB5b369tWvF SodYueFg4bjBUs1KXc7AxBVvQQAzrf1CgSncZ9N/5PXoHFIjh8ilLtFklyClQSDfUi7e r2cw== X-Gm-Message-State: AA6/9Rm1AOPVGkv7DLaMWnTuuyqNt03sj2NnZDUKFx/jNgYLJU3QQ5Frrs8bVykZT45yDIO5 X-Received: by 10.28.229.131 with SMTP id c125mr3228265wmh.97.1474986596863; Tue, 27 Sep 2016 07:29:56 -0700 (PDT) Received: from autoinstall.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id 74sm3453177wmi.7.2016.09.27.07.29.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Sep 2016 07:29:56 -0700 (PDT) Date: Tue, 27 Sep 2016 16:29:49 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Bruce Richardson Cc: dev@dpdk.org, Adrien Mazarguil Message-ID: <20160927142949.GE32397@autoinstall.dev.6wind.com> References: <42701f77fcdb03c88ea845071c0710797cfaa549.1473840791.git.nelio.laranjeiro@6wind.com> <20160927141110.GC36420@bricha3-MOBL3> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160927141110.GC36420@bricha3-MOBL3> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] net/mlx5: return RSS hash result in mbuf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 14:29:57 -0000 Hi Bruce, On Tue, Sep 27, 2016 at 03:11:10PM +0100, Bruce Richardson wrote: > On Wed, Sep 14, 2016 at 10:16:05AM +0200, Nelio Laranjeiro wrote: > > Signed-off-by: Nelio Laranjeiro > > --- > > drivers/net/mlx5/mlx5_rxq.c | 1 + > > drivers/net/mlx5/mlx5_rxtx.c | 6 +++++- > > drivers/net/mlx5/mlx5_rxtx.h | 2 ++ > > 3 files changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c > > index f6f4315..65c264b 100644 > > --- a/drivers/net/mlx5/mlx5_rxq.c > > +++ b/drivers/net/mlx5/mlx5_rxq.c > > @@ -926,6 +926,7 @@ rxq_ctrl_setup(struct rte_eth_dev *dev, struct rxq_ctrl *rxq_ctrl, > > .rxq = { > > .elts_n = log2above(desc), > > .mp = mp, > > + .rss_hash = !!(priv->rxqs_n > 1), > > }, > > Two comments on this: > 1. I don't think the !! is needed, since this is a comparison which will result > in 0 or 1, rather than an int value that needs to be clamped to those values. Ok for this one. > 2. Why limit the use of RSS to when there is more than one RX queues? Sometimes > it might be useful to have a precomputed hash for a packet even when not > spreading packets among RX queues. For example, when using a single RX queue, > but doing a hash table lookup for each packet, the RSS value could be used > as the lookup hash. > > /Bruce ConnectX-4 NICs does not return a hash value for a single queue as software does not request RSS in this situation, that is why it is not filled. I will send a v2 to also fix a bug discovered since concerning the hash result which is not retrieve from the right place when Completion Queue Entry is compressed. Regards, -- Nélio Laranjeiro 6WIND