From: Qi Zhang <qi.z.zhang@intel.com>
To: beilei.xing@intel.com
Cc: dev@dpdk.org, ferruh.yigit@intel.com, helin.zhang@intel.com,
Qi Zhang <qi.z.zhang@intel.com>
Subject: [dpdk-dev] [PATCH 05/20] net/i40e/base: add admin queue definitions for cloud filters
Date: Tue, 25 Sep 2018 10:34:27 +0800 [thread overview]
Message-ID: <20180925023442.134705-6-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20180925023442.134705-1-qi.z.zhang@intel.com>
Add new admin queue definitions and extended fields for cloud
filter support. Define big buffer for extended general fields
in Add/Remove Cloud filters command.
Also rename i40e_aqc_add_remove_cloud_filters_element_data to
i40e_aq__cloud_filters_element_data.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 57 +++++++++++++++++++++++++++++++--
drivers/net/i40e/base/i40e_common.c | 14 ++++----
drivers/net/i40e/base/i40e_prototype.h | 4 +--
3 files changed, 64 insertions(+), 11 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index 2d714ec5e..d02890f98 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1358,6 +1358,7 @@ struct i40e_aqc_add_remove_cloud_filters {
I40E_AQC_ADD_CLOUD_CMD_SEID_NUM_SHIFT)
u8 big_buffer_flag;
#define I40E_AQC_ADD_REM_CLOUD_CMD_BIG_BUFFER 1
+#define I40E_AQC_ADD_CLOUD_CMD_BB 1
u8 reserved2[3];
__le32 addr_high;
__le32 addr_low;
@@ -1365,7 +1366,7 @@ struct i40e_aqc_add_remove_cloud_filters {
I40E_CHECK_CMD_LENGTH(i40e_aqc_add_remove_cloud_filters);
-struct i40e_aqc_add_remove_cloud_filters_element_data {
+struct i40e_aqc_cloud_filters_element_data {
u8 outer_mac[6];
u8 inner_mac[6];
__le16 inner_vlan;
@@ -1396,6 +1397,9 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
#define I40E_AQC_ADD_CLOUD_FILTER_OMAC_TEN_ID_IMAC 0x000B
#define I40E_AQC_ADD_CLOUD_FILTER_IIP 0x000C
/* 0x0010 to 0x0017 is for custom filters */
+#define I40E_AQC_ADD_CLOUD_FILTER_IP_PORT 0x0010 /* Dest IP + L4 Port */
+#define I40E_AQC_ADD_CLOUD_FILTER_MAC_PORT 0x0011 /* Dest MAC + L4 Port */
+#define I40E_AQC_ADD_CLOUD_FILTER_MAC_VLAN_PORT 0x0012 /* Dest MAC + VLAN + L4 Port */
#define I40E_AQC_ADD_CLOUD_FLAGS_TO_QUEUE 0x0080
#define I40E_AQC_ADD_CLOUD_VNK_SHIFT 6
@@ -1435,7 +1439,7 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
* DCR288
*/
struct i40e_aqc_add_rm_cloud_filt_elem_ext {
- struct i40e_aqc_add_remove_cloud_filters_element_data element;
+ struct i40e_aqc_cloud_filters_element_data element;
u16 general_fields[32];
#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD0 0
#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD1 1
@@ -1470,6 +1474,49 @@ struct i40e_aqc_add_rm_cloud_filt_elem_ext {
#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD7 30
};
+I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_cloud_filters_element_data);
+
+/* i40e_aqc_cloud_filters_element_bb is used when
+ * I40E_AQC_CLOUD_CMD_BB flag is set.
+ */
+struct i40e_aqc_cloud_filters_element_bb {
+ struct i40e_aqc_cloud_filters_element_data element;
+ u16 general_fields[32];
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD0 0
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD1 1
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD2 2
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD0 3
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD1 4
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD2 5
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X12_WORD0 6
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X12_WORD1 7
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X12_WORD2 8
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X13_WORD0 9
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X13_WORD1 10
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X13_WORD2 11
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X14_WORD0 12
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X14_WORD1 13
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X14_WORD2 14
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD0 15
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD1 16
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD2 17
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD3 18
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD4 19
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD5 20
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD6 21
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD7 22
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD0 23
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD1 24
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD2 25
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD3 26
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD4 27
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD5 28
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD6 29
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD7 30
+};
+
+I40E_CHECK_STRUCT_LEN(0x80, i40e_aqc_cloud_filters_element_bb);
+
struct i40e_aqc_remove_cloud_filters_completion {
__le16 perfect_ovlan_used;
__le16 perfect_ovlan_free;
@@ -1490,6 +1537,8 @@ struct i40e_filter_data {
u8 input[3];
};
+I40E_CHECK_STRUCT_LEN(4, i40e_filter_data);
+
struct i40e_aqc_replace_cloud_filters_cmd {
u8 valid_flags;
#define I40E_AQC_REPLACE_L1_FILTER 0x0
@@ -1505,6 +1554,8 @@ struct i40e_aqc_replace_cloud_filters_cmd {
__le32 addr_low;
};
+I40E_CHECK_CMD_LENGTH(i40e_aqc_replace_cloud_filters_cmd);
+
struct i40e_aqc_replace_cloud_filters_cmd_buf {
u8 data[32];
/* Filter type INPUT codes*/
@@ -1529,6 +1580,8 @@ struct i40e_aqc_replace_cloud_filters_cmd_buf {
struct i40e_filter_data filters[8];
};
+I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_replace_cloud_filters_cmd_buf);
+
/* Add Mirror Rule (indirect or direct 0x0260)
* Delete Mirror Rule (indirect or direct 0x0261)
* note: some rule types (4,5) do not use an external buffer.
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 856e7bef6..77af8507f 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -5686,10 +5686,10 @@ void i40e_add_filter_to_drop_tx_flow_control_frames(struct i40e_hw *hw,
* to be shifted 1 byte over from the VxLAN VNI
**/
STATIC void i40e_fix_up_geneve_vni(
- struct i40e_aqc_add_remove_cloud_filters_element_data *filters,
+ struct i40e_aqc_cloud_filters_element_data *filters,
u8 filter_count)
{
- struct i40e_aqc_add_remove_cloud_filters_element_data *f = filters;
+ struct i40e_aqc_cloud_filters_element_data *f = filters;
int i;
for (i = 0; i < filter_count; i++) {
@@ -5714,13 +5714,13 @@ STATIC void i40e_fix_up_geneve_vni(
* @filter_count: number of filters contained in the buffer
*
* Set the cloud filters for a given VSI. The contents of the
- * i40e_aqc_add_remove_cloud_filters_element_data are filled
+ * i40e_aqc_cloud_filters_element_data are filled
* in by the caller of the function.
*
**/
enum i40e_status_code i40e_aq_add_cloud_filters(struct i40e_hw *hw,
u16 seid,
- struct i40e_aqc_add_remove_cloud_filters_element_data *filters,
+ struct i40e_aqc_cloud_filters_element_data *filters,
u8 filter_count)
{
struct i40e_aq_desc desc;
@@ -5806,13 +5806,13 @@ enum i40e_status_code i40e_aq_add_cloud_filters_big_buffer(struct i40e_hw *hw,
* @filter_count: number of filters contained in the buffer
*
* Remove the cloud filters for a given VSI. The contents of the
- * i40e_aqc_add_remove_cloud_filters_element_data are filled
- * in by the caller of the function.
+ * i40e_aqc_cloud_filters_element_data are filled in by the caller
+ * of the function.
*
**/
enum i40e_status_code i40e_aq_remove_cloud_filters(struct i40e_hw *hw,
u16 seid,
- struct i40e_aqc_add_remove_cloud_filters_element_data *filters,
+ struct i40e_aqc_cloud_filters_element_data *filters,
u8 filter_count)
{
struct i40e_aq_desc desc;
diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
index 6331aadf2..bdab055af 100644
--- a/drivers/net/i40e/base/i40e_prototype.h
+++ b/drivers/net/i40e/base/i40e_prototype.h
@@ -379,7 +379,7 @@ enum i40e_status_code i40e_read_lldp_cfg(struct i40e_hw *hw,
struct i40e_lldp_variables *lldp_cfg);
enum i40e_status_code i40e_aq_add_cloud_filters(struct i40e_hw *hw,
u16 vsi,
- struct i40e_aqc_add_remove_cloud_filters_element_data *filters,
+ struct i40e_aqc_cloud_filters_element_data *filters,
u8 filter_count);
enum i40e_status_code i40e_aq_add_cloud_filters_big_buffer(struct i40e_hw *hw,
u16 seid,
@@ -387,7 +387,7 @@ enum i40e_status_code i40e_aq_add_cloud_filters_big_buffer(struct i40e_hw *hw,
u8 filter_count);
enum i40e_status_code i40e_aq_remove_cloud_filters(struct i40e_hw *hw,
u16 vsi,
- struct i40e_aqc_add_remove_cloud_filters_element_data *filters,
+ struct i40e_aqc_cloud_filters_element_data *filters,
u8 filter_count);
enum i40e_status_code i40e_aq_remove_cloud_filters_big_buffer(
struct i40e_hw *hw, u16 seid,
--
2.13.6
next prev parent reply other threads:[~2018-09-25 2:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 2:34 [dpdk-dev] [PATCH 00/20] base code update Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 01/20] net/i40e/base: replace license text with SPDX tag Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 02/20] net/i40e/base: fix partition id calculation for X722 Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 03/20] net/i40e/base: introduce PHY type bitmask Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 04/20] net/i40e/base: enable cloud filter mode for switch config Qi Zhang
2018-09-25 2:34 ` Qi Zhang [this message]
2018-09-25 2:34 ` [dpdk-dev] [PATCH 06/20] net/i40e/base: enable cloud filters via tc flower Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 07/20] net/i40e/base: improve the polling mechanism Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 08/20] net/i40e/base: read LLDP config area with correct endianness Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 09/20] net/i40e/base: properly clean resources Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 10/20] net/i40e/base: gracefully clean the resources Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 11/20] net/i40e/base: correct global reset timeout calculation Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 12/20] net/i40e/base: change AQ command for PHY access Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 13/20] net/i40e/base: add additional return code Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 14/20] net/i40e/base: add AQ command for rearrange NVM structure Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 15/20] net/i40e/base: add FC threshold parameter for set MAC Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 16/20] net/i40e/base: add support for carlsville device Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 17/20] net/i40e/base: wrap admin queue set/get PHY register funcs Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 18/20] net/i40e/base: add capability flag for stopping FW LLDP Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 19/20] net/i40e/base: add new TR bits used for cloud filters Qi Zhang
2018-09-25 2:34 ` [dpdk-dev] [PATCH 20/20] net/i40e/base: update readme Qi Zhang
2018-09-27 7:39 ` [dpdk-dev] [PATCH 00/20] base code update Xing, Beilei
2018-09-29 2:13 ` Zhang, Qi Z
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=20180925023442.134705-6-qi.z.zhang@intel.com \
--to=qi.z.zhang@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=helin.zhang@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).