Skip to content

Commit 222a8ab

Browse files
qzhan16anguy11
authored andcommitted
ice: Enable RSS configure for AVF
Currently, RSS hash input is not available to AVF by ethtool, it is set by the PF directly. Add the RSS configure support for AVF through new virtchnl message, and define the capability flag VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF to query this new RSS offload support. Signed-off-by: Jia Guo <jia.guo@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> Tested-by: Bo Chen <BoX.C.Chen@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent c5afbe9 commit 222a8ab

4 files changed

Lines changed: 486 additions & 1 deletion

File tree

‎drivers/net/ethernet/intel/ice/ice_flow.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
#define ICE_FLOW_FLD_OFF_INVAL 0xffff
99

1010
/* Generate flow hash field from flow field type(s) */
11+
#define ICE_FLOW_HASH_ETH \
12+
(BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_DA) | \
13+
BIT_ULL(ICE_FLOW_FIELD_IDX_ETH_SA))
1114
#define ICE_FLOW_HASH_IPV4 \
1215
(BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_SA) | \
1316
BIT_ULL(ICE_FLOW_FIELD_IDX_IPV4_DA))

‎drivers/net/ethernet/intel/ice/ice_virtchnl_allowlist.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ static const u32 rss_pf_allowlist_opcodes[] = {
6161
VIRTCHNL_OP_GET_RSS_HENA_CAPS, VIRTCHNL_OP_SET_RSS_HENA,
6262
};
6363

64+
/* VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF */
65+
static const u32 adv_rss_pf_allowlist_opcodes[] = {
66+
VIRTCHNL_OP_ADD_RSS_CFG, VIRTCHNL_OP_DEL_RSS_CFG,
67+
};
68+
6469
/* VIRTCHNL_VF_OFFLOAD_FDIR_PF */
6570
static const u32 fdir_pf_allowlist_opcodes[] = {
6671
VIRTCHNL_OP_ADD_FDIR_FILTER, VIRTCHNL_OP_DEL_FDIR_FILTER,
@@ -82,6 +87,7 @@ static const struct allowlist_opcode_info allowlist_opcodes[] = {
8287
ALLOW_ITEM(VIRTCHNL_VF_OFFLOAD_REQ_QUEUES, req_queues_allowlist_opcodes),
8388
ALLOW_ITEM(VIRTCHNL_VF_OFFLOAD_VLAN, vlan_allowlist_opcodes),
8489
ALLOW_ITEM(VIRTCHNL_VF_OFFLOAD_RSS_PF, rss_pf_allowlist_opcodes),
90+
ALLOW_ITEM(VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF, adv_rss_pf_allowlist_opcodes),
8591
ALLOW_ITEM(VIRTCHNL_VF_OFFLOAD_FDIR_PF, fdir_pf_allowlist_opcodes),
8692
};
8793

0 commit comments

Comments
 (0)