[dpdk-dev] [PATCH v3] net/iavf: support flex desc metadata extraction

Wang, Haiyue haiyue.wang at intel.com
Wed Sep 23 10:10:38 CEST 2020


> -----Original Message-----
> From: Guo, Jia <jia.guo at intel.com>
> Sent: Wednesday, September 23, 2020 15:53
> To: Wu, Jingjing <jingjing.wu at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>; Xing, Beilei
> <beilei.xing at intel.com>
> Cc: dev at dpdk.org; Wang, Haiyue <haiyue.wang at intel.com>; Guo, Jia <jia.guo at intel.com>
> Subject: [PATCH v3] net/iavf: support flex desc metadata extraction
> 
> Enable metadata extraction for flexible descriptors in AVF, that would
> allow network function directly get metadata without additional parsing
> which would reduce the CPU cost for VFs. The enabling metadata
> extractions involve the metadata of VLAN/IPv4/IPv6/IPv6-FLOW/TCP/MPLS
> flexible descriptors, and the VF could negotiate the capability of
> the flexible descriptor with PF and correspondingly configure the
> specific offload at receiving queues.
> 
> Signed-off-by: Jeff Guo <jia.guo at intel.com>
> ---
> v3:
> export these global symbols into .map
> 
> v2:
> remove makefile change and modify the rxdid handling
> ---
>  doc/guides/rel_notes/release_20_11.rst    |   6 +
>  drivers/net/iavf/iavf.h                   |  25 +-
>  drivers/net/iavf/iavf_ethdev.c            | 395 ++++++++++++++++++++++
>  drivers/net/iavf/iavf_rxtx.c              | 282 +++++++++++++--
>  drivers/net/iavf/iavf_rxtx.h              | 233 +++++++------
>  drivers/net/iavf/iavf_vchnl.c             |  22 +-
>  drivers/net/iavf/meson.build              |   2 +
>  drivers/net/iavf/rte_pmd_iavf.h           | 250 ++++++++++++++
>  drivers/net/iavf/rte_pmd_iavf_version.map |  13 +
>  9 files changed, 1081 insertions(+), 147 deletions(-)
>  create mode 100644 drivers/net/iavf/rte_pmd_iavf.h
> 


> +enum iavf_flex_desc_type {
> +	IAVF_FLEX_DESC_NONE,
> +	IAVF_FLEX_DESC_VLAN,
> +	IAVF_FLEX_DESC_IPV4,
> +	IAVF_FLEX_DESC_IPV6,
> +	IAVF_FLEX_DESC_IPV6_FLOW,
> +	IAVF_FLEX_DESC_TCP,
> +	IAVF_FLEX_DESC_OVS,
> +	IAVF_FLEX_DESC_IP_OFFSET,
> +	IAVF_FLEX_DESC_MAX,
> +};

The vector PMD will also support extract the above data type ? Take ice as
an example, if user specifies the 'proto_xtr', the vector Rx path will be
disabled, it will be handled in C function.

enum proto_xtr_type {
	PROTO_XTR_NONE,
	PROTO_XTR_VLAN,
	PROTO_XTR_IPV4,
	PROTO_XTR_IPV6,
	PROTO_XTR_IPV6_FLOW,
	PROTO_XTR_TCP,
	PROTO_XTR_IP_OFFSET,
	PROTO_XTR_MAX /* The last one */
};

static inline int
ice_rx_vec_queue_default(struct ice_rx_queue *rxq)
{
	...

	if (rxq->proto_xtr != PROTO_XTR_NONE)
		return -1;

	return 0;
}


> --
> 2.20.1



More information about the dev mailing list