From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by dpdk.org (Postfix) with ESMTP id 19C9BAAF4 for ; Mon, 19 Mar 2018 17:30:25 +0100 (CET) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id w2JGULBK021549 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 19 Mar 2018 09:30:21 -0700 (PDT) Received: from yow-alegacy-vm3.wrs.com (128.224.141.34) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 19 Mar 2018 09:30:21 -0700 From: Allain Legacy To: , , CC: , Date: Mon, 19 Mar 2018 11:30:07 -0500 Message-ID: <20180319163007.11516-1-allain.legacy@windriver.com> X-Mailer: git-send-email 2.12.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [128.224.141.34] Subject: [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: Mon, 19 Mar 2018 16:30:26 -0000 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