* [dpdk-dev] [PATCH 0/5] iavf base code update
@ 2020-09-11 1:30 Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 1/5] common/iavf: use pad byte to specify MAC type Qi Zhang
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Qi Zhang @ 2020-09-11 1:30 UTC (permalink / raw)
To: beilei.xing; +Cc: dev, Qi Zhang
Couple virtual channel updates.
Qi Zhang (5):
common/iavf: use pad byte to specify MAC type
common/iavf: minor code clean on virtchnl
common/iavf: save max MTU received from PF
common/iavf: add GTPC support
common/iavf: add proto hdr field support for ipv6 prefix
drivers/common/iavf/iavf_common.c | 1 +
drivers/common/iavf/iavf_type.h | 1 +
drivers/common/iavf/virtchnl.h | 58 +++++++++++++++++++++++++++++++++------
3 files changed, 52 insertions(+), 8 deletions(-)
--
2.13.6
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 1/5] common/iavf: use pad byte to specify MAC type
2020-09-11 1:30 [dpdk-dev] [PATCH 0/5] iavf base code update Qi Zhang
@ 2020-09-11 1:30 ` Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 2/5] common/iavf: minor code clean on virtchnl Qi Zhang
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Qi Zhang @ 2020-09-11 1:30 UTC (permalink / raw)
To: beilei.xing; +Cc: dev, Qi Zhang, Brett Creeley
Currently, there is no way for a VF driver to specify that it wants to
change its device/primary unicast MAC address. This makes it
difficult/impossible for the PF driver to track the VF's device/primary
unicast MAC address, which is used for VM/VF reboot and displaying on
the host. Fix this by using 2 bits of a pad byte in the
virtchnl_ether_addr structure so the VF can specify what type of MAC
it's adding/deleting.
Below are the values that should be used by all VF drivers going
forward.
VIRTCHNL_ETHER_ADDR_LEGACY(0):
- The type should only ever be 0 for legacy AVF drivers (i.e.
drivers that don't support the new type bits). The PF drivers
will track VF's device/primary unicast MAC using with best
effort.
VIRTCHNL_ETHER_ADDR_PRIMARY(1):
- This type should only be used when the VF is changing their
device/primary unicast MAC. It should be used for both delete
and add cases related to the device/primary unicast MAC.
VIRTCHNL_ETHER_ADDR_EXTRA(2):
- This type should be used when the VF is adding and/or deleting
MAC addresses that are not the device/primary unicast MAC. For
example, extra unicast addresses and multicast addresses
assuming the PF supports "extra" addresses at all.
If a PF is parsing the type field of the virtchnl_ether_addr, then it
should use the VIRTCHNL_ETHER_ADDR_TYPE_MASK to mask the first two bits
of the type field since 0, 1, and 2 are the only valid values.
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/common/iavf/virtchnl.h | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index 79515ee8b..d93ef31ec 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -435,9 +435,36 @@ VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_select);
* PF removes the filters and returns status.
*/
+/* VIRTCHNL_ETHER_ADDR_LEGACY
+ * Prior to adding the @type member to virtchnl_ether_addr, there were 2 pad
+ * bytes. Moving forward all VF drivers should not set type to
+ * VIRTCHNL_ETHER_ADDR_LEGACY. This is only here to not break previous/legacy
+ * behavior. The control plane function (i.e. PF) can use a best effort method
+ * of tracking the primary/device unicast in this case, but there is no
+ * guarantee and functionality depends on the implementation of the PF.
+ */
+
+/* VIRTCHNL_ETHER_ADDR_PRIMARY
+ * All VF drivers should set @type to VIRTCHNL_ETHER_ADDR_PRIMARY for the
+ * primary/device unicast MAC address filter for VIRTCHNL_OP_ADD_ETH_ADDR and
+ * VIRTCHNL_OP_DEL_ETH_ADDR. This allows for the underlying control plane
+ * function (i.e. PF) to accurately track and use this MAC address for
+ * displaying on the host and for VM/function reset.
+ */
+
+/* VIRTCHNL_ETHER_ADDR_EXTRA
+ * All VF drivers should set @type to VIRTCHNL_ETHER_ADDR_EXTRA for any extra
+ * unicast and/or multicast filters that are being added/deleted via
+ * VIRTCHNL_OP_DEL_ETH_ADDR/VIRTCHNL_OP_ADD_ETH_ADDR respectively.
+ */
struct virtchnl_ether_addr {
u8 addr[VIRTCHNL_ETH_LENGTH_OF_ADDRESS];
- u8 pad[2];
+ u8 type;
+#define VIRTCHNL_ETHER_ADDR_LEGACY 0
+#define VIRTCHNL_ETHER_ADDR_PRIMARY 1
+#define VIRTCHNL_ETHER_ADDR_EXTRA 2
+#define VIRTCHNL_ETHER_ADDR_TYPE_MASK 3 /* first two bits of type are valid */
+ u8 pad;
};
VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_ether_addr);
--
2.13.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 2/5] common/iavf: minor code clean on virtchnl
2020-09-11 1:30 [dpdk-dev] [PATCH 0/5] iavf base code update Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 1/5] common/iavf: use pad byte to specify MAC type Qi Zhang
@ 2020-09-11 1:30 ` Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 3/5] common/iavf: save max MTU received from PF Qi Zhang
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Qi Zhang @ 2020-09-11 1:30 UTC (permalink / raw)
To: beilei.xing; +Cc: dev, Qi Zhang
1. use BIT to replace <<
2. move VIRTCHNL_VF_CAP_DCF to keep order
3. align the vc msg validate
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/common/iavf/virtchnl.h | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index d93ef31ec..ebce68d60 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -254,10 +254,11 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
#define VIRTCHNL_VF_OFFLOAD_ADQ 0X00800000
#define VIRTCHNL_VF_OFFLOAD_ADQ_V2 0X01000000
#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
#define VIRTCHNL_VF_OFFLOAD_FDIR_PF 0X10000000
+ /* 0X20000000 is reserved */
+#define VIRTCHNL_VF_CAP_DCF 0X40000000
/* 0X80000000 is reserved */
/* Define below the capability flags that are not offloads */
@@ -690,7 +691,7 @@ struct virtchnl_dcf_vsi_map {
u16 num_vfs; /* The actual number of VFs allocated */
#define VIRTCHNL_DCF_VF_VSI_ID_S 0
#define VIRTCHNL_DCF_VF_VSI_ID_M (0xFFF << VIRTCHNL_DCF_VF_VSI_ID_S)
-#define VIRTCHNL_DCF_VF_VSI_VALID (1 << 15)
+#define VIRTCHNL_DCF_VF_VSI_VALID BIT(15)
u16 vf_vsi[1];
};
@@ -1299,13 +1300,10 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
/* These two opcodes are specific to handle the AdminQ command,
* so the validation needs to be done in PF's context.
*/
- return 0;
+ valid_len = msglen;
+ break;
case VIRTCHNL_OP_DCF_DISABLE:
case VIRTCHNL_OP_DCF_GET_VSI_MAP:
- /* The two opcodes are required by DCF without message buffer,
- * so the valid length keeps the default value 0.
- */
- break;
case VIRTCHNL_OP_DCF_GET_PKG_INFO:
break;
case VIRTCHNL_OP_GET_SUPPORTED_RXDIDS:
--
2.13.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 3/5] common/iavf: save max MTU received from PF
2020-09-11 1:30 [dpdk-dev] [PATCH 0/5] iavf base code update Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 1/5] common/iavf: use pad byte to specify MAC type Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 2/5] common/iavf: minor code clean on virtchnl Qi Zhang
@ 2020-09-11 1:30 ` Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 4/5] common/iavf: add GTPC support Qi Zhang
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Qi Zhang @ 2020-09-11 1:30 UTC (permalink / raw)
To: beilei.xing; +Cc: dev, Qi Zhang, Brett Creeley
Most values from the VIRTCHNL_OP_GET_VF_RESOURCES are stored in the
iavf_hw_capabilities structure. Unfortunately, it seems that
max_mtu was missed. Add this member to the structure and save it when
parsing hw config.
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/common/iavf/iavf_common.c | 1 +
drivers/common/iavf/iavf_type.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/common/iavf/iavf_common.c b/drivers/common/iavf/iavf_common.c
index 57ec1ff39..c951b7d78 100644
--- a/drivers/common/iavf/iavf_common.c
+++ b/drivers/common/iavf/iavf_common.c
@@ -975,6 +975,7 @@ void iavf_vf_parse_hw_config(struct iavf_hw *hw,
hw->dev_caps.num_msix_vectors_vf = msg->max_vectors;
hw->dev_caps.dcb = msg->vf_cap_flags &
VIRTCHNL_VF_OFFLOAD_L2;
+ hw->dev_caps.max_mtu = msg->max_mtu;
for (i = 0; i < msg->num_vsis; i++) {
if (vsi_res->vsi_type == VIRTCHNL_VSI_SRIOV) {
iavf_memcpy(hw->mac.perm_addr,
diff --git a/drivers/common/iavf/iavf_type.h b/drivers/common/iavf/iavf_type.h
index 665b070a0..0990c9aa3 100644
--- a/drivers/common/iavf/iavf_type.h
+++ b/drivers/common/iavf/iavf_type.h
@@ -224,6 +224,7 @@ struct iavf_hw_capabilities {
u32 num_tx_qp;
u32 base_queue;
u32 num_msix_vectors_vf;
+ u32 max_mtu;
bool apm_wol_support;
enum iavf_acpi_programming_method acpi_prog_method;
bool proxy_support;
--
2.13.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 4/5] common/iavf: add GTPC support
2020-09-11 1:30 [dpdk-dev] [PATCH 0/5] iavf base code update Qi Zhang
` (2 preceding siblings ...)
2020-09-11 1:30 ` [dpdk-dev] [PATCH 3/5] common/iavf: save max MTU received from PF Qi Zhang
@ 2020-09-11 1:30 ` Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 5/5] common/iavf: add proto hdr field support for ipv6 prefix Qi Zhang
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Qi Zhang @ 2020-09-11 1:30 UTC (permalink / raw)
To: beilei.xing; +Cc: dev, Qi Zhang
Add GTPC header and its field selector.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/common/iavf/virtchnl.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index ebce68d60..b291abec7 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -880,6 +880,7 @@ enum virtchnl_proto_hdr_type {
VIRTCHNL_PROTO_HDR_ESP,
VIRTCHNL_PROTO_HDR_AH,
VIRTCHNL_PROTO_HDR_PFCP,
+ VIRTCHNL_PROTO_HDR_GTPC,
};
/* Protocol header field within a protocol header. */
@@ -944,6 +945,9 @@ enum virtchnl_proto_hdr_field {
VIRTCHNL_PROTO_HDR_PFCP_S_FIELD =
PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_PFCP),
VIRTCHNL_PROTO_HDR_PFCP_SEID,
+ /* GTPC */
+ VIRTCHNL_PROTO_HDR_GTPC_TEID =
+ PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_GTPC),
};
struct virtchnl_proto_hdr {
--
2.13.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH 5/5] common/iavf: add proto hdr field support for ipv6 prefix
2020-09-11 1:30 [dpdk-dev] [PATCH 0/5] iavf base code update Qi Zhang
` (3 preceding siblings ...)
2020-09-11 1:30 ` [dpdk-dev] [PATCH 4/5] common/iavf: add GTPC support Qi Zhang
@ 2020-09-11 1:30 ` Qi Zhang
2020-09-11 2:22 ` [dpdk-dev] [PATCH 0/5] iavf base code update Xing, Beilei
2020-09-11 5:08 ` Xing, Beilei
6 siblings, 0 replies; 9+ messages in thread
From: Qi Zhang @ 2020-09-11 1:30 UTC (permalink / raw)
To: beilei.xing; +Cc: dev, Qi Zhang, Junfeng Guo
Some IPv6 prefix related protocol header fields are defined in this
patch, so that we can use prefix instead of full IPv6 address for RSS.
Ref https://tools.ietf.org/html/rfc6052.
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/common/iavf/virtchnl.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index b291abec7..81eabd73b 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -910,6 +910,19 @@ enum virtchnl_proto_hdr_field {
VIRTCHNL_PROTO_HDR_IPV6_TC,
VIRTCHNL_PROTO_HDR_IPV6_HOP_LIMIT,
VIRTCHNL_PROTO_HDR_IPV6_PROT,
+ /* IPV6 Prefix */
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX32_SRC,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX32_DST,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX40_SRC,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX40_DST,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX48_SRC,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX48_DST,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX56_SRC,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX56_DST,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX64_SRC,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX64_DST,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX96_SRC,
+ VIRTCHNL_PROTO_HDR_IPV6_PREFIX96_DST,
/* TCP */
VIRTCHNL_PROTO_HDR_TCP_SRC_PORT =
PROTO_HDR_FIELD_START(VIRTCHNL_PROTO_HDR_TCP),
--
2.13.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 0/5] iavf base code update
2020-09-11 1:30 [dpdk-dev] [PATCH 0/5] iavf base code update Qi Zhang
` (4 preceding siblings ...)
2020-09-11 1:30 ` [dpdk-dev] [PATCH 5/5] common/iavf: add proto hdr field support for ipv6 prefix Qi Zhang
@ 2020-09-11 2:22 ` Xing, Beilei
2020-09-11 5:08 ` Xing, Beilei
6 siblings, 0 replies; 9+ messages in thread
From: Xing, Beilei @ 2020-09-11 2:22 UTC (permalink / raw)
To: Zhang, Qi Z; +Cc: dev
> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Friday, September 11, 2020 9:31 AM
> To: Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH 0/5] iavf base code update
>
> Couple virtual channel updates.
>
> Qi Zhang (5):
> common/iavf: use pad byte to specify MAC type
> common/iavf: minor code clean on virtchnl
> common/iavf: save max MTU received from PF
> common/iavf: add GTPC support
> common/iavf: add proto hdr field support for ipv6 prefix
README also needs update.
>
> drivers/common/iavf/iavf_common.c | 1 +
> drivers/common/iavf/iavf_type.h | 1 +
> drivers/common/iavf/virtchnl.h | 58
> +++++++++++++++++++++++++++++++++------
> 3 files changed, 52 insertions(+), 8 deletions(-)
>
> --
> 2.13.6
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 0/5] iavf base code update
2020-09-11 1:30 [dpdk-dev] [PATCH 0/5] iavf base code update Qi Zhang
` (5 preceding siblings ...)
2020-09-11 2:22 ` [dpdk-dev] [PATCH 0/5] iavf base code update Xing, Beilei
@ 2020-09-11 5:08 ` Xing, Beilei
2020-09-11 8:08 ` Zhang, Qi Z
6 siblings, 1 reply; 9+ messages in thread
From: Xing, Beilei @ 2020-09-11 5:08 UTC (permalink / raw)
To: Zhang, Qi Z; +Cc: dev
> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Friday, September 11, 2020 9:31 AM
> To: Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH 0/5] iavf base code update
>
> Couple virtual channel updates.
>
> Qi Zhang (5):
> common/iavf: use pad byte to specify MAC type
> common/iavf: minor code clean on virtchnl
> common/iavf: save max MTU received from PF
> common/iavf: add GTPC support
> common/iavf: add proto hdr field support for ipv6 prefix
>
> drivers/common/iavf/iavf_common.c | 1 +
> drivers/common/iavf/iavf_type.h | 1 +
> drivers/common/iavf/virtchnl.h | 58
> +++++++++++++++++++++++++++++++++------
> 3 files changed, 52 insertions(+), 8 deletions(-)
>
> --
> 2.13.6
Acked-by: Beilei Xing <beilei.xing@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH 0/5] iavf base code update
2020-09-11 5:08 ` Xing, Beilei
@ 2020-09-11 8:08 ` Zhang, Qi Z
0 siblings, 0 replies; 9+ messages in thread
From: Zhang, Qi Z @ 2020-09-11 8:08 UTC (permalink / raw)
To: Xing, Beilei; +Cc: dev
> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Friday, September 11, 2020 1:08 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH 0/5] iavf base code update
>
>
>
> > -----Original Message-----
> > From: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Sent: Friday, September 11, 2020 9:31 AM
> > To: Xing, Beilei <beilei.xing@intel.com>
> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> > Subject: [PATCH 0/5] iavf base code update
> >
> > Couple virtual channel updates.
> >
> > Qi Zhang (5):
> > common/iavf: use pad byte to specify MAC type
> > common/iavf: minor code clean on virtchnl
> > common/iavf: save max MTU received from PF
> > common/iavf: add GTPC support
> > common/iavf: add proto hdr field support for ipv6 prefix
> >
> > drivers/common/iavf/iavf_common.c | 1 +
> > drivers/common/iavf/iavf_type.h | 1 +
> > drivers/common/iavf/virtchnl.h | 58
> > +++++++++++++++++++++++++++++++++------
> > 3 files changed, 52 insertions(+), 8 deletions(-)
> >
> > --
> > 2.13.6
>
> 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:[~2020-09-11 8:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 1:30 [dpdk-dev] [PATCH 0/5] iavf base code update Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 1/5] common/iavf: use pad byte to specify MAC type Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 2/5] common/iavf: minor code clean on virtchnl Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 3/5] common/iavf: save max MTU received from PF Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 4/5] common/iavf: add GTPC support Qi Zhang
2020-09-11 1:30 ` [dpdk-dev] [PATCH 5/5] common/iavf: add proto hdr field support for ipv6 prefix Qi Zhang
2020-09-11 2:22 ` [dpdk-dev] [PATCH 0/5] iavf base code update Xing, Beilei
2020-09-11 5:08 ` Xing, Beilei
2020-09-11 8:08 ` Zhang, Qi Z
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.