DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/iavf: rename the VLAN offload virtchnl message
@ 2021-01-20  1:10 Haiyue Wang
  2021-01-20  3:15 ` [dpdk-dev] [PATCH v2] common/iavf: support VLAN filtering Haiyue Wang
  2021-01-20  4:17 ` [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message Haiyue Wang
  0 siblings, 2 replies; 9+ messages in thread
From: Haiyue Wang @ 2021-01-20  1:10 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, qi.z.zhang, qi.fu, Haiyue Wang, Jingjing Wu, Beilei Xing

Rename the VLAN offload message to make the virtchnl support one more
filtering offload, the name is straightforward.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/common/iavf/virtchnl.h | 67 ++++++++++++++++++++++++++++------
 drivers/net/iavf/iavf_vchnl.c  | 36 +++++++++---------
 2 files changed, 74 insertions(+), 29 deletions(-)

diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index 09e42f034c..6b99e170f0 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -149,6 +149,8 @@ enum virtchnl_ops {
 	VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2 = 55,
 	VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 = 56,
 	VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2 = 57,
+	VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2 = 58,
+	VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2 = 59,
 	VIRTCHNL_OP_ENABLE_QUEUES_V2 = 107,
 	VIRTCHNL_OP_DISABLE_QUEUES_V2 = 108,
 	VIRTCHNL_OP_MAP_QUEUE_VECTOR = 111,
@@ -258,6 +260,10 @@ static inline const char *virtchnl_op_str(enum virtchnl_ops v_opcode)
 		return "VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2";
 	case VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2:
 		return "VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2";
+	case VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2:
+		return "VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2";
+	case VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2:
+		return "VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2";
 	case VIRTCHNL_OP_MAX:
 		return "VIRTCHNL_OP_MAX";
 	default:
@@ -914,13 +920,13 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);
  *
  * In order to enable inner (again note that in this case inner is the outer
  * most or single VLAN from the VF's perspective) VLAN stripping for 0x8100
- * VLANs, the VF would populate the virtchnl_vlan_offload structure in the
+ * VLANs, the VF would populate the virtchnl_vlan_setting structure in the
  * following manner and send the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 message.
  *
- * virtchnl_vlan_offload.inner_ethertype_setting =
+ * virtchnl_vlan_setting.inner_ethertype_setting =
  *			VIRTCHNL_VLAN_ETHERTYPE_8100;
  *
- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on
+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on
  * initialization.
  *
  * The reason that VLAN TPID(s) are not being used for the
@@ -952,11 +958,11 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);
  * would populate the virthcnl_vlan_offload_structure in the following manner
  * and send the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 message.
  *
- * virtchnl_vlan_offload.outer_ethertype_setting =
+ * virtchnl_vlan_setting.outer_ethertype_setting =
  *			VIRTHCNL_VLAN_ETHERTYPE_8100 |
  *			VIRTHCNL_VLAN_ETHERTYPE_88A8;
  *
- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on
+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on
  * initialization.
  *
  * There is also the case where a PF and the underlying hardware can support
@@ -981,24 +987,61 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);
  *			VIRTCHNL_ETHERTYPE_STRIPPING_MATCHES_INSERTION;
  *
  * In order to enable outer VLAN stripping for 0x88a8 VLANs, the VF would
- * populate the virtchnl_vlan_offload_structure in the following manner and send
+ * populate the virtchnl_vlan_setting structure in the following manner and send
  * the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2. Also, this will change the
  * ethertype for VLAN insertion if it's enabled. So, for completeness, a
  * VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 with the same ethertype should be sent.
  *
- * virtchnl_vlan_offload.outer_ethertype_setting = VIRTHCNL_VLAN_ETHERTYPE_88A8;
+ * virtchnl_vlan_setting.outer_ethertype_setting = VIRTHCNL_VLAN_ETHERTYPE_88A8;
  *
- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on
+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on
  * initialization.
+ *
+ * VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2
+ * VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2
+ *
+ * VF sends this message to enable or disable VLAN filtering. It also needs to
+ * specify an ethertype. The VF knows which VLAN ethertypes are allowed and
+ * whether or not it's allowed to enable/disable filtering via the
+ * VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS message. The VF needs to
+ * parse the virtchnl_vlan_caps.filtering fields to determine which, if any,
+ * filtering messages are allowed.
+ *
+ * For example, if the PF populates the virtchnl_vlan_caps.filtering in the
+ * following manner the VF will be allowed to enable/disable 0x8100 and 0x88a8
+ * outer VLAN filtering together. Note, that the VIRTCHNL_VLAN_ETHERTYPE_AND
+ * means that all filtering ethertypes will to be enabled and disabled together
+ * regardless of the request from the VF. This means that the underlying
+ * hardware only supports VLAN filtering for all VLAN the specified ethertypes
+ * or none of them.
+ *
+ * virtchnl_vlan_caps.filtering.filtering_support.outer =
+ *			VIRTCHNL_VLAN_TOGGLE |
+ *			VIRTCHNL_VLAN_ETHERTYPE_8100 |
+ *			VIRTHCNL_VLAN_ETHERTYPE_88A8 |
+ *			VIRTCHNL_VLAN_ETHERTYPE_9100 |
+ *			VIRTCHNL_VLAN_ETHERTYPE_AND;
+ *
+ * In order to enable outer VLAN filtering for 0x88a8 and 0x8100 VLANs (0x9100
+ * VLANs aren't supported by the VF driver), the VF would populate the
+ * virtchnl_vlan_setting structure in the following manner and send the
+ * VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2. The same message format would be used
+ * to disable outer VLAN filtering for 0x88a8 and 0x8100 VLANs, but the
+ * VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2 opcode is used.
+ *
+ * virtchnl_vlan_setting.outer_ethertype_setting =
+ *			VIRTCHNL_VLAN_ETHERTYPE_8100 |
+ *			VIRTCHNL_VLAN_ETHERTYPE_88A8;
+ *
  */
-struct virtchnl_vlan_offload {
+struct virtchnl_vlan_setting {
 	u32 outer_ethertype_setting;
 	u32 inner_ethertype_setting;
 	u16 vport_id;
 	u8 pad[6];
 };
 
-VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vlan_offload);
+VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vlan_setting);
 
 /* VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE
  * VF sends VSI id and flags.
@@ -2017,7 +2060,9 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
 	case VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2:
 	case VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2:
 	case VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2:
-		valid_len = sizeof(struct virtchnl_vlan_offload);
+	case VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2:
+	case VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2:
+		valid_len = sizeof(struct virtchnl_vlan_setting);
 		break;
 	case VIRTCHNL_OP_ENABLE_QUEUES_V2:
 	case VIRTCHNL_OP_DISABLE_QUEUES_V2:
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 3ef29d509d..27eb59ad91 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -529,32 +529,32 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)
 {
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	struct virtchnl_vlan_supported_caps *supported_caps;
-	struct virtchnl_vlan_offload vlan_strip;
+	struct virtchnl_vlan_setting vlan_strip_setting;
 	struct iavf_cmd_info args;
 	uint32_t stripping_caps;
-	uint32_t *vlan_setting;
+	uint32_t *ethertype;
 	int ret;
 
 	supported_caps = &vf->vlan_v2_caps.offloads.stripping_support;
 	if (supported_caps->outer) {
 		stripping_caps = supported_caps->outer;
-		vlan_setting = &vlan_strip.outer_ethertype_setting;
+		ethertype = &vlan_strip_setting.outer_ethertype_setting;
 	} else {
 		stripping_caps = supported_caps->inner;
-		vlan_setting = &vlan_strip.inner_ethertype_setting;
+		ethertype = &vlan_strip_setting.inner_ethertype_setting;
 	}
 
 	if (!(stripping_caps & VIRTCHNL_VLAN_ETHERTYPE_8100))
 		return -ENOTSUP;
 
-	memset(&vlan_strip, 0, sizeof(vlan_strip));
-	vlan_strip.vport_id = vf->vsi_res->vsi_id;
-	*vlan_setting = VIRTCHNL_VLAN_ETHERTYPE_8100;
+	memset(&vlan_strip_setting, 0, sizeof(vlan_strip_setting));
+	vlan_strip_setting.vport_id = vf->vsi_res->vsi_id;
+	*ethertype = VIRTCHNL_VLAN_ETHERTYPE_8100;
 
 	args.ops = enable ? VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 :
 			    VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2;
-	args.in_args = (uint8_t *)&vlan_strip;
-	args.in_args_size = sizeof(vlan_strip);
+	args.in_args = (uint8_t *)&vlan_strip_setting;
+	args.in_args_size = sizeof(vlan_strip_setting);
 	args.out_buffer = vf->aq_resp;
 	args.out_size = IAVF_AQ_BUF_SZ;
 	ret = iavf_execute_vf_cmd(adapter, &args);
@@ -571,32 +571,32 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)
 {
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	struct virtchnl_vlan_supported_caps *supported_caps;
-	struct virtchnl_vlan_offload vlan_insert;
+	struct virtchnl_vlan_setting vlan_insert_setting;
 	struct iavf_cmd_info args;
 	uint32_t insertion_caps;
-	uint32_t *vlan_setting;
+	uint32_t *ethertype;
 	int ret;
 
 	supported_caps = &vf->vlan_v2_caps.offloads.insertion_support;
 	if (supported_caps->outer) {
 		insertion_caps = supported_caps->outer;
-		vlan_setting = &vlan_insert.outer_ethertype_setting;
+		ethertype = &vlan_insert_setting.outer_ethertype_setting;
 	} else {
 		insertion_caps = supported_caps->inner;
-		vlan_setting = &vlan_insert.inner_ethertype_setting;
+		ethertype = &vlan_insert_setting.inner_ethertype_setting;
 	}
 
 	if (!(insertion_caps & VIRTCHNL_VLAN_ETHERTYPE_8100))
 		return -ENOTSUP;
 
-	memset(&vlan_insert, 0, sizeof(vlan_insert));
-	vlan_insert.vport_id = vf->vsi_res->vsi_id;
-	*vlan_setting = VIRTCHNL_VLAN_ETHERTYPE_8100;
+	memset(&vlan_insert_setting, 0, sizeof(vlan_insert_setting));
+	vlan_insert_setting.vport_id = vf->vsi_res->vsi_id;
+	*ethertype = VIRTCHNL_VLAN_ETHERTYPE_8100;
 
 	args.ops = enable ? VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 :
 			    VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2;
-	args.in_args = (uint8_t *)&vlan_insert;
-	args.in_args_size = sizeof(vlan_insert);
+	args.in_args = (uint8_t *)&vlan_insert_setting;
+	args.in_args_size = sizeof(vlan_insert_setting);
 	args.out_buffer = vf->aq_resp;
 	args.out_size = IAVF_AQ_BUF_SZ;
 	ret = iavf_execute_vf_cmd(adapter, &args);
-- 
2.30.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v2] common/iavf: support VLAN filtering
  2021-01-20  1:10 [dpdk-dev] [PATCH v1] net/iavf: rename the VLAN offload virtchnl message Haiyue Wang
@ 2021-01-20  3:15 ` Haiyue Wang
  2021-01-20  4:17 ` [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message Haiyue Wang
  1 sibling, 0 replies; 9+ messages in thread
From: Haiyue Wang @ 2021-01-20  3:15 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, qi.z.zhang, qi.fu, Haiyue Wang, Brett Creeley,
	Jingjing Wu, Beilei Xing

In order to support enable/disable VLAN filtering the VF has to
negotiate the capability via VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2. If
VIRTCHNL_VLAN_TOGGLE is allowed for the VLAN fitlering capabilities,
then there needs to be a method to allow this. Make the necessary
changes to support this.

Also, since the virtchnl_vlan_offload message has the desired format,
change the structure name to virtchnl_vlan_setting so it can be used for
VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2 and
VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
v2: update the commit title and message, main new feature, not just
rename.
---
 drivers/common/iavf/virtchnl.h | 67 ++++++++++++++++++++++++++++------
 drivers/net/iavf/iavf_vchnl.c  | 36 +++++++++---------
 2 files changed, 74 insertions(+), 29 deletions(-)

diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index 09e42f034c..6b99e170f0 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -149,6 +149,8 @@ enum virtchnl_ops {
 	VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2 = 55,
 	VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 = 56,
 	VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2 = 57,
+	VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2 = 58,
+	VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2 = 59,
 	VIRTCHNL_OP_ENABLE_QUEUES_V2 = 107,
 	VIRTCHNL_OP_DISABLE_QUEUES_V2 = 108,
 	VIRTCHNL_OP_MAP_QUEUE_VECTOR = 111,
@@ -258,6 +260,10 @@ static inline const char *virtchnl_op_str(enum virtchnl_ops v_opcode)
 		return "VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2";
 	case VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2:
 		return "VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2";
+	case VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2:
+		return "VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2";
+	case VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2:
+		return "VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2";
 	case VIRTCHNL_OP_MAX:
 		return "VIRTCHNL_OP_MAX";
 	default:
@@ -914,13 +920,13 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);
  *
  * In order to enable inner (again note that in this case inner is the outer
  * most or single VLAN from the VF's perspective) VLAN stripping for 0x8100
- * VLANs, the VF would populate the virtchnl_vlan_offload structure in the
+ * VLANs, the VF would populate the virtchnl_vlan_setting structure in the
  * following manner and send the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 message.
  *
- * virtchnl_vlan_offload.inner_ethertype_setting =
+ * virtchnl_vlan_setting.inner_ethertype_setting =
  *			VIRTCHNL_VLAN_ETHERTYPE_8100;
  *
- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on
+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on
  * initialization.
  *
  * The reason that VLAN TPID(s) are not being used for the
@@ -952,11 +958,11 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);
  * would populate the virthcnl_vlan_offload_structure in the following manner
  * and send the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 message.
  *
- * virtchnl_vlan_offload.outer_ethertype_setting =
+ * virtchnl_vlan_setting.outer_ethertype_setting =
  *			VIRTHCNL_VLAN_ETHERTYPE_8100 |
  *			VIRTHCNL_VLAN_ETHERTYPE_88A8;
  *
- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on
+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on
  * initialization.
  *
  * There is also the case where a PF and the underlying hardware can support
@@ -981,24 +987,61 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);
  *			VIRTCHNL_ETHERTYPE_STRIPPING_MATCHES_INSERTION;
  *
  * In order to enable outer VLAN stripping for 0x88a8 VLANs, the VF would
- * populate the virtchnl_vlan_offload_structure in the following manner and send
+ * populate the virtchnl_vlan_setting structure in the following manner and send
  * the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2. Also, this will change the
  * ethertype for VLAN insertion if it's enabled. So, for completeness, a
  * VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 with the same ethertype should be sent.
  *
- * virtchnl_vlan_offload.outer_ethertype_setting = VIRTHCNL_VLAN_ETHERTYPE_88A8;
+ * virtchnl_vlan_setting.outer_ethertype_setting = VIRTHCNL_VLAN_ETHERTYPE_88A8;
  *
- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on
+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on
  * initialization.
+ *
+ * VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2
+ * VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2
+ *
+ * VF sends this message to enable or disable VLAN filtering. It also needs to
+ * specify an ethertype. The VF knows which VLAN ethertypes are allowed and
+ * whether or not it's allowed to enable/disable filtering via the
+ * VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS message. The VF needs to
+ * parse the virtchnl_vlan_caps.filtering fields to determine which, if any,
+ * filtering messages are allowed.
+ *
+ * For example, if the PF populates the virtchnl_vlan_caps.filtering in the
+ * following manner the VF will be allowed to enable/disable 0x8100 and 0x88a8
+ * outer VLAN filtering together. Note, that the VIRTCHNL_VLAN_ETHERTYPE_AND
+ * means that all filtering ethertypes will to be enabled and disabled together
+ * regardless of the request from the VF. This means that the underlying
+ * hardware only supports VLAN filtering for all VLAN the specified ethertypes
+ * or none of them.
+ *
+ * virtchnl_vlan_caps.filtering.filtering_support.outer =
+ *			VIRTCHNL_VLAN_TOGGLE |
+ *			VIRTCHNL_VLAN_ETHERTYPE_8100 |
+ *			VIRTHCNL_VLAN_ETHERTYPE_88A8 |
+ *			VIRTCHNL_VLAN_ETHERTYPE_9100 |
+ *			VIRTCHNL_VLAN_ETHERTYPE_AND;
+ *
+ * In order to enable outer VLAN filtering for 0x88a8 and 0x8100 VLANs (0x9100
+ * VLANs aren't supported by the VF driver), the VF would populate the
+ * virtchnl_vlan_setting structure in the following manner and send the
+ * VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2. The same message format would be used
+ * to disable outer VLAN filtering for 0x88a8 and 0x8100 VLANs, but the
+ * VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2 opcode is used.
+ *
+ * virtchnl_vlan_setting.outer_ethertype_setting =
+ *			VIRTCHNL_VLAN_ETHERTYPE_8100 |
+ *			VIRTCHNL_VLAN_ETHERTYPE_88A8;
+ *
  */
-struct virtchnl_vlan_offload {
+struct virtchnl_vlan_setting {
 	u32 outer_ethertype_setting;
 	u32 inner_ethertype_setting;
 	u16 vport_id;
 	u8 pad[6];
 };
 
-VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vlan_offload);
+VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vlan_setting);
 
 /* VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE
  * VF sends VSI id and flags.
@@ -2017,7 +2060,9 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
 	case VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2:
 	case VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2:
 	case VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2:
-		valid_len = sizeof(struct virtchnl_vlan_offload);
+	case VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2:
+	case VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2:
+		valid_len = sizeof(struct virtchnl_vlan_setting);
 		break;
 	case VIRTCHNL_OP_ENABLE_QUEUES_V2:
 	case VIRTCHNL_OP_DISABLE_QUEUES_V2:
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 3ef29d509d..27eb59ad91 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -529,32 +529,32 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)
 {
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	struct virtchnl_vlan_supported_caps *supported_caps;
-	struct virtchnl_vlan_offload vlan_strip;
+	struct virtchnl_vlan_setting vlan_strip_setting;
 	struct iavf_cmd_info args;
 	uint32_t stripping_caps;
-	uint32_t *vlan_setting;
+	uint32_t *ethertype;
 	int ret;
 
 	supported_caps = &vf->vlan_v2_caps.offloads.stripping_support;
 	if (supported_caps->outer) {
 		stripping_caps = supported_caps->outer;
-		vlan_setting = &vlan_strip.outer_ethertype_setting;
+		ethertype = &vlan_strip_setting.outer_ethertype_setting;
 	} else {
 		stripping_caps = supported_caps->inner;
-		vlan_setting = &vlan_strip.inner_ethertype_setting;
+		ethertype = &vlan_strip_setting.inner_ethertype_setting;
 	}
 
 	if (!(stripping_caps & VIRTCHNL_VLAN_ETHERTYPE_8100))
 		return -ENOTSUP;
 
-	memset(&vlan_strip, 0, sizeof(vlan_strip));
-	vlan_strip.vport_id = vf->vsi_res->vsi_id;
-	*vlan_setting = VIRTCHNL_VLAN_ETHERTYPE_8100;
+	memset(&vlan_strip_setting, 0, sizeof(vlan_strip_setting));
+	vlan_strip_setting.vport_id = vf->vsi_res->vsi_id;
+	*ethertype = VIRTCHNL_VLAN_ETHERTYPE_8100;
 
 	args.ops = enable ? VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 :
 			    VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2;
-	args.in_args = (uint8_t *)&vlan_strip;
-	args.in_args_size = sizeof(vlan_strip);
+	args.in_args = (uint8_t *)&vlan_strip_setting;
+	args.in_args_size = sizeof(vlan_strip_setting);
 	args.out_buffer = vf->aq_resp;
 	args.out_size = IAVF_AQ_BUF_SZ;
 	ret = iavf_execute_vf_cmd(adapter, &args);
@@ -571,32 +571,32 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)
 {
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	struct virtchnl_vlan_supported_caps *supported_caps;
-	struct virtchnl_vlan_offload vlan_insert;
+	struct virtchnl_vlan_setting vlan_insert_setting;
 	struct iavf_cmd_info args;
 	uint32_t insertion_caps;
-	uint32_t *vlan_setting;
+	uint32_t *ethertype;
 	int ret;
 
 	supported_caps = &vf->vlan_v2_caps.offloads.insertion_support;
 	if (supported_caps->outer) {
 		insertion_caps = supported_caps->outer;
-		vlan_setting = &vlan_insert.outer_ethertype_setting;
+		ethertype = &vlan_insert_setting.outer_ethertype_setting;
 	} else {
 		insertion_caps = supported_caps->inner;
-		vlan_setting = &vlan_insert.inner_ethertype_setting;
+		ethertype = &vlan_insert_setting.inner_ethertype_setting;
 	}
 
 	if (!(insertion_caps & VIRTCHNL_VLAN_ETHERTYPE_8100))
 		return -ENOTSUP;
 
-	memset(&vlan_insert, 0, sizeof(vlan_insert));
-	vlan_insert.vport_id = vf->vsi_res->vsi_id;
-	*vlan_setting = VIRTCHNL_VLAN_ETHERTYPE_8100;
+	memset(&vlan_insert_setting, 0, sizeof(vlan_insert_setting));
+	vlan_insert_setting.vport_id = vf->vsi_res->vsi_id;
+	*ethertype = VIRTCHNL_VLAN_ETHERTYPE_8100;
 
 	args.ops = enable ? VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 :
 			    VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2;
-	args.in_args = (uint8_t *)&vlan_insert;
-	args.in_args_size = sizeof(vlan_insert);
+	args.in_args = (uint8_t *)&vlan_insert_setting;
+	args.in_args_size = sizeof(vlan_insert_setting);
 	args.out_buffer = vf->aq_resp;
 	args.out_size = IAVF_AQ_BUF_SZ;
 	ret = iavf_execute_vf_cmd(adapter, &args);
-- 
2.30.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message
  2021-01-20  1:10 [dpdk-dev] [PATCH v1] net/iavf: rename the VLAN offload virtchnl message Haiyue Wang
  2021-01-20  3:15 ` [dpdk-dev] [PATCH v2] common/iavf: support VLAN filtering Haiyue Wang
@ 2021-01-20  4:17 ` Haiyue Wang
  2021-01-20  4:17   ` [dpdk-dev] [PATCH v3 1/2] common/iavf: support VLAN filtering Haiyue Wang
                     ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Haiyue Wang @ 2021-01-20  4:17 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, qi.z.zhang, qi.fu, Haiyue Wang

Haiyue Wang (2):
  common/iavf: support VLAN filtering
  net/iavf: align to the new VLAN offload name

 drivers/common/iavf/virtchnl.h | 67 ++++++++++++++++++++++++++++------
 drivers/net/iavf/iavf_vchnl.c  | 20 +++++-----
 2 files changed, 66 insertions(+), 21 deletions(-)

-- 
2.30.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v3 1/2] common/iavf: support VLAN filtering
  2021-01-20  4:17 ` [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message Haiyue Wang
@ 2021-01-20  4:17   ` Haiyue Wang
  2021-01-20  6:34     ` Xing, Beilei
  2021-01-20  4:17   ` [dpdk-dev] [PATCH v3 2/2] net/iavf: align to the new VLAN offload name Haiyue Wang
  2021-01-20  5:46   ` [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message Xing, Beilei
  2 siblings, 1 reply; 9+ messages in thread
From: Haiyue Wang @ 2021-01-20  4:17 UTC (permalink / raw)
  To: dev
  Cc: qiming.yang, qi.z.zhang, qi.fu, Haiyue Wang, Brett Creeley,
	Jingjing Wu, Beilei Xing

In order to support enable/disable VLAN filtering the VF has to
negotiate the capability via VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2. If
VIRTCHNL_VLAN_TOGGLE is allowed for the VLAN fitlering capabilities,
then there needs to be a method to allow this. Make the necessary
changes to support this.

Also, since the virtchnl_vlan_offload message has the desired format,
change the structure name to virtchnl_vlan_setting so it can be used for
VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2 and
VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/common/iavf/virtchnl.h | 67 ++++++++++++++++++++++++++++------
 drivers/net/iavf/iavf_vchnl.c  |  4 +-
 2 files changed, 58 insertions(+), 13 deletions(-)

diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index 09e42f034c..6b99e170f0 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -149,6 +149,8 @@ enum virtchnl_ops {
 	VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2 = 55,
 	VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 = 56,
 	VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2 = 57,
+	VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2 = 58,
+	VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2 = 59,
 	VIRTCHNL_OP_ENABLE_QUEUES_V2 = 107,
 	VIRTCHNL_OP_DISABLE_QUEUES_V2 = 108,
 	VIRTCHNL_OP_MAP_QUEUE_VECTOR = 111,
@@ -258,6 +260,10 @@ static inline const char *virtchnl_op_str(enum virtchnl_ops v_opcode)
 		return "VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2";
 	case VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2:
 		return "VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2";
+	case VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2:
+		return "VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2";
+	case VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2:
+		return "VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2";
 	case VIRTCHNL_OP_MAX:
 		return "VIRTCHNL_OP_MAX";
 	default:
@@ -914,13 +920,13 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);
  *
  * In order to enable inner (again note that in this case inner is the outer
  * most or single VLAN from the VF's perspective) VLAN stripping for 0x8100
- * VLANs, the VF would populate the virtchnl_vlan_offload structure in the
+ * VLANs, the VF would populate the virtchnl_vlan_setting structure in the
  * following manner and send the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 message.
  *
- * virtchnl_vlan_offload.inner_ethertype_setting =
+ * virtchnl_vlan_setting.inner_ethertype_setting =
  *			VIRTCHNL_VLAN_ETHERTYPE_8100;
  *
- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on
+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on
  * initialization.
  *
  * The reason that VLAN TPID(s) are not being used for the
@@ -952,11 +958,11 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);
  * would populate the virthcnl_vlan_offload_structure in the following manner
  * and send the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 message.
  *
- * virtchnl_vlan_offload.outer_ethertype_setting =
+ * virtchnl_vlan_setting.outer_ethertype_setting =
  *			VIRTHCNL_VLAN_ETHERTYPE_8100 |
  *			VIRTHCNL_VLAN_ETHERTYPE_88A8;
  *
- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on
+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on
  * initialization.
  *
  * There is also the case where a PF and the underlying hardware can support
@@ -981,24 +987,61 @@ VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_vlan_filter_list_v2);
  *			VIRTCHNL_ETHERTYPE_STRIPPING_MATCHES_INSERTION;
  *
  * In order to enable outer VLAN stripping for 0x88a8 VLANs, the VF would
- * populate the virtchnl_vlan_offload_structure in the following manner and send
+ * populate the virtchnl_vlan_setting structure in the following manner and send
  * the VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2. Also, this will change the
  * ethertype for VLAN insertion if it's enabled. So, for completeness, a
  * VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 with the same ethertype should be sent.
  *
- * virtchnl_vlan_offload.outer_ethertype_setting = VIRTHCNL_VLAN_ETHERTYPE_88A8;
+ * virtchnl_vlan_setting.outer_ethertype_setting = VIRTHCNL_VLAN_ETHERTYPE_88A8;
  *
- * virtchnl_vlan_offload.vport_id = vport_id or vsi_id assigned to the VF on
+ * virtchnl_vlan_setting.vport_id = vport_id or vsi_id assigned to the VF on
  * initialization.
+ *
+ * VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2
+ * VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2
+ *
+ * VF sends this message to enable or disable VLAN filtering. It also needs to
+ * specify an ethertype. The VF knows which VLAN ethertypes are allowed and
+ * whether or not it's allowed to enable/disable filtering via the
+ * VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS message. The VF needs to
+ * parse the virtchnl_vlan_caps.filtering fields to determine which, if any,
+ * filtering messages are allowed.
+ *
+ * For example, if the PF populates the virtchnl_vlan_caps.filtering in the
+ * following manner the VF will be allowed to enable/disable 0x8100 and 0x88a8
+ * outer VLAN filtering together. Note, that the VIRTCHNL_VLAN_ETHERTYPE_AND
+ * means that all filtering ethertypes will to be enabled and disabled together
+ * regardless of the request from the VF. This means that the underlying
+ * hardware only supports VLAN filtering for all VLAN the specified ethertypes
+ * or none of them.
+ *
+ * virtchnl_vlan_caps.filtering.filtering_support.outer =
+ *			VIRTCHNL_VLAN_TOGGLE |
+ *			VIRTCHNL_VLAN_ETHERTYPE_8100 |
+ *			VIRTHCNL_VLAN_ETHERTYPE_88A8 |
+ *			VIRTCHNL_VLAN_ETHERTYPE_9100 |
+ *			VIRTCHNL_VLAN_ETHERTYPE_AND;
+ *
+ * In order to enable outer VLAN filtering for 0x88a8 and 0x8100 VLANs (0x9100
+ * VLANs aren't supported by the VF driver), the VF would populate the
+ * virtchnl_vlan_setting structure in the following manner and send the
+ * VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2. The same message format would be used
+ * to disable outer VLAN filtering for 0x88a8 and 0x8100 VLANs, but the
+ * VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2 opcode is used.
+ *
+ * virtchnl_vlan_setting.outer_ethertype_setting =
+ *			VIRTCHNL_VLAN_ETHERTYPE_8100 |
+ *			VIRTCHNL_VLAN_ETHERTYPE_88A8;
+ *
  */
-struct virtchnl_vlan_offload {
+struct virtchnl_vlan_setting {
 	u32 outer_ethertype_setting;
 	u32 inner_ethertype_setting;
 	u16 vport_id;
 	u8 pad[6];
 };
 
-VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vlan_offload);
+VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vlan_setting);
 
 /* VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE
  * VF sends VSI id and flags.
@@ -2017,7 +2060,9 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
 	case VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2:
 	case VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2:
 	case VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2:
-		valid_len = sizeof(struct virtchnl_vlan_offload);
+	case VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2:
+	case VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2:
+		valid_len = sizeof(struct virtchnl_vlan_setting);
 		break;
 	case VIRTCHNL_OP_ENABLE_QUEUES_V2:
 	case VIRTCHNL_OP_DISABLE_QUEUES_V2:
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 3ef29d509d..426ddb6c7e 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -529,7 +529,7 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)
 {
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	struct virtchnl_vlan_supported_caps *supported_caps;
-	struct virtchnl_vlan_offload vlan_strip;
+	struct virtchnl_vlan_setting vlan_strip;
 	struct iavf_cmd_info args;
 	uint32_t stripping_caps;
 	uint32_t *vlan_setting;
@@ -571,7 +571,7 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)
 {
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	struct virtchnl_vlan_supported_caps *supported_caps;
-	struct virtchnl_vlan_offload vlan_insert;
+	struct virtchnl_vlan_setting vlan_insert;
 	struct iavf_cmd_info args;
 	uint32_t insertion_caps;
 	uint32_t *vlan_setting;
-- 
2.30.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v3 2/2] net/iavf: align to the new VLAN offload name
  2021-01-20  4:17 ` [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message Haiyue Wang
  2021-01-20  4:17   ` [dpdk-dev] [PATCH v3 1/2] common/iavf: support VLAN filtering Haiyue Wang
@ 2021-01-20  4:17   ` Haiyue Wang
  2021-01-20  6:35     ` Xing, Beilei
  2021-01-20  5:46   ` [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message Xing, Beilei
  2 siblings, 1 reply; 9+ messages in thread
From: Haiyue Wang @ 2021-01-20  4:17 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, qi.z.zhang, qi.fu, Haiyue Wang, Jingjing Wu, Beilei Xing

Since the VLAN offload virtchnl message name has been renamed to setting
style, the internal Ethernet type setting name needs be changed to avoid
confusing.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 426ddb6c7e..c82925eceb 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -532,16 +532,16 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)
 	struct virtchnl_vlan_setting vlan_strip;
 	struct iavf_cmd_info args;
 	uint32_t stripping_caps;
-	uint32_t *vlan_setting;
+	uint32_t *ethertype;
 	int ret;
 
 	supported_caps = &vf->vlan_v2_caps.offloads.stripping_support;
 	if (supported_caps->outer) {
 		stripping_caps = supported_caps->outer;
-		vlan_setting = &vlan_strip.outer_ethertype_setting;
+		ethertype = &vlan_strip.outer_ethertype_setting;
 	} else {
 		stripping_caps = supported_caps->inner;
-		vlan_setting = &vlan_strip.inner_ethertype_setting;
+		ethertype = &vlan_strip.inner_ethertype_setting;
 	}
 
 	if (!(stripping_caps & VIRTCHNL_VLAN_ETHERTYPE_8100))
@@ -549,7 +549,7 @@ iavf_config_vlan_strip_v2(struct iavf_adapter *adapter, bool enable)
 
 	memset(&vlan_strip, 0, sizeof(vlan_strip));
 	vlan_strip.vport_id = vf->vsi_res->vsi_id;
-	*vlan_setting = VIRTCHNL_VLAN_ETHERTYPE_8100;
+	*ethertype = VIRTCHNL_VLAN_ETHERTYPE_8100;
 
 	args.ops = enable ? VIRTCHNL_OP_ENABLE_VLAN_STRIPPING_V2 :
 			    VIRTCHNL_OP_DISABLE_VLAN_STRIPPING_V2;
@@ -574,16 +574,16 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)
 	struct virtchnl_vlan_setting vlan_insert;
 	struct iavf_cmd_info args;
 	uint32_t insertion_caps;
-	uint32_t *vlan_setting;
+	uint32_t *ethertype;
 	int ret;
 
 	supported_caps = &vf->vlan_v2_caps.offloads.insertion_support;
 	if (supported_caps->outer) {
 		insertion_caps = supported_caps->outer;
-		vlan_setting = &vlan_insert.outer_ethertype_setting;
+		ethertype = &vlan_insert.outer_ethertype_setting;
 	} else {
 		insertion_caps = supported_caps->inner;
-		vlan_setting = &vlan_insert.inner_ethertype_setting;
+		ethertype = &vlan_insert.inner_ethertype_setting;
 	}
 
 	if (!(insertion_caps & VIRTCHNL_VLAN_ETHERTYPE_8100))
@@ -591,7 +591,7 @@ iavf_config_vlan_insert_v2(struct iavf_adapter *adapter, bool enable)
 
 	memset(&vlan_insert, 0, sizeof(vlan_insert));
 	vlan_insert.vport_id = vf->vsi_res->vsi_id;
-	*vlan_setting = VIRTCHNL_VLAN_ETHERTYPE_8100;
+	*ethertype = VIRTCHNL_VLAN_ETHERTYPE_8100;
 
 	args.ops = enable ? VIRTCHNL_OP_ENABLE_VLAN_INSERTION_V2 :
 			    VIRTCHNL_OP_DISABLE_VLAN_INSERTION_V2;
-- 
2.30.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message
  2021-01-20  4:17 ` [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message Haiyue Wang
  2021-01-20  4:17   ` [dpdk-dev] [PATCH v3 1/2] common/iavf: support VLAN filtering Haiyue Wang
  2021-01-20  4:17   ` [dpdk-dev] [PATCH v3 2/2] net/iavf: align to the new VLAN offload name Haiyue Wang
@ 2021-01-20  5:46   ` Xing, Beilei
  2021-01-20 10:16     ` Zhang, Qi Z
  2 siblings, 1 reply; 9+ messages in thread
From: Xing, Beilei @ 2021-01-20  5:46 UTC (permalink / raw)
  To: Wang, Haiyue, dev; +Cc: Yang, Qiming, Zhang, Qi Z, Fu, Qi, Wang, Haiyue



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Haiyue Wang
> Sent: Wednesday, January 20, 2021 12:18 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Fu, Qi <qi.fu@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>
> Subject: [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message
> 
> Haiyue Wang (2):
>   common/iavf: support VLAN filtering
>   net/iavf: align to the new VLAN offload name
> 
>  drivers/common/iavf/virtchnl.h | 67 ++++++++++++++++++++++++++++------
>  drivers/net/iavf/iavf_vchnl.c  | 20 +++++-----
>  2 files changed, 66 insertions(+), 21 deletions(-)
> 
> --
> 2.30.0

Acked-by: Beilei Xing <beilei.xing@intel.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/2] common/iavf: support VLAN filtering
  2021-01-20  4:17   ` [dpdk-dev] [PATCH v3 1/2] common/iavf: support VLAN filtering Haiyue Wang
@ 2021-01-20  6:34     ` Xing, Beilei
  0 siblings, 0 replies; 9+ messages in thread
From: Xing, Beilei @ 2021-01-20  6:34 UTC (permalink / raw)
  To: Wang, Haiyue, dev
  Cc: Yang, Qiming, Zhang, Qi Z, Fu, Qi, Creeley, Brett, Wu, Jingjing



> -----Original Message-----
> From: Wang, Haiyue <haiyue.wang@intel.com>
> Sent: Wednesday, January 20, 2021 12:18 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Fu, Qi <qi.fu@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>; Creeley, Brett <brett.creeley@intel.com>; Wu,
> Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Subject: [PATCH v3 1/2] common/iavf: support VLAN filtering
> 
> In order to support enable/disable VLAN filtering the VF has to negotiate the
> capability via VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2. If
> VIRTCHNL_VLAN_TOGGLE is allowed for the VLAN fitlering capabilities, then
> there needs to be a method to allow this. Make the necessary changes to
> support this.
> 
> Also, since the virtchnl_vlan_offload message has the desired format, change
> the structure name to virtchnl_vlan_setting so it can be used for
> VIRTCHNL_OP_ENABLE_VLAN_FILTERING_V2 and
> VIRTCHNL_OP_DISABLE_VLAN_FILTERING_V2.
> 
> Signed-off-by: Brett Creeley <brett.creeley@intel.com>
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> ---

Acked-by: Beilei Xing <beilei.xing@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3 2/2] net/iavf: align to the new VLAN offload name
  2021-01-20  4:17   ` [dpdk-dev] [PATCH v3 2/2] net/iavf: align to the new VLAN offload name Haiyue Wang
@ 2021-01-20  6:35     ` Xing, Beilei
  0 siblings, 0 replies; 9+ messages in thread
From: Xing, Beilei @ 2021-01-20  6:35 UTC (permalink / raw)
  To: Wang, Haiyue, dev; +Cc: Yang, Qiming, Zhang, Qi Z, Fu, Qi, Wu, Jingjing



> -----Original Message-----
> From: Wang, Haiyue <haiyue.wang@intel.com>
> Sent: Wednesday, January 20, 2021 12:18 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Fu, Qi <qi.fu@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Subject: [PATCH v3 2/2] net/iavf: align to the new VLAN offload name
> 
> Since the VLAN offload virtchnl message name has been renamed to setting
> style, the internal Ethernet type setting name needs be changed to avoid
> confusing.
> 
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message
  2021-01-20  5:46   ` [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message Xing, Beilei
@ 2021-01-20 10:16     ` Zhang, Qi Z
  0 siblings, 0 replies; 9+ messages in thread
From: Zhang, Qi Z @ 2021-01-20 10:16 UTC (permalink / raw)
  To: Xing, Beilei, Wang, Haiyue, dev; +Cc: Yang, Qiming, Fu, Qi, Wang, Haiyue



> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Wednesday, January 20, 2021 1:46 PM
> To: Wang, Haiyue <haiyue.wang@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> Fu, Qi <qi.fu@intel.com>; Wang, Haiyue <haiyue.wang@intel.com>
> Subject: RE: [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message
> 
> 
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Haiyue Wang
> > Sent: Wednesday, January 20, 2021 12:18 PM
> > To: dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; Fu, Qi <qi.fu@intel.com>; Wang, Haiyue
> > <haiyue.wang@intel.com>
> > Subject: [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload
> > message
> >
> > Haiyue Wang (2):
> >   common/iavf: support VLAN filtering
> >   net/iavf: align to the new VLAN offload name
> >
> >  drivers/common/iavf/virtchnl.h | 67
> > ++++++++++++++++++++++++++++------
> >  drivers/net/iavf/iavf_vchnl.c  | 20 +++++-----
> >  2 files changed, 66 insertions(+), 21 deletions(-)
> >
> > --
> > 2.30.0
> 
> Acked-by: Beilei Xing <beilei.xing@intel.com>
> 
Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-01-20 10:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20  1:10 [dpdk-dev] [PATCH v1] net/iavf: rename the VLAN offload virtchnl message Haiyue Wang
2021-01-20  3:15 ` [dpdk-dev] [PATCH v2] common/iavf: support VLAN filtering Haiyue Wang
2021-01-20  4:17 ` [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message Haiyue Wang
2021-01-20  4:17   ` [dpdk-dev] [PATCH v3 1/2] common/iavf: support VLAN filtering Haiyue Wang
2021-01-20  6:34     ` Xing, Beilei
2021-01-20  4:17   ` [dpdk-dev] [PATCH v3 2/2] net/iavf: align to the new VLAN offload name Haiyue Wang
2021-01-20  6:35     ` Xing, Beilei
2021-01-20  5:46   ` [dpdk-dev] [PATCH v3 0/2] iavf: update the VLAN offload message Xing, Beilei
2021-01-20 10:16     ` Zhang, Qi Z

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git