dpdk: DPDK 20.05 iavf flow director backporting to DPDK 20.02
[vpp.git] / build / external / patches / dpdk_20.02 / 0005-common-iavf-add-virtual-channel-support-for-Flex-RXD.patch
1 From 296799a9a9006e4c99e428c52818d1e34b26aec2 Mon Sep 17 00:00:00 2001
2 From: Chenmin Sun <chenmin.sun@intel.com>
3 Date: Fri, 17 Apr 2020 01:49:08 +0800
4 Subject: [DPDK 05/17] common/iavf: add virtual channel support for Flex RXD
5
6 Add new VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC flag, opcode
7 VIRTCHNL_OP_GET_SUPPORTED_RXDIDS and add member rxdid
8 in struct virtchnl_rxq_info to support AVF Flex RXD
9 extension.
10
11 Signed-off-by: Leyi Rong <leyi.rong@intel.com>
12 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
13 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
14 Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
15 ---
16  drivers/common/iavf/virtchnl.h | 14 +++++++++++++-
17  1 file changed, 13 insertions(+), 1 deletion(-)
18
19 diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
20 index 6f9cf18cb..e8d936843 100644
21 --- a/drivers/common/iavf/virtchnl.h
22 +++ b/drivers/common/iavf/virtchnl.h
23 @@ -133,6 +133,7 @@ enum virtchnl_ops {
24         VIRTCHNL_OP_DCF_CMD_BUFF = 40,
25         VIRTCHNL_OP_DCF_GET_VSI_MAP = 42,
26         VIRTCHNL_OP_DCF_GET_PKG_INFO = 43,
27 +       VIRTCHNL_OP_GET_SUPPORTED_RXDIDS = 44,
28  };
29  
30  /* These macros are used to generate compilation errors if a structure/union
31 @@ -247,6 +248,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
32  #define VIRTCHNL_VF_OFFLOAD_ADQ                        0X00800000
33  #define VIRTCHNL_VF_OFFLOAD_ADQ_V2             0X01000000
34  #define VIRTCHNL_VF_OFFLOAD_USO                        0X02000000
35 +#define VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC       0X04000000
36         /* 0X80000000 is reserved */
37  
38  /* Define below the capability flags that are not offloads */
39 @@ -332,7 +334,9 @@ struct virtchnl_rxq_info {
40         u32 databuffer_size;
41         u32 max_pkt_size;
42         u8 crc_disable;
43 -       u8 pad1[3];
44 +       /* only used when VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC is supported */
45 +       u8 rxdid;
46 +       u8 pad1[2];
47         u64 dma_ring_addr;
48         enum virtchnl_rx_hsplit rx_split_pos; /* deprecated with AVF 1.0 */
49         u32 pad2;
50 @@ -665,6 +669,12 @@ struct virtchnl_dcf_vsi_map {
51  
52  VIRTCHNL_CHECK_STRUCT_LEN(6, virtchnl_dcf_vsi_map);
53  
54 +struct virtchnl_supported_rxdids {
55 +       u64 supported_rxdids;
56 +};
57 +
58 +VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_supported_rxdids);
59 +
60  /* VIRTCHNL_OP_EVENT
61   * PF sends this message to inform the VF driver of events that may affect it.
62   * No direct response is expected from the VF, though it may generate other
63 @@ -937,6 +947,8 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,
64                  return 0;
65         case VIRTCHNL_OP_DCF_GET_PKG_INFO:
66                 break;
67 +       case VIRTCHNL_OP_GET_SUPPORTED_RXDIDS:
68 +               break;
69         case VIRTCHNL_OP_DCF_GET_VSI_MAP:
70                 /* The two opcodes are required by DCF without message buffer,
71                  * so the valid length keeps the default value 0.
72 -- 
73 2.17.1
74