DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hurd <stephen.hurd@broadcom.com>
To: dev@dpdk.org, ajit.khaparde@broadcom.com, bruce.richardson@intel.com
Subject: [dpdk-dev] [PATCH v6 21/38] bnxt: add HWRM API to configure RSS
Date: Wed, 15 Jun 2016 14:23:21 -0700	[thread overview]
Message-ID: <1466025818-124223-22-git-send-email-stephen.hurd@broadcom.com> (raw)
In-Reply-To: <1466025818-124223-1-git-send-email-stephen.hurd@broadcom.com>

From: Ajit Khaparde <ajit.khaparde@broadcom.com>

A VNIC represents a virtual interface. It is a resource in the RX path
of the chip and is used to setup various target actions such as RSS,
MAC filtering etc.. for the physical function in use.

New HWRM call:
bnxt_hwrm_vnic_rss_cfg:
	Used to enable RSS configuration of the VNIC.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>

--
v5:
Expand the commit log
Reorder footer
---
 drivers/net/bnxt/bnxt_hwrm.c           | 24 ++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_hwrm.h           |  2 ++
 drivers/net/bnxt/hsi_struct_def_dpdk.h |  1 +
 3 files changed, 27 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 5a5063f..29b0729 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -646,6 +646,30 @@ int bnxt_hwrm_vnic_free(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 	return rc;
 }
 
+int bnxt_hwrm_vnic_rss_cfg(struct bnxt *bp,
+			   struct bnxt_vnic_info *vnic)
+{
+	int rc = 0;
+	struct hwrm_vnic_rss_cfg_input req = {.req_type = 0 };
+	struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr;
+
+	HWRM_PREP(req, VNIC_RSS_CFG, -1, resp);
+
+	req.hash_type = rte_cpu_to_le_32(vnic->hash_type);
+
+	req.ring_grp_tbl_addr =
+	    rte_cpu_to_le_64(vnic->rss_table_dma_addr);
+	req.hash_key_tbl_addr =
+	    rte_cpu_to_le_64(vnic->rss_hash_key_dma_addr);
+	req.rss_ctx_idx = rte_cpu_to_le_16(vnic->fw_rss_cos_lb_ctx);
+
+	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
+
+	HWRM_CHECK_RESULT;
+
+	return rc;
+}
+
 /*
  * HWRM utility functions
  */
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index fbb8aba..8c7b939 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -68,6 +68,8 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic);
 int bnxt_hwrm_vnic_ctx_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic);
 int bnxt_hwrm_vnic_ctx_free(struct bnxt *bp, struct bnxt_vnic_info *vnic);
 int bnxt_hwrm_vnic_free(struct bnxt *bp, struct bnxt_vnic_info *vnic);
+int bnxt_hwrm_vnic_rss_cfg(struct bnxt *bp,
+			   struct bnxt_vnic_info *vnic);
 
 int bnxt_clear_all_hwrm_stat_ctxs(struct bnxt *bp);
 void bnxt_free_hwrm_resources(struct bnxt *bp);
diff --git a/drivers/net/bnxt/hsi_struct_def_dpdk.h b/drivers/net/bnxt/hsi_struct_def_dpdk.h
index 6412df2..72d4984 100644
--- a/drivers/net/bnxt/hsi_struct_def_dpdk.h
+++ b/drivers/net/bnxt/hsi_struct_def_dpdk.h
@@ -92,6 +92,7 @@ struct ctx_hw_stats64 {
 #define HWRM_VNIC_ALLOC			(UINT32_C(0x40))
 #define HWRM_VNIC_FREE			(UINT32_C(0x41))
 #define HWRM_VNIC_CFG			(UINT32_C(0x42))
+#define HWRM_VNIC_RSS_CFG		(UINT32_C(0x46))
 #define HWRM_VNIC_RSS_COS_LB_CTX_ALLOC	(UINT32_C(0x70))
 #define HWRM_VNIC_RSS_COS_LB_CTX_FREE	(UINT32_C(0x71))
 #define HWRM_CFA_L2_FILTER_ALLOC	(UINT32_C(0x90))
-- 
1.9.1

  parent reply	other threads:[~2016-06-15 21:24 UTC|newest]

Thread overview: 132+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 22:08 [dpdk-dev] [PATCH v4 01/39] bnxt: new driver for Broadcom NetXtreme-C devices Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 02/39] bnxt: add HWRM init code Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 03/39] bnxt: add driver register/unregister support Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 04/39] bnxt: add dev infos get operation Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 05/39] bnxt: add dev configure operation Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 06/39] bnxt: add vnic functions and structs Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 07/39] bnxt: declare ring structs and free() func Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 08/39] bnxt: add completion ring support Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 09/39] bnxt: add L2 filter alloc/init/free Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 10/39] bnxt: add Tx queue operations (nonfunctional) Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 11/39] bnxt: add Rx queue create/destroy operations Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 12/39] bnxt: Add statistics operations Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 13/39] bnxt: initial Tx code implementation Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 14/39] bnxt: initial Rx " Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 15/39] bnxt: Code to alloc/free ring Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 16/39] bnxt: add HWRM function reset command Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 17/39] bnxt: add HWRM vnic alloc function Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 18/39] bnxt: add HWRM vnic free function Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 19/39] bnxt: add HWRM vnic configure function Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 20/39] bnxt: add API to allow configuration of vnic Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 21/39] bnxt: add HWRM API to configure RSS Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 22/39] bnxt: add API for L2 Rx mask set/clear functions Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 23/39] bnxt: add HWRM stats context allocation Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 24/39] bnxt: add HWRM ring alloc/free functions Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 25/39] bnxt: add ring group " Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 26/39] bnxt: add HWRM stat context free function Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 27/39] bnxt: Add HWRM API to set and clear filters Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 28/39] bnxt: add ring alloc, free and group init Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 29/39] bnxt: add HWRM port PHY config call and helpers Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 30/39] bnxt: add start/stop/link update operations Stephen Hurd
2016-06-08 10:02   ` Bruce Richardson
2016-06-08 10:41     ` Bruce Richardson
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 31/39] bnxt: add promiscuous enable/disable operations Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 32/39] bnxt: add all multicast " Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 33/39] bnxt: free memory in close operation Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 34/39] bnxt: add MAC address add/remove dev_ops Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 35/39] bnxt: add set link up/down operations Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 36/39] bnxt: add reta update/query operations Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 37/39] bnxt: add RSS device operations Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 38/39] bnxt: add flow control operations Stephen Hurd
2016-06-06 22:08 ` [dpdk-dev] [PATCH v4 39/39] bnxt: Replace bnxt_ring_struct with bnxt_ring Stephen Hurd
2016-06-07  6:25 ` [dpdk-dev] [PATCH v4 01/39] bnxt: new driver for Broadcom NetXtreme-C devices Thomas Monjalon
2016-06-08 10:31   ` Bruce Richardson
2016-06-08 10:21 ` Bruce Richardson
2016-06-08 10:41   ` Bruce Richardson
2016-06-14 13:14     ` Bruce Richardson
2016-06-14 22:55 ` [dpdk-dev] [PATCH v5 01/38] " Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 02/38] bnxt: add HWRM init code Stephen Hurd
2016-06-15 16:25     ` Ferruh Yigit
2016-06-15 20:28       ` Stephen Hurd
2016-06-16  9:46         ` Bruce Richardson
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 03/38] bnxt: add driver register/unregister support Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 04/38] bnxt: add dev infos get operation Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 05/38] bnxt: add dev configure operation Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 06/38] bnxt: add vnic functions and structs Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 07/38] bnxt: declare generic ring structs and free() func Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 08/38] bnxt: add completion ring support Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 09/38] bnxt: add L2 filter alloc/init/free Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 10/38] bnxt: add Tx queue operations (nonfunctional) Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 11/38] bnxt: add Rx queue create/destroy operations Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 12/38] bnxt: add statistics operations Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 13/38] bnxt: add initial Tx code implementation Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 14/38] bnxt: add initial Rx " Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 15/38] bnxt: add code to alloc/free Tx Rx and cmpl rings Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 16/38] bnxt: add HWRM function reset command Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 17/38] bnxt: add HWRM vnic alloc function Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 18/38] bnxt: add HWRM vnic free function Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 19/38] bnxt: add HWRM vnic configure function Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 20/38] bnxt: add API to allow configuration of vnic Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 21/38] bnxt: add HWRM API to configure RSS Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 22/38] bnxt: add API for L2 Rx mask set/clear functions Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 23/38] bnxt: add HWRM API for stats context allocation Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 24/38] bnxt: add HWRM ring alloc/free functions Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 25/38] bnxt: add ring group " Stephen Hurd
2016-06-14 22:55   ` [dpdk-dev] [PATCH v5 26/38] bnxt: add HWRM stat context free function Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 27/38] bnxt: add HWRM API to set and clear filters Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 28/38] bnxt: allocate and free all HWRM rings and groups Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 29/38] bnxt: add HWRM port PHY config call and helpers Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 30/38] bnxt: add start/stop/link update operations Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 31/38] bnxt: add promiscuous enable/disable operations Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 32/38] bnxt: add all multicast " Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 33/38] bnxt: free memory in close operation Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 34/38] bnxt: add MAC address add/remove dev ops Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 35/38] bnxt: add set link up/down operations Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 36/38] bnxt: add reta update/query operations Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 37/38] bnxt: add RSS device operations Stephen Hurd
2016-06-14 22:56   ` [dpdk-dev] [PATCH v5 38/38] bnxt: add flow control operations Stephen Hurd
2016-06-15 15:28   ` [dpdk-dev] [PATCH v5 01/38] bnxt: new driver for Broadcom NetXtreme-C devices Bruce Richardson
2016-06-15 15:30   ` Bruce Richardson
2016-06-15 21:23   ` [dpdk-dev] [PATCH v6 00/38] new bnxt poll mode driver library Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 01/38] bnxt: new driver for Broadcom NetXtreme-C devices Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 02/38] bnxt: add HWRM init code Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 03/38] bnxt: add driver register/unregister support Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 04/38] bnxt: add dev infos get operation Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 05/38] bnxt: add dev configure operation Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 06/38] bnxt: add vnic functions and structs Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 07/38] bnxt: declare generic ring structs and free() func Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 08/38] bnxt: add completion ring support Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 09/38] bnxt: add L2 filter alloc/init/free Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 10/38] bnxt: add Tx queue operations (nonfunctional) Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 11/38] bnxt: add Rx queue create/destroy operations Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 12/38] bnxt: add statistics operations Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 13/38] bnxt: add initial Tx code implementation Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 14/38] bnxt: add initial Rx " Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 15/38] bnxt: add code to alloc/free Tx Rx and cmpl rings Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 16/38] bnxt: add HWRM function reset command Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 17/38] bnxt: add HWRM vnic alloc function Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 18/38] bnxt: add HWRM vnic free function Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 19/38] bnxt: add HWRM vnic configure function Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 20/38] bnxt: add API to allow configuration of vnic Stephen Hurd
2016-06-15 21:23     ` Stephen Hurd [this message]
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 22/38] bnxt: add API for L2 Rx mask set/clear functions Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 23/38] bnxt: add HWRM API for stats context allocation Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 24/38] bnxt: add HWRM ring alloc/free functions Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 25/38] bnxt: add ring group " Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 26/38] bnxt: add HWRM stat context free function Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 27/38] bnxt: add HWRM API to set and clear filters Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 28/38] bnxt: allocate and free all HWRM rings and groups Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 29/38] bnxt: add HWRM port PHY config call and helpers Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 30/38] bnxt: add start/stop/link update operations Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 31/38] bnxt: add promiscuous enable/disable operations Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 32/38] bnxt: add all multicast " Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 33/38] bnxt: free memory in close operation Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 34/38] bnxt: add MAC address add/remove dev ops Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 35/38] bnxt: add set link up/down operations Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 36/38] bnxt: add reta update/query operations Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 37/38] bnxt: add RSS device operations Stephen Hurd
2016-06-15 21:23     ` [dpdk-dev] [PATCH v6 38/38] bnxt: add flow control operations Stephen Hurd
2016-06-16 14:24     ` [dpdk-dev] [PATCH v6 00/38] new bnxt poll mode driver library Bruce Richardson
2016-06-16 18:51       ` Ajit Khaparde
2016-06-21 14:25         ` Ajit Khaparde
2016-06-21 14:46           ` Bruce Richardson

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=1466025818-124223-22-git-send-email-stephen.hurd@broadcom.com \
    --to=stephen.hurd@broadcom.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=bruce.richardson@intel.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).