* [dpdk-dev] [PATCH] net/ice/base: update version
@ 2020-04-10 0:48 Qi Zhang
2020-04-10 0:48 ` [dpdk-dev] [PATCH 2/2] common/iavf: " Qi Zhang
2020-04-10 0:48 ` [dpdk-dev] [PATCH] net/ice/base: " Qi Zhang
0 siblings, 2 replies; 7+ messages in thread
From: Qi Zhang @ 2020-04-10 0:48 UTC (permalink / raw)
To: xiaolong.ye; +Cc: dev, Qi Zhang
Update share code version in readme.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/README | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/README b/drivers/net/ice/base/README
index 88548296d..726593971 100644
--- a/drivers/net/ice/base/README
+++ b/drivers/net/ice/base/README
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018 Intel Corporation
+ * Copyright(c) 2020 Intel Corporation
*/
Intel® ICE driver
==================
This directory contains source code of FreeBSD ice driver of version
-2019.10.16 released by the team which develops
+2020.03.26 released by the team which develops
basic drivers for any ice NIC. The directory of base/ contains the
original source package.
This driver is valid for the product(s) listed below
--
2.13.6
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 2/2] common/iavf: update version
2020-04-10 0:48 [dpdk-dev] [PATCH] net/ice/base: update version Qi Zhang
@ 2020-04-10 0:48 ` Qi Zhang
2020-04-10 1:09 ` Xing, Beilei
2020-04-10 0:48 ` [dpdk-dev] [PATCH] net/ice/base: " Qi Zhang
1 sibling, 1 reply; 7+ messages in thread
From: Qi Zhang @ 2020-04-10 0:48 UTC (permalink / raw)
To: xiaolong.ye; +Cc: dev, Qi Zhang
Update share code release version in readme
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/common/iavf/README | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/iavf/README b/drivers/common/iavf/README
index b78e89bee..034c7d7ad 100644
--- a/drivers/common/iavf/README
+++ b/drivers/common/iavf/README
@@ -6,7 +6,7 @@ Intel® IAVF driver
=================
This directory contains source code of FreeBSD IAVF driver of version
-cid-avf.2019.08.19.tar.gz released by the team which develops
+cid-avf.2020.04.09.tar.gz released by the team which develops
basic drivers for any IAVF NIC. The directory of base/ contains the
original source package.
--
2.13.6
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] common/iavf: update version
2020-04-10 0:48 ` [dpdk-dev] [PATCH 2/2] common/iavf: " Qi Zhang
@ 2020-04-10 1:09 ` Xing, Beilei
0 siblings, 0 replies; 7+ messages in thread
From: Xing, Beilei @ 2020-04-10 1:09 UTC (permalink / raw)
To: Zhang, Qi Z, Ye, Xiaolong; +Cc: dev, Zhang, Qi Z
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Qi Zhang
> Sent: Friday, April 10, 2020 8:49 AM
> To: Ye, Xiaolong <xiaolong.ye@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [dpdk-dev] [PATCH 2/2] common/iavf: update version
>
> Update share code release version in readme
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> drivers/common/iavf/README | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/common/iavf/README b/drivers/common/iavf/README
> index b78e89bee..034c7d7ad 100644
> --- a/drivers/common/iavf/README
> +++ b/drivers/common/iavf/README
> @@ -6,7 +6,7 @@ Intel® IAVF driver
> =================
>
> This directory contains source code of FreeBSD IAVF driver of version -cid-
> avf.2019.08.19.tar.gz released by the team which develops
> +cid-avf.2020.04.09.tar.gz released by the team which develops
> basic drivers for any IAVF NIC. The directory of base/ contains the original
> source package.
>
> --
> 2.13.6
Acked-by: Beilei Xing <beilei.xing@intel.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH] net/ice/base: update version
2020-04-10 0:48 [dpdk-dev] [PATCH] net/ice/base: update version Qi Zhang
2020-04-10 0:48 ` [dpdk-dev] [PATCH 2/2] common/iavf: " Qi Zhang
@ 2020-04-10 0:48 ` Qi Zhang
1 sibling, 0 replies; 7+ messages in thread
From: Qi Zhang @ 2020-04-10 0:48 UTC (permalink / raw)
To: xiaolong.ye; +Cc: dev, Qi Zhang
Update share code version in readme.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/README | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ice/base/README b/drivers/net/ice/base/README
index 88548296d..726593971 100644
--- a/drivers/net/ice/base/README
+++ b/drivers/net/ice/base/README
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018 Intel Corporation
+ * Copyright(c) 2020 Intel Corporation
*/
Intel® ICE driver
==================
This directory contains source code of FreeBSD ice driver of version
-2019.10.16 released by the team which develops
+2020.03.26 released by the team which develops
basic drivers for any ice NIC. The directory of base/ contains the
original source package.
This driver is valid for the product(s) listed below
--
2.13.6
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 1/2] common/iavf: add flow director support in virtual channel
@ 2020-04-10 0:46 Qi Zhang
2020-04-10 0:46 ` [dpdk-dev] [PATCH 2/2] common/iavf: update version Qi Zhang
2020-04-10 0:46 ` Qi Zhang
0 siblings, 2 replies; 7+ messages in thread
From: Qi Zhang @ 2020-04-10 0:46 UTC (permalink / raw)
To: xiaolong.ye; +Cc: dev, Qi Zhang, Simei Su, Paul M Stillwell Jr
Adds new ops and structures to support VF to add/delete/validate/
query flow director.
ADD and VALIDATE FDIR share one ops: VIRTCHNL_OP_ADD_FDIR_FILTER.
VF sends this request to PF by filling out the related field in
virtchnl_fdir_add. If the rule is created successfully, PF
will return flow id and program status to VF. If the rule is
validated successfully, the PF will only return program status
to VF.
DELETE FDIR uses ops: VIRTCHNL_OP_DEL_FDIR_FILTER.
VF sends this request to PF by filling out the related field in
virtchnl_fdir_del. If the rule is deleted successfully, PF
will return program status to VF.
Query FDIR uses ops: VIRTCHNL_OP_QUERY_FDIR_FILTER.
VF sends this request to PF by filling out the related field in
virtchnl_fdir_query. If the request is successfully done by PF,
PF will return program status and query info to VF.
Signed-off-by: Simei Su <simei.su@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 | 162 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 162 insertions(+)
diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index c7c7fcc9c..36449731f 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -137,6 +137,9 @@ enum virtchnl_ops {
VIRTCHNL_OP_GET_SUPPORTED_RXDIDS = 44,
VIRTCHNL_OP_ADD_RSS_CFG = 45,
VIRTCHNL_OP_DEL_RSS_CFG = 46,
+ VIRTCHNL_OP_ADD_FDIR_FILTER = 47,
+ VIRTCHNL_OP_DEL_FDIR_FILTER = 48,
+ VIRTCHNL_OP_QUERY_FDIR_FILTER = 49,
};
/* These macros are used to generate compilation errors if a structure/union
@@ -254,6 +257,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
#define VIRTCHNL_VF_CAP_DCF 0X40000000
#define VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC 0X04000000
#define VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF 0X08000000
+#define VIRTCHNL_VF_OFFLOAD_FDIR_PF 0X10000000
/* 0X80000000 is reserved */
/* Define below the capability flags that are not offloads */
@@ -620,6 +624,11 @@ enum virtchnl_action {
/* action types */
VIRTCHNL_ACTION_DROP = 0,
VIRTCHNL_ACTION_TC_REDIRECT,
+ VIRTCHNL_ACTION_PASSTHRU,
+ VIRTCHNL_ACTION_QUEUE,
+ VIRTCHNL_ACTION_Q_REGION,
+ VIRTCHNL_ACTION_MARK,
+ VIRTCHNL_ACTION_COUNT,
};
enum virtchnl_flow_type {
@@ -944,6 +953,150 @@ struct virtchnl_rss_cfg {
};
VIRTCHNL_CHECK_STRUCT_LEN(2444, virtchnl_rss_cfg);
+
+/* action configuration for FDIR */
+struct virtchnl_filter_action {
+ enum virtchnl_action type;
+ union {
+ /* used for queue and qgroup action */
+ struct {
+ u16 index;
+ u8 region;
+ } queue;
+ /* used for count action */
+ struct {
+ /* share counter ID with other flow rules */
+ u8 shared;
+ u32 id; /* counter ID */
+ } count;
+ /* used for mark action */
+ u32 mark_id;
+ u8 reserve[32];
+ } act_conf;
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(36, virtchnl_filter_action);
+
+#define VIRTCHNL_MAX_NUM_ACTIONS 8
+
+struct virtchnl_filter_action_set {
+ /* action number must be less then VIRTCHNL_MAX_NUM_ACTIONS */
+ int count;
+ struct virtchnl_filter_action actions[VIRTCHNL_MAX_NUM_ACTIONS];
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(292, virtchnl_filter_action_set);
+
+/* pattern and action for FDIR rule */
+struct virtchnl_fdir_rule {
+ struct virtchnl_proto_hdrs proto_hdrs;
+ struct virtchnl_filter_action_set action_set;
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(2604, virtchnl_fdir_rule);
+
+/* query information to retrieve fdir rule counters.
+ * PF will fill out this structure to reset counter.
+ */
+struct virtchnl_fdir_query_info {
+ u32 match_packets_valid:1;
+ u32 match_bytes_valid:1;
+ u32 reserved:30; /* Reserved, must be zero. */
+ u32 pad;
+ u64 matched_packets; /* Number of packets for this rule. */
+ u64 matched_bytes; /* Number of bytes through this rule. */
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_fdir_query_info);
+
+/* Status returned to VF after VF requests FDIR commands
+ * VIRTCHNL_FDIR_SUCCESS
+ * VF FDIR related request is successfully done by PF
+ * The request can be OP_ADD/DEL/QUERY_FDIR_FILTER.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE
+ * OP_ADD_FDIR_FILTER request is failed due to no Hardware resource.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_EXIST
+ * OP_ADD_FDIR_FILTER request is failed due to the rule is already existed.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT
+ * OP_ADD_FDIR_FILTER request is failed due to conflict with existing rule.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST
+ * OP_DEL_FDIR_FILTER request is failed due to this rule doesn't exist.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_INVALID
+ * OP_ADD_FDIR_FILTER request is failed due to parameters validation
+ * or HW doesn't support.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT
+ * OP_ADD/DEL_FDIR_FILTER request is failed due to timing out
+ * for programming.
+ *
+ * VIRTCHNL_FDIR_FAILURE_QUERY_INVALID
+ * OP_QUERY_FDIR_FILTER request is failed due to parameters validation,
+ * for example, VF query counter of a rule who has no counter action.
+ */
+enum virtchnl_fdir_prgm_status {
+ VIRTCHNL_FDIR_SUCCESS = 0,
+ VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE,
+ VIRTCHNL_FDIR_FAILURE_RULE_EXIST,
+ VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT,
+ VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST,
+ VIRTCHNL_FDIR_FAILURE_RULE_INVALID,
+ VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT,
+ VIRTCHNL_FDIR_FAILURE_QUERY_INVALID,
+};
+
+/* VIRTCHNL_OP_ADD_FDIR_FILTER
+ * VF sends this request to PF by filling out vsi_id,
+ * validate_only and rule_cfg. PF will return flow_id
+ * if the request is successfully done and return add_status to VF.
+ */
+struct virtchnl_fdir_add {
+ u16 vsi_id; /* INPUT */
+ /*
+ * 1 for validating a fdir rule, 0 for creating a fdir rule.
+ * Validate and create share one ops: VIRTCHNL_OP_ADD_FDIR_FILTER.
+ */
+ u16 validate_only; /* INPUT */
+ u32 flow_id; /* OUTPUT */
+ struct virtchnl_fdir_rule rule_cfg; /* INPUT */
+ enum virtchnl_fdir_prgm_status status; /* OUTPUT */
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(2616, virtchnl_fdir_add);
+
+/* VIRTCHNL_OP_DEL_FDIR_FILTER
+ * VF sends this request to PF by filling out vsi_id
+ * and flow_id. PF will return del_status to VF.
+ */
+struct virtchnl_fdir_del {
+ u16 vsi_id; /* INPUT */
+ u16 pad;
+ u32 flow_id; /* INPUT */
+ enum virtchnl_fdir_prgm_status status; /* OUTPUT */
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_fdir_del);
+
+/* VIRTCHNL_OP_QUERY_FDIR_FILTER
+ * VF sends this request to PF by filling out vsi_id,
+ * flow_id and reset_counter. PF will return query_info
+ * and query_status to VF.
+ */
+struct virtchnl_fdir_query {
+ u16 vsi_id; /* INPUT */
+ u16 pad1[3];
+ u32 flow_id; /* INPUT */
+ u32 reset_counter:1; /* INPUT */
+ struct virtchnl_fdir_query_info query_info; /* OUTPUT */
+ enum virtchnl_fdir_prgm_status status; /* OUTPUT */
+ u32 pad2;
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_fdir_query);
/**
* virtchnl_vc_validate_vf_msg
* @ver: Virtchnl version info
@@ -1134,6 +1287,15 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
case VIRTCHNL_OP_DEL_RSS_CFG:
valid_len = sizeof(struct virtchnl_rss_cfg);
break;
+ case VIRTCHNL_OP_ADD_FDIR_FILTER:
+ valid_len = sizeof(struct virtchnl_fdir_add);
+ break;
+ case VIRTCHNL_OP_DEL_FDIR_FILTER:
+ valid_len = sizeof(struct virtchnl_fdir_del);
+ break;
+ case VIRTCHNL_OP_QUERY_FDIR_FILTER:
+ valid_len = sizeof(struct virtchnl_fdir_query);
+ break;
/* These are always errors coming from the VF. */
case VIRTCHNL_OP_EVENT:
case VIRTCHNL_OP_UNKNOWN:
--
2.13.6
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 2/2] common/iavf: update version
2020-04-10 0:46 [dpdk-dev] [PATCH 1/2] common/iavf: add flow director support in virtual channel Qi Zhang
@ 2020-04-10 0:46 ` Qi Zhang
2020-04-10 0:46 ` Qi Zhang
1 sibling, 0 replies; 7+ messages in thread
From: Qi Zhang @ 2020-04-10 0:46 UTC (permalink / raw)
To: xiaolong.ye; +Cc: dev, Qi Zhang
Update share code release version in readme
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/common/iavf/README | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/iavf/README b/drivers/common/iavf/README
index b78e89bee..034c7d7ad 100644
--- a/drivers/common/iavf/README
+++ b/drivers/common/iavf/README
@@ -6,7 +6,7 @@ Intel® IAVF driver
=================
This directory contains source code of FreeBSD IAVF driver of version
-cid-avf.2019.08.19.tar.gz released by the team which develops
+cid-avf.2020.04.09.tar.gz released by the team which develops
basic drivers for any IAVF NIC. The directory of base/ contains the
original source package.
--
2.13.6
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 2/2] common/iavf: update version
2020-04-10 0:46 [dpdk-dev] [PATCH 1/2] common/iavf: add flow director support in virtual channel Qi Zhang
2020-04-10 0:46 ` [dpdk-dev] [PATCH 2/2] common/iavf: update version Qi Zhang
@ 2020-04-10 0:46 ` Qi Zhang
1 sibling, 0 replies; 7+ messages in thread
From: Qi Zhang @ 2020-04-10 0:46 UTC (permalink / raw)
To: xiaolong.ye; +Cc: dev, Qi Zhang
Update share code release version in readme
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/common/iavf/README | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/iavf/README b/drivers/common/iavf/README
index b78e89bee..034c7d7ad 100644
--- a/drivers/common/iavf/README
+++ b/drivers/common/iavf/README
@@ -6,7 +6,7 @@ Intel® IAVF driver
=================
This directory contains source code of FreeBSD IAVF driver of version
-cid-avf.2019.08.19.tar.gz released by the team which develops
+cid-avf.2020.04.09.tar.gz released by the team which develops
basic drivers for any IAVF NIC. The directory of base/ contains the
original source package.
--
2.13.6
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH 1/2] common/iavf: add flow director support in virtual channel
@ 2020-04-10 0:45 Qi Zhang
2020-04-10 0:45 ` [dpdk-dev] [PATCH 2/2] common/iavf: update version Qi Zhang
0 siblings, 1 reply; 7+ messages in thread
From: Qi Zhang @ 2020-04-10 0:45 UTC (permalink / raw)
To: xiaolong.ye; +Cc: dev, Qi Zhang, Simei Su, Paul M Stillwell Jr
Adds new ops and structures to support VF to add/delete/validate/
query flow director.
ADD and VALIDATE FDIR share one ops: VIRTCHNL_OP_ADD_FDIR_FILTER.
VF sends this request to PF by filling out the related field in
virtchnl_fdir_add. If the rule is created successfully, PF
will return flow id and program status to VF. If the rule is
validated successfully, the PF will only return program status
to VF.
DELETE FDIR uses ops: VIRTCHNL_OP_DEL_FDIR_FILTER.
VF sends this request to PF by filling out the related field in
virtchnl_fdir_del. If the rule is deleted successfully, PF
will return program status to VF.
Query FDIR uses ops: VIRTCHNL_OP_QUERY_FDIR_FILTER.
VF sends this request to PF by filling out the related field in
virtchnl_fdir_query. If the request is successfully done by PF,
PF will return program status and query info to VF.
Signed-off-by: Simei Su <simei.su@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 | 162 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 162 insertions(+)
diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index c7c7fcc9c..36449731f 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -137,6 +137,9 @@ enum virtchnl_ops {
VIRTCHNL_OP_GET_SUPPORTED_RXDIDS = 44,
VIRTCHNL_OP_ADD_RSS_CFG = 45,
VIRTCHNL_OP_DEL_RSS_CFG = 46,
+ VIRTCHNL_OP_ADD_FDIR_FILTER = 47,
+ VIRTCHNL_OP_DEL_FDIR_FILTER = 48,
+ VIRTCHNL_OP_QUERY_FDIR_FILTER = 49,
};
/* These macros are used to generate compilation errors if a structure/union
@@ -254,6 +257,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
#define VIRTCHNL_VF_CAP_DCF 0X40000000
#define VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC 0X04000000
#define VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF 0X08000000
+#define VIRTCHNL_VF_OFFLOAD_FDIR_PF 0X10000000
/* 0X80000000 is reserved */
/* Define below the capability flags that are not offloads */
@@ -620,6 +624,11 @@ enum virtchnl_action {
/* action types */
VIRTCHNL_ACTION_DROP = 0,
VIRTCHNL_ACTION_TC_REDIRECT,
+ VIRTCHNL_ACTION_PASSTHRU,
+ VIRTCHNL_ACTION_QUEUE,
+ VIRTCHNL_ACTION_Q_REGION,
+ VIRTCHNL_ACTION_MARK,
+ VIRTCHNL_ACTION_COUNT,
};
enum virtchnl_flow_type {
@@ -944,6 +953,150 @@ struct virtchnl_rss_cfg {
};
VIRTCHNL_CHECK_STRUCT_LEN(2444, virtchnl_rss_cfg);
+
+/* action configuration for FDIR */
+struct virtchnl_filter_action {
+ enum virtchnl_action type;
+ union {
+ /* used for queue and qgroup action */
+ struct {
+ u16 index;
+ u8 region;
+ } queue;
+ /* used for count action */
+ struct {
+ /* share counter ID with other flow rules */
+ u8 shared;
+ u32 id; /* counter ID */
+ } count;
+ /* used for mark action */
+ u32 mark_id;
+ u8 reserve[32];
+ } act_conf;
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(36, virtchnl_filter_action);
+
+#define VIRTCHNL_MAX_NUM_ACTIONS 8
+
+struct virtchnl_filter_action_set {
+ /* action number must be less then VIRTCHNL_MAX_NUM_ACTIONS */
+ int count;
+ struct virtchnl_filter_action actions[VIRTCHNL_MAX_NUM_ACTIONS];
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(292, virtchnl_filter_action_set);
+
+/* pattern and action for FDIR rule */
+struct virtchnl_fdir_rule {
+ struct virtchnl_proto_hdrs proto_hdrs;
+ struct virtchnl_filter_action_set action_set;
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(2604, virtchnl_fdir_rule);
+
+/* query information to retrieve fdir rule counters.
+ * PF will fill out this structure to reset counter.
+ */
+struct virtchnl_fdir_query_info {
+ u32 match_packets_valid:1;
+ u32 match_bytes_valid:1;
+ u32 reserved:30; /* Reserved, must be zero. */
+ u32 pad;
+ u64 matched_packets; /* Number of packets for this rule. */
+ u64 matched_bytes; /* Number of bytes through this rule. */
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(24, virtchnl_fdir_query_info);
+
+/* Status returned to VF after VF requests FDIR commands
+ * VIRTCHNL_FDIR_SUCCESS
+ * VF FDIR related request is successfully done by PF
+ * The request can be OP_ADD/DEL/QUERY_FDIR_FILTER.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE
+ * OP_ADD_FDIR_FILTER request is failed due to no Hardware resource.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_EXIST
+ * OP_ADD_FDIR_FILTER request is failed due to the rule is already existed.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT
+ * OP_ADD_FDIR_FILTER request is failed due to conflict with existing rule.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST
+ * OP_DEL_FDIR_FILTER request is failed due to this rule doesn't exist.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_INVALID
+ * OP_ADD_FDIR_FILTER request is failed due to parameters validation
+ * or HW doesn't support.
+ *
+ * VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT
+ * OP_ADD/DEL_FDIR_FILTER request is failed due to timing out
+ * for programming.
+ *
+ * VIRTCHNL_FDIR_FAILURE_QUERY_INVALID
+ * OP_QUERY_FDIR_FILTER request is failed due to parameters validation,
+ * for example, VF query counter of a rule who has no counter action.
+ */
+enum virtchnl_fdir_prgm_status {
+ VIRTCHNL_FDIR_SUCCESS = 0,
+ VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE,
+ VIRTCHNL_FDIR_FAILURE_RULE_EXIST,
+ VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT,
+ VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST,
+ VIRTCHNL_FDIR_FAILURE_RULE_INVALID,
+ VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT,
+ VIRTCHNL_FDIR_FAILURE_QUERY_INVALID,
+};
+
+/* VIRTCHNL_OP_ADD_FDIR_FILTER
+ * VF sends this request to PF by filling out vsi_id,
+ * validate_only and rule_cfg. PF will return flow_id
+ * if the request is successfully done and return add_status to VF.
+ */
+struct virtchnl_fdir_add {
+ u16 vsi_id; /* INPUT */
+ /*
+ * 1 for validating a fdir rule, 0 for creating a fdir rule.
+ * Validate and create share one ops: VIRTCHNL_OP_ADD_FDIR_FILTER.
+ */
+ u16 validate_only; /* INPUT */
+ u32 flow_id; /* OUTPUT */
+ struct virtchnl_fdir_rule rule_cfg; /* INPUT */
+ enum virtchnl_fdir_prgm_status status; /* OUTPUT */
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(2616, virtchnl_fdir_add);
+
+/* VIRTCHNL_OP_DEL_FDIR_FILTER
+ * VF sends this request to PF by filling out vsi_id
+ * and flow_id. PF will return del_status to VF.
+ */
+struct virtchnl_fdir_del {
+ u16 vsi_id; /* INPUT */
+ u16 pad;
+ u32 flow_id; /* INPUT */
+ enum virtchnl_fdir_prgm_status status; /* OUTPUT */
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_fdir_del);
+
+/* VIRTCHNL_OP_QUERY_FDIR_FILTER
+ * VF sends this request to PF by filling out vsi_id,
+ * flow_id and reset_counter. PF will return query_info
+ * and query_status to VF.
+ */
+struct virtchnl_fdir_query {
+ u16 vsi_id; /* INPUT */
+ u16 pad1[3];
+ u32 flow_id; /* INPUT */
+ u32 reset_counter:1; /* INPUT */
+ struct virtchnl_fdir_query_info query_info; /* OUTPUT */
+ enum virtchnl_fdir_prgm_status status; /* OUTPUT */
+ u32 pad2;
+};
+
+VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_fdir_query);
/**
* virtchnl_vc_validate_vf_msg
* @ver: Virtchnl version info
@@ -1134,6 +1287,15 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
case VIRTCHNL_OP_DEL_RSS_CFG:
valid_len = sizeof(struct virtchnl_rss_cfg);
break;
+ case VIRTCHNL_OP_ADD_FDIR_FILTER:
+ valid_len = sizeof(struct virtchnl_fdir_add);
+ break;
+ case VIRTCHNL_OP_DEL_FDIR_FILTER:
+ valid_len = sizeof(struct virtchnl_fdir_del);
+ break;
+ case VIRTCHNL_OP_QUERY_FDIR_FILTER:
+ valid_len = sizeof(struct virtchnl_fdir_query);
+ break;
/* These are always errors coming from the VF. */
case VIRTCHNL_OP_EVENT:
case VIRTCHNL_OP_UNKNOWN:
--
2.13.6
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-10 1:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10 0:48 [dpdk-dev] [PATCH] net/ice/base: update version Qi Zhang
2020-04-10 0:48 ` [dpdk-dev] [PATCH 2/2] common/iavf: " Qi Zhang
2020-04-10 1:09 ` Xing, Beilei
2020-04-10 0:48 ` [dpdk-dev] [PATCH] net/ice/base: " Qi Zhang
-- strict thread matches above, loose matches on Subject: below --
2020-04-10 0:46 [dpdk-dev] [PATCH 1/2] common/iavf: add flow director support in virtual channel Qi Zhang
2020-04-10 0:46 ` [dpdk-dev] [PATCH 2/2] common/iavf: update version Qi Zhang
2020-04-10 0:46 ` Qi Zhang
2020-04-10 0:45 [dpdk-dev] [PATCH 1/2] common/iavf: add flow director support in virtual channel Qi Zhang
2020-04-10 0:45 ` [dpdk-dev] [PATCH 2/2] common/iavf: update version Qi Zhang
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).