summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/iavf/iavf_adv_rss.h
diff options
context:
space:
mode:
authorHaiyue Wang <haiyue.wang@intel.com>2021-04-13 03:48:43 +0300
committerTony Nguyen <anthony.l.nguyen@intel.com>2021-04-22 19:26:23 +0300
commit7b8f3f957b22746bc9a410d7cd2e9edd0efcc9f5 (patch)
treed5a8c07ff1b84188be3927f82647a7000ca855c7 /drivers/net/ethernet/intel/iavf/iavf_adv_rss.h
parent5ab91e0593a15652d31d3eb0bd6d28bf0bc9b36c (diff)
downloadlinux-7b8f3f957b22746bc9a410d7cd2e9edd0efcc9f5.tar.xz
iavf: Support for modifying UDP RSS flow hashing
Provides the ability to enable UDP RSS hashing by ethtool. It gives users option of generating RSS hash based on the UDP source and destination ports numbers, IPv4 or IPv6 source and destination addresses. Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/iavf/iavf_adv_rss.h')
-rw-r--r--drivers/net/ethernet/intel/iavf/iavf_adv_rss.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/iavf/iavf_adv_rss.h b/drivers/net/ethernet/intel/iavf/iavf_adv_rss.h
index 339ecb42938b..4681f5e8321d 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_adv_rss.h
+++ b/drivers/net/ethernet/intel/iavf/iavf_adv_rss.h
@@ -20,6 +20,7 @@ enum iavf_adv_rss_flow_seg_hdr {
IAVF_ADV_RSS_FLOW_SEG_HDR_IPV4 = 0x00000001,
IAVF_ADV_RSS_FLOW_SEG_HDR_IPV6 = 0x00000002,
IAVF_ADV_RSS_FLOW_SEG_HDR_TCP = 0x00000004,
+ IAVF_ADV_RSS_FLOW_SEG_HDR_UDP = 0x00000008,
};
#define IAVF_ADV_RSS_FLOW_SEG_HDR_L3 \
@@ -27,7 +28,8 @@ enum iavf_adv_rss_flow_seg_hdr {
IAVF_ADV_RSS_FLOW_SEG_HDR_IPV6)
#define IAVF_ADV_RSS_FLOW_SEG_HDR_L4 \
- (IAVF_ADV_RSS_FLOW_SEG_HDR_TCP)
+ (IAVF_ADV_RSS_FLOW_SEG_HDR_TCP | \
+ IAVF_ADV_RSS_FLOW_SEG_HDR_UDP)
enum iavf_adv_rss_flow_field {
/* L3 */
@@ -38,6 +40,8 @@ enum iavf_adv_rss_flow_field {
/* L4 */
IAVF_ADV_RSS_FLOW_FIELD_IDX_TCP_SRC_PORT,
IAVF_ADV_RSS_FLOW_FIELD_IDX_TCP_DST_PORT,
+ IAVF_ADV_RSS_FLOW_FIELD_IDX_UDP_SRC_PORT,
+ IAVF_ADV_RSS_FLOW_FIELD_IDX_UDP_DST_PORT,
/* The total number of enums must not exceed 64 */
IAVF_ADV_RSS_FLOW_FIELD_IDX_MAX
@@ -56,6 +60,10 @@ enum iavf_adv_rss_flow_field {
BIT_ULL(IAVF_ADV_RSS_FLOW_FIELD_IDX_TCP_SRC_PORT)
#define IAVF_ADV_RSS_HASH_FLD_TCP_DST_PORT \
BIT_ULL(IAVF_ADV_RSS_FLOW_FIELD_IDX_TCP_DST_PORT)
+#define IAVF_ADV_RSS_HASH_FLD_UDP_SRC_PORT \
+ BIT_ULL(IAVF_ADV_RSS_FLOW_FIELD_IDX_UDP_SRC_PORT)
+#define IAVF_ADV_RSS_HASH_FLD_UDP_DST_PORT \
+ BIT_ULL(IAVF_ADV_RSS_FLOW_FIELD_IDX_UDP_DST_PORT)
/* bookkeeping of advanced RSS configuration */
struct iavf_adv_rss {