ice: Add support Flex RXD
Subsystems (3)
PATCH v3 1/1 ice: Add support Flex RXD
From: Michal Jaron <[email protected]>
Add new VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC flag, opcode VIRTCHNL_OP_GET_SUPPORTED_RXDIDS and add member rxdid in struct virtchnl_rxq_info to support AVF Flex RXD extension.
Add support to allow VF to query flexible descriptor RXDIDs supported by DDP package and configure Rx queues with selected RXDID for IAVF.
Add code to allow VIRTCHNL_OP_GET_SUPPORTED_RXDIDS message to be processed. Add necessary macros for registers.
---
v3: Changed target tree from net to next
v2: Added missing sidned-off-by tag
--- drivers/net/ethernet/intel/ice/ice.h | 2 + .../net/ethernet/intel/ice/ice_hw_autogen.h | 3 + drivers/net/ethernet/intel/ice/ice_virtchnl.c | 86 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_virtchnl.h | 2 + .../intel/ice/ice_virtchnl_allowlist.c | 6 ++ include/linux/avf/virtchnl.h | 14 ++- 6 files changed, 111 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +2 -0
@@ -601,6 +601,8 @@ struct ice_pf {u16 num_dmac_chnl_fltrs;struct hlist_head tc_flower_fltr_list; +u64 supported_rxdids; +__le64 nvm_phy_type_lo;/* NVM PHY type low */ __le64 nvm_phy_type_hi;/* NVM PHY type high */ struct ice_link_default_override_tlv link_dflt_override;
drivers/net/ethernet/intel/ice/ice_hw_autogen.h +3 -0
@@ -110,6 +110,9 @@#define PRTDCB_TUP2TC 0x001D26C0#define GL_PREEXT_L2_PMASK0 (_i) (0x0020F0FC + ((_i) * 4))#define GL_PREEXT_L2_PMASK1 (_i) (0x0020F108 + ((_i) * 4)) +#define GLFLXP_RXDID_FLAGS (_i, _j) (0x0045D000 + ((_i) * 4 + (_j) * 256)) +#define GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_S 0 +#define GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_M ICE_M(0x3F, 0)#define GLFLXP_RXDID_FLX_WRD_0 (_i) (0x0045c800 + ((_i) * 4))#define GLFLXP_RXDID_FLX_WRD_0_PROT_MDID_S 0#define GLFLXP_RXDID_FLX_WRD_0_PROT_MDID_M ICE_M(0xFF, 0)
drivers/net/ethernet/intel/ice/ice_virtchnl.c +86 -0
128 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_virtchnl.h +2 -0
@@ -17,6 +17,7 @@* broadcast, and 16 for additional unicast/multicast filters */ #define ICE_MAX_MACADDR_PER_VF 18 +#define ICE_FLEX_DESC_RXDID_MAX_NUM 64struct ice_virtchnl_ops {int (*get_ver_msg)(struct ice_vf *vf,u8 *msg);
@@ -35,6 +36,7 @@ struct ice_virtchnl_ops {int (*cfg_promiscuous_mode_msg)(struct ice_vf *vf,u8 *msg);int (*add_vlan_msg)(struct ice_vf *vf,u8 *msg);int (*remove_vlan_msg)(struct ice_vf *vf,u8 *msg); +int (*query_rxdid)(struct ice_vf *vf);int (*ena_vlan_stripping)(struct ice_vf *vf);int (*dis_vlan_stripping)(struct ice_vf *vf);int (*handle_rss_cfg_msg)(struct ice_vf *vf,u8 *msg,bool add);
drivers/net/ethernet/intel/ice/ice_virtchnl_allowlist.c +6 -0
@@ -70,6 +70,11 @@ static const u32 rss_pf_allowlist_opcodes[] = { VIRTCHNL_OP_GET_RSS_HENA_CAPS, VIRTCHNL_OP_SET_RSS_HENA, }; +/* VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC */ +static const u32 rx_flex_desc_allowlist_opcodes[] = { +VIRTCHNL_OP_GET_SUPPORTED_RXDIDS , +}; +/* VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF */ static const u32 adv_rss_pf_allowlist_opcodes[] = {VIRTCHNL_OP_ADD_RSS_CFG ,VIRTCHNL_OP_DEL_RSS_CFG ,
@@ -96,6 +101,7 @@ static const struct allowlist_opcode_info allowlist_opcodes[] = {ALLOW_ITEM (VIRTCHNL_VF_OFFLOAD_REQ_QUEUES , req_queues_allowlist_opcodes),ALLOW_ITEM (VIRTCHNL_VF_OFFLOAD_VLAN , vlan_allowlist_opcodes),ALLOW_ITEM (VIRTCHNL_VF_OFFLOAD_RSS_PF , rss_pf_allowlist_opcodes), +ALLOW_ITEM (VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC , rx_flex_desc_allowlist_opcodes),ALLOW_ITEM (VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF , adv_rss_pf_allowlist_opcodes),ALLOW_ITEM (VIRTCHNL_VF_OFFLOAD_FDIR_PF , fdir_pf_allowlist_opcodes), ALLOW_ITEM(VIRTCHNL_VF_OFFLOAD_VLAN_V2, vlan_v2_allowlist_opcodes),
include/linux/avf/virtchnl.h +12 -2
@@ -136,7 +136,8 @@ enum virtchnl_ops {VIRTCHNL_OP_DISABLE_CHANNELS =31 ,VIRTCHNL_OP_ADD_CLOUD_FILTER =32 ,VIRTCHNL_OP_DEL_CLOUD_FILTER =33 , -/* opcode 34 - 44 are reserved */ +/* opcode 34 - 43 are reserved */ +VIRTCHNL_OP_GET_SUPPORTED_RXDIDS =44 ,VIRTCHNL_OP_ADD_RSS_CFG =45 ,VIRTCHNL_OP_DEL_RSS_CFG =46 , VIRTCHNL_OP_ADD_FDIR_FILTER = 47,
@@ -263,6 +264,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);#define VIRTCHNL_VF_OFFLOAD_RX_ENCAP_CSUM BIT(22)#define VIRTCHNL_VF_OFFLOAD_ADQ BIT(23)#define VIRTCHNL_VF_OFFLOAD_USO BIT(25) +#define VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC BIT(26)#define VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF BIT(27)#define VIRTCHNL_VF_OFFLOAD_FDIR_PF BIT(28)
@@ -318,7 +320,9 @@ struct virtchnl_rxq_info {u16 splithdr_enabled;/* deprecated with AVF 1.0 */ u32 databuffer_size;u32 max_pkt_size; -u32 pad1; +u8 pad0; +u8 rxdid; +u8 pad1[2 ];u64 dma_ring_addr;enum virtchnl_rx_hsplit rx_split_pos;/* deprecated with AVF 1.0 */ u32 pad2;
@@ -970,6 +974,10 @@ struct virtchnl_filter {VIRTCHNL_CHECK_STRUCT_LEN (272 , virtchnl_filter); +struct virtchnl_supported_rxdids { +u64 supported_rxdids; +}; +/* VIRTCHNL_OP_EVENT * PF sends this message to inform the VF driver of events that may affect it. * No direct response is expected from the VF, though it may generate other
@@ -1499,6 +1507,8 @@ virtchnl_vc_validate_vf_msg(struct virtchnl_version_info *ver, u32 v_opcode,case VIRTCHNL_OP_DEL_CLOUD_FILTER : valid_len =sizeof (struct virtchnl_filter );break ; +case VIRTCHNL_OP_GET_SUPPORTED_RXDIDS : +break ;case VIRTCHNL_OP_ADD_RSS_CFG :case VIRTCHNL_OP_DEL_RSS_CFG : valid_len =sizeof (struct virtchnl_rss_cfg );
Signature · 6 lines
2.31.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 20 lines · Mateusz Palczewski
From: Michal Jaron <[email protected]>
Add new
VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESCflag, opcodeVIRTCHNL_OP_GET_SUPPORTED_RXDIDSand add member rxdid in structvirtchnl_rxq_infoto support AVF Flex RXD extension.Add support to allow VF to query flexible descriptor RXDIDs supported by DDP package and configure Rx queues with selected RXDID for IAVF.
Add code to allow
VIRTCHNL_OP_GET_SUPPORTED_RXDIDSmessage to be processed. Add necessary macros for registers.Signed-off-by Leyi Rong <[email protected]>Signed-off-by Xu Ting <[email protected]>Signed-off-by Michal Jaron <[email protected]>Signed-off-by Mateusz Palczewski <[email protected]>---
v3: Changed target tree from net to next
v2: Added missing sidned-off-by tag
Quoted 9 lines
--- drivers/net/ethernet/intel/ice/ice.h | 2 + .../net/ethernet/intel/ice/ice_hw_autogen.h | 3 + drivers/net/ethernet/intel/ice/ice_virtchnl.c | 86 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_virtchnl.h | 2 + .../intel/ice/ice_virtchnl_allowlist.c | 6 ++ include/linux/avf/virtchnl.h | 14 ++- 6 files changed, 111 insertions(+), 2 deletions(-)
Thanks,
Maxime
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
drivers/net/ethernet/intel/ice/ice.h
Quoted 44 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Mateusz Palczewski
Sent: Friday, October 14, 2022 10:59 AM
To: [email protected]
Cc: Jaron, MichalX <[email protected]>; Xu, Ting <[email protected]>; Rong, Leyi <[email protected]>
Subject: [Intel-wired-lan] [PATCH net-next v3] ice: Add support Flex RXDFrom: Michal Jaron <[email protected]>
Add new
VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESCflag, opcodeVIRTCHNL_OP_GET_SUPPORTED_RXDIDSand add member rxdid in structvirtchnl_rxq_infoto support AVF Flex RXD extension.Add support to allow VF to query flexible descriptor RXDIDs supported by DDP package and configure Rx queues with selected RXDID for IAVF.
Add code to allow
VIRTCHNL_OP_GET_SUPPORTED_RXDIDSmessage to be processed. Add necessary macros for registers.Signed-off-by Leyi Rong <[email protected]>Signed-off-by Xu Ting <[email protected]>Signed-off-by Michal Jaron <[email protected]>Signed-off-by Mateusz Palczewski <[email protected]>---
v3: Changed target tree from net to next
v2: Added missing sidned-off-by tag--- drivers/net/ethernet/intel/ice/ice.h | 2 + .../net/ethernet/intel/ice/ice_hw_autogen.h | 3 + drivers/net/ethernet/intel/ice/ice_virtchnl.c | 86 +++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_virtchnl.h | 2 + .../intel/ice/ice_virtchnl_allowlist.c | 6 ++ include/linux/avf/virtchnl.h | 14 ++- 6 files changed, 111 insertions(+), 2 deletions(-)drivers/net/ethernet/intel/ice/ice.h +0
-0
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan