From: Qi Zhang <qi.z.zhang@intel.com>
To: beilei.xing@intel.com
Cc: xiaolong.ye@intel.com, dev@dpdk.org,
Qi Zhang <qi.z.zhang@intel.com>, Jeff Guo <jia.guo@intel.com>,
Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Subject: [dpdk-dev] [PATCH 5/6 v2] common/iavf: add advanced RSS input set change support
Date: Mon, 13 Apr 2020 17:32:55 +0800 [thread overview]
Message-ID: <20200413093256.20767-6-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20200413093256.20767-1-qi.z.zhang@intel.com>
Add new ops and a new VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF flag to support
VF to add or del a specific rss configuration by virtchnl.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/common/iavf/virtchnl.h | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index 043948eb7..c7c7fcc9c 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -135,6 +135,8 @@ enum virtchnl_ops {
VIRTCHNL_OP_DCF_GET_VSI_MAP = 42,
VIRTCHNL_OP_DCF_GET_PKG_INFO = 43,
VIRTCHNL_OP_GET_SUPPORTED_RXDIDS = 44,
+ VIRTCHNL_OP_ADD_RSS_CFG = 45,
+ VIRTCHNL_OP_DEL_RSS_CFG = 46,
};
/* These macros are used to generate compilation errors if a structure/union
@@ -251,6 +253,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
#define VIRTCHNL_VF_OFFLOAD_USO 0X02000000
#define VIRTCHNL_VF_CAP_DCF 0X40000000
#define VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC 0X04000000
+#define VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF 0X08000000
/* 0X80000000 is reserved */
/* Define below the capability flags that are not offloads */
@@ -541,6 +544,14 @@ struct virtchnl_rss_hena {
VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_rss_hena);
+/* Type of RSS algorithm */
+enum virtchnl_rss_algorithm {
+ VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC = 0,
+ VIRTCHNL_RSS_ALG_R_ASYMMETRIC = 1,
+ VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC = 2,
+ VIRTCHNL_RSS_ALG_XOR_SYMMETRIC = 3,
+};
+
/* This is used by PF driver to enforce how many channels can be supported.
* When ADQ_V2 capability is negotiated, it will allow 16 channels otherwise
* PF driver will allow only max 4 channels
@@ -926,6 +937,13 @@ struct virtchnl_proto_hdrs {
VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
+struct virtchnl_rss_cfg {
+ struct virtchnl_proto_hdrs proto_hdrs; /* protocol headers */
+ enum virtchnl_rss_algorithm rss_algorithm; /* rss algorithm type */
+ u8 reserved[128]; /* reserve for future */
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(2444, virtchnl_rss_cfg);
/**
* virtchnl_vc_validate_vf_msg
* @ver: Virtchnl version info
@@ -940,7 +958,7 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
u8 *msg, u16 msglen)
{
bool err_msg_format = false;
- int valid_len = 0;
+ u32 valid_len = 0;
/* Validate message length. */
switch (v_opcode) {
@@ -1112,6 +1130,10 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
break;
case VIRTCHNL_OP_GET_SUPPORTED_RXDIDS:
break;
+ case VIRTCHNL_OP_ADD_RSS_CFG:
+ case VIRTCHNL_OP_DEL_RSS_CFG:
+ valid_len = sizeof(struct virtchnl_rss_cfg);
+ break;
/* These are always errors coming from the VF. */
case VIRTCHNL_OP_EVENT:
case VIRTCHNL_OP_UNKNOWN:
--
2.13.6
next prev parent reply other threads:[~2020-04-13 9:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 9:32 [dpdk-dev] [PATCH 0/6 v2] iavf share code update Qi Zhang
2020-04-13 9:32 ` [dpdk-dev] [PATCH 1/6 v2] common/iavf: add PTYPE definition Qi Zhang
2020-04-13 9:32 ` [dpdk-dev] [PATCH 2/6 v2] common/iavf: add DDP package query in virtual channel Qi Zhang
2020-04-13 9:32 ` [dpdk-dev] [PATCH 3/6 v2] common/iavf: add virtual channel support for Flex RXD Qi Zhang
2020-04-13 9:32 ` [dpdk-dev] [PATCH 4/6 v2] common/iavf: add virtual channel protocol header Qi Zhang
2020-04-13 9:32 ` Qi Zhang [this message]
2020-04-13 9:32 ` [dpdk-dev] [PATCH 6/6 v2] common/iavf: add flow director support in virtual channel Qi Zhang
2020-04-13 14:35 ` [dpdk-dev] [PATCH 0/6 v2] iavf share code update Ye Xiaolong
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=20200413093256.20767-6-qi.z.zhang@intel.com \
--to=qi.z.zhang@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jia.guo@intel.com \
--cc=paul.m.stillwell.jr@intel.com \
--cc=xiaolong.ye@intel.com \
/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).