DPDK patches and discussions
 help / color / mirror / Atom feed
From: Helin Zhang <helin.zhang@intel.com>
To: dev@dpdk.org
Cc: Helin Zhang <helin.zhang@intel.com>
Subject: [dpdk-dev] [PATCH v2 14/15] i40e/base: add RSS config to virtual channel
Date: Tue, 24 May 2016 14:23:08 +0800	[thread overview]
Message-ID: <1464070989-32726-15-git-send-email-helin.zhang@intel.com> (raw)
In-Reply-To: <1464070989-32726-1-git-send-email-helin.zhang@intel.com>

It add opcodes and structures to support RSS configuration
by PF driver on behalf of the VF drivers.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_virtchnl.h | 45 ++++++++++++++++++++++++++++++++---
 1 file changed, 42 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_virtchnl.h b/drivers/net/i40e/base/i40e_virtchnl.h
index 26208f3..fd51ec3 100644
--- a/drivers/net/i40e/base/i40e_virtchnl.h
+++ b/drivers/net/i40e/base/i40e_virtchnl.h
@@ -87,10 +87,15 @@ enum i40e_virtchnl_ops {
 	I40E_VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE = 14,
 	I40E_VIRTCHNL_OP_GET_STATS = 15,
 	I40E_VIRTCHNL_OP_FCOE = 16,
-	I40E_VIRTCHNL_OP_EVENT = 17,
+	I40E_VIRTCHNL_OP_EVENT = 17, /* must ALWAYS be 17 */
 #ifdef I40E_SOL_VF_SUPPORT
 	I40E_VIRTCHNL_OP_GET_ADDNL_SOL_CONFIG = 19,
 #endif
+	I40E_VIRTCHNL_OP_CONFIG_RSS_KEY = 23,
+	I40E_VIRTCHNL_OP_CONFIG_RSS_LUT = 24,
+	I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS = 25,
+	I40E_VIRTCHNL_OP_SET_RSS_HENA = 26,
+
 };
 
 /* Virtual channel message descriptor. This overlays the admin queue
@@ -164,6 +169,7 @@ struct i40e_virtchnl_vsi_resource {
 #define I40E_VIRTCHNL_VF_OFFLOAD_VLAN		0x00010000
 #define I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING	0x00020000
 #define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2	0x00040000
+#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF		0X00080000
 
 struct i40e_virtchnl_vf_resource {
 	u16 num_vsis;
@@ -172,8 +178,8 @@ struct i40e_virtchnl_vf_resource {
 	u16 max_mtu;
 
 	u32 vf_offload_flags;
-	u32 max_fcoe_contexts;
-	u32 max_fcoe_filters;
+	u32 rss_key_size;
+	u32 rss_lut_size;
 
 	struct i40e_virtchnl_vsi_resource vsi_res[1];
 };
@@ -349,6 +355,39 @@ struct i40e_virtchnl_promisc_info {
  * PF replies with struct i40e_eth_stats in an external buffer.
  */
 
+/* I40E_VIRTCHNL_OP_CONFIG_RSS_KEY
+ * I40E_VIRTCHNL_OP_CONFIG_RSS_LUT
+ * VF sends these messages to configure RSS. Only supported if both PF
+ * and VF drivers set the I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF bit during
+ * configuration negotiation. If this is the case, then the rss fields in
+ * the vf resource struct are valid.
+ * Both the key and LUT are initialized to 0 by the PF, meaning that
+ * RSS is effectively disabled until set up by the VF.
+ */
+struct i40e_virtchnl_rss_key {
+	u16 vsi_id;
+	u16 key_len;
+	u8 key[1];         /* RSS hash key, packed bytes */
+};
+
+struct i40e_virtchnl_rss_lut {
+	u16 vsi_id;
+	u16 lut_entries;
+	u8 lut[1];        /* RSS lookup table*/
+};
+
+/* I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS
+ * I40E_VIRTCHNL_OP_SET_RSS_HENA
+ * VF sends these messages to get and set the hash filter enable bits for RSS.
+ * By default, the PF sets these to all possible traffic types that the
+ * hardware supports. The VF can query this value if it wants to change the
+ * traffic types that are hashed by the hardware.
+ * Traffic types are defined in the i40e_filter_pctype enum in i40e_type.h
+ */
+struct i40e_virtchnl_rss_hena {
+	u64 hena;
+};
+
 /* I40E_VIRTCHNL_OP_EVENT
  * PF sends this message to inform the VF driver of events that may affect it.
  * No direct response is expected from the VF, though it may generate other
-- 
2.5.0

  parent reply	other threads:[~2016-05-24  6:23 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05  8:53 [dpdk-dev] [PATCH 00/15] i40e base driver update Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 01/15] i40e/base: remove HMC AQ APIs Helin Zhang
2016-05-09 16:14   ` Bruce Richardson
2016-05-09 16:16     ` Bruce Richardson
2016-05-05  8:53 ` [dpdk-dev] [PATCH 02/15] i40e/base: refactor NVM update status info Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 03/15] i40e/base: refactor NVM update event handling Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 04/15] i40e/base: code style fixes Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 05/15] i40e/base: fixup Geneve VNI for HW use Helin Zhang
2016-05-10 15:53   ` Bruce Richardson
2016-05-05  8:53 ` [dpdk-dev] [PATCH 06/15] i40e/base: expose mirroring config Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 07/15] i40e/base: fix problematic mirror rule ID check Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 08/15] i40e/base: add new devices Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 09/15] i40e/base: fix the number of MSIX vector Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 10/15] i40e/base: fix debug output Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 11/15] i40e/base: add more device capabilities Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 12/15] i40e/base: increase supported AQ API version Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 13/15] i40e/base: add input set mask definitions Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 14/15] i40e/base: add RSS config to virtual channel Helin Zhang
2016-05-05  8:53 ` [dpdk-dev] [PATCH 15/15] i40e/base: add capability of disabling all link Helin Zhang
2016-05-24  6:22 ` [dpdk-dev] [PATCH v2 00/15] i40e base driver update Helin Zhang
2016-05-24  6:22   ` [dpdk-dev] [PATCH v2 01/15] i40e/base: remove HMC AQ APIs Helin Zhang
2016-06-02  2:08     ` Gu, YongjieX
2016-06-14 10:14     ` Bruce Richardson
2016-05-24  6:22   ` [dpdk-dev] [PATCH v2 02/15] i40e/base: move field of NVM update status info Helin Zhang
2016-05-24  6:22   ` [dpdk-dev] [PATCH v2 03/15] i40e/base: refactor NVM update command processing Helin Zhang
2016-05-24  6:22   ` [dpdk-dev] [PATCH v2 04/15] i40e/base: trim the code Helin Zhang
2016-06-14 10:16     ` Bruce Richardson
2016-05-24  6:22   ` [dpdk-dev] [PATCH v2 05/15] i40e/base: fixup Geneve VNI for HW use Helin Zhang
2016-06-14 10:25     ` Bruce Richardson
2016-05-24  6:23   ` [dpdk-dev] [PATCH v2 06/15] i40e/base: expose mirroring config Helin Zhang
2016-05-24  6:23   ` [dpdk-dev] [PATCH v2 07/15] i40e/base: fix problematic mirror rule ID check Helin Zhang
2016-05-24  6:23   ` [dpdk-dev] [PATCH v2 08/15] i40e/base: add new devices Helin Zhang
2016-05-24  6:23   ` [dpdk-dev] [PATCH v2 09/15] i40e/base: fix the number of MSIX vector Helin Zhang
2016-05-24  6:23   ` [dpdk-dev] [PATCH v2 10/15] i40e/base: fix debug output Helin Zhang
2016-05-24  6:23   ` [dpdk-dev] [PATCH v2 11/15] i40e/base: add more device capabilities Helin Zhang
2016-05-24  6:23   ` [dpdk-dev] [PATCH v2 12/15] i40e/base: increase supported AQ API version Helin Zhang
2016-05-24  6:23   ` [dpdk-dev] [PATCH v2 13/15] i40e/base: add input set mask definitions Helin Zhang
2016-05-24  6:23   ` Helin Zhang [this message]
2016-05-24  6:23   ` [dpdk-dev] [PATCH v2 15/15] i40e/base: add capability of disabling all link Helin Zhang
2016-06-14 13:48     ` Bruce Richardson
2016-06-06  7:53   ` [dpdk-dev] [PATCH v2 00/15] i40e base driver update Lu, Wenzhuo
2016-06-14 14:01     ` 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=1464070989-32726-15-git-send-email-helin.zhang@intel.com \
    --to=helin.zhang@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).