[PATCH v4 1/4] common/iavf: support raw packet in protocol header
Zhang, Qi Z
qi.z.zhang at intel.com
Sat May 21 03:34:37 CEST 2022
> -----Original Message-----
> From: Guo, Junfeng <junfeng.guo at intel.com>
> Sent: Thursday, April 21, 2022 11:29 AM
> To: Zhang, Qi Z <qi.z.zhang at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>;
> Xing, Beilei <beilei.xing at intel.com>
> Cc: dev at dpdk.org; Xu, Ting <ting.xu at intel.com>; Guo, Junfeng
> <junfeng.guo at intel.com>
> Subject: [PATCH v4 1/4] common/iavf: support raw packet in protocol header
>
> The patch extends existing virtchnl_proto_hdrs structure to allow VF to pass a
> pair of buffers as packet data and mask that describe a match pattern of a
> filter rule. Then the kernel PF driver is requested to parse the pair of buffer and
> figure out low level hardware metadata (ptype, profile, field vector.. ) to
> program the expected FDIR or RSS rules.
>
> Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
> Signed-off-by: Junfeng Guo <junfeng.guo at intel.com>
This patch broken compilation, please make sure per patch compliable.
> ---
> drivers/common/iavf/virtchnl.h | 20 ++++++++++++++++----
> 1 file changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
> index 249ae6ed23..c9f6cab55b 100644
> --- a/drivers/common/iavf/virtchnl.h
> +++ b/drivers/common/iavf/virtchnl.h
> @@ -1484,6 +1484,7 @@ enum virtchnl_vfr_states { };
>
> #define VIRTCHNL_MAX_NUM_PROTO_HDRS 32
> +#define VIRTCHNL_MAX_SIZE_RAW_PACKET 1024
> #define PROTO_HDR_SHIFT 5
> #define PROTO_HDR_FIELD_START(proto_hdr_type) \
> (proto_hdr_type <<
> PROTO_HDR_SHIFT) @@ -1678,14 +1679,25 @@
> VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_proto_hdr); struct
> virtchnl_proto_hdrs {
> u8 tunnel_level;
> /**
> - * specify where protocol header start from.
> + * specify where protocol header start from. must be 0 when sending a
> raw packet request.
> * 0 - from the outer layer
> * 1 - from the first inner layer
> * 2 - from the second inner layer
> * ....
> - **/
> - int count; /* the proto layers must <
> VIRTCHNL_MAX_NUM_PROTO_HDRS */
> - struct virtchnl_proto_hdr
> proto_hdr[VIRTCHNL_MAX_NUM_PROTO_HDRS];
> + */
> + int count;
> + /**
> + * number of proto layers, must <
> VIRTCHNL_MAX_NUM_PROTO_HDRS
> + * must be 0 for a raw packet request.
> + */
> + union {
> + struct virtchnl_proto_hdr
> proto_hdr[VIRTCHNL_MAX_NUM_PROTO_HDRS];
> + struct {
> + u16 pkt_len;
> + u8 spec[VIRTCHNL_MAX_SIZE_RAW_PACKET];
> + u8 mask[VIRTCHNL_MAX_SIZE_RAW_PACKET];
> + } raw;
> + };
> };
>
> VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
> --
> 2.25.1
More information about the dev
mailing list