From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id A91002904 for ; Tue, 27 Sep 2016 16:11:14 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 27 Sep 2016 07:11:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,405,1470726000"; d="scan'208";a="173708885" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.48]) by fmsmga004.fm.intel.com with SMTP; 27 Sep 2016 07:11:12 -0700 Received: by (sSMTP sendmail emulation); Tue, 27 Sep 2016 15:11:10 +0025 Date: Tue, 27 Sep 2016 15:11:10 +0100 From: Bruce Richardson To: Nelio Laranjeiro Cc: dev@dpdk.org, Adrien Mazarguil Message-ID: <20160927141110.GC36420@bricha3-MOBL3> References: <42701f77fcdb03c88ea845071c0710797cfaa549.1473840791.git.nelio.laranjeiro@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42701f77fcdb03c88ea845071c0710797cfaa549.1473840791.git.nelio.laranjeiro@6wind.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. 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:11:15 -0000 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. 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