DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/7] net/bnxt: fix rss hash configuration
Date: Fri, 18 May 2018 07:39:57 -0700	[thread overview]
Message-ID: <20180518144001.24801-4-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20180518144001.24801-1-ajit.khaparde@broadcom.com>

While configuring RSS, the FW needs to know the rss_hash_mode that needs
to be initialized.
Set hash mode to HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT
to allow the FW to use the global mode already configured in the device.

Fixes: bcd4bcc4426f ("net/bnxt: configure RSS")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 1 +
 drivers/net/bnxt/bnxt_vnic.c | 2 ++
 drivers/net/bnxt/bnxt_vnic.h | 1 +
 3 files changed, 4 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 28aa7476d..b285761eb 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1462,6 +1462,7 @@ int bnxt_hwrm_vnic_rss_cfg(struct bnxt *bp,
 	HWRM_PREP(req, VNIC_RSS_CFG);
 
 	req.hash_type = rte_cpu_to_le_32(vnic->hash_type);
+	req.hash_mode_flags = vnic->hash_mode;
 
 	req.ring_grp_tbl_addr =
 	    rte_cpu_to_le_64(vnic->rss_table_dma_addr);
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 733a5a92c..19d06af55 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -49,6 +49,8 @@ void bnxt_init_vnics(struct bnxt *bp)
 		vnic->rss_rule = (uint16_t)HWRM_NA_SIGNATURE;
 		vnic->cos_rule = (uint16_t)HWRM_NA_SIGNATURE;
 		vnic->lb_rule = (uint16_t)HWRM_NA_SIGNATURE;
+		vnic->hash_mode =
+			HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT;
 
 		for (j = 0; j < MAX_QUEUES_PER_VNIC; j++)
 			vnic->fw_grp_ids[j] = (uint16_t)HWRM_NA_SIGNATURE;
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index c60bb543c..c521d7e5a 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -25,6 +25,7 @@ struct bnxt_vnic_info {
 	uint16_t	dflt_ring_grp;
 	uint16_t	mru;
 	uint16_t	hash_type;
+	uint8_t		hash_mode;
 	rte_iova_t	rss_table_dma_addr;
 	uint16_t	*rss_table;
 	rte_iova_t	rss_hash_key_dma_addr;
-- 
2.15.1 (Apple Git-101)

  parent reply	other threads:[~2018-05-18 14:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 14:39 [dpdk-dev] [PATCH 0/7] bnxt patchset Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 1/7] net/bnxt: add fallthrough comments for cascading switch cases Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 2/7] net/bnxt: fix to initialize tx and rx burst for secondary processes Ajit Khaparde
2018-05-18 14:39 ` Ajit Khaparde [this message]
2018-05-18 14:39 ` [dpdk-dev] [PATCH 4/7] net/bnxt: fix to use 1st completion ring for forwarding and async events Ajit Khaparde
2018-05-18 14:39 ` [dpdk-dev] [PATCH 5/7] net/bnxt: fix VF resource allocation Ajit Khaparde
2018-05-18 14:40 ` [dpdk-dev] [PATCH 6/7] net/bnxt: fix xstats support for VF Ajit Khaparde
2018-05-18 14:40 ` [dpdk-dev] [PATCH 7/7] net/bnxt: fix Rx checksum flags Ajit Khaparde
2018-05-18 17:01 ` [dpdk-dev] [PATCH 0/7] bnxt patchset Ferruh Yigit
2018-05-22 18:13   ` [dpdk-dev] [PATCH v2 " Ajit Khaparde
2018-05-22 18:13     ` [dpdk-dev] [PATCH v2 1/7] net/bnxt: add fallthrough comment Ajit Khaparde
2018-05-22 18:13     ` [dpdk-dev] [PATCH v2 2/7] net/bnxt: fix Tx and Rx burst for secondary processes Ajit Khaparde
2018-05-22 18:13     ` [dpdk-dev] [PATCH v2 3/7] net/bnxt: fix RSS hash configuration Ajit Khaparde
2018-05-22 18:13     ` [dpdk-dev] [PATCH v2 4/7] net/bnxt: fix to use 1st cmpl ring for fwd and async event Ajit Khaparde
2018-05-22 18:13     ` [dpdk-dev] [PATCH v2 5/7] net/bnxt: fix VF resource allocation Ajit Khaparde
2018-05-22 18:13     ` [dpdk-dev] [PATCH v2 6/7] net/bnxt: fix xstats support for VF Ajit Khaparde
2018-05-22 18:13     ` [dpdk-dev] [PATCH v2 7/7] net/bnxt: fix Rx checksum flags Ajit Khaparde
2018-05-22 20:42     ` [dpdk-dev] [PATCH v2 0/7] bnxt patchset Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180518144001.24801-4-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).