net/iavf: support RSS for IPv6 64-bit prefix
RSS for IPv6 prefix 64bit fields are supported in this patch, so that we can use prefix instead of full IPv6 address for RSS. The prefix here only includes the first 64 bits of both SRC and DST IPv6 address. Signed-off-by: Junfeng Guo <junfeng.guo@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
parent
82c11f0333
commit
46db5c1c49
@ -541,6 +541,11 @@ iavf_hash_parse_pattern(struct iavf_pattern_match_item *pattern_match_item,
|
||||
|
||||
#define REFINE_PROTO_FLD(op, fld) \
|
||||
VIRTCHNL_##op##_PROTO_HDR_FIELD(hdr, VIRTCHNL_PROTO_HDR_##fld)
|
||||
#define REPALCE_PROTO_FLD(fld_1, fld_2) \
|
||||
do { \
|
||||
REFINE_PROTO_FLD(DEL, fld_1); \
|
||||
REFINE_PROTO_FLD(ADD, fld_2); \
|
||||
} while (0)
|
||||
|
||||
/* refine proto hdrs base on l2, l3, l4 rss type */
|
||||
static void
|
||||
@ -596,6 +601,14 @@ iavf_refine_proto_hdrs_l234(struct virtchnl_proto_hdrs *proto_hdrs,
|
||||
} else {
|
||||
hdr->field_selector = 0;
|
||||
}
|
||||
if (rss_type & RTE_ETH_RSS_L3_PRE64) {
|
||||
if (REFINE_PROTO_FLD(TEST, IPV6_SRC))
|
||||
REPALCE_PROTO_FLD(IPV6_SRC,
|
||||
IPV6_PREFIX64_SRC);
|
||||
if (REFINE_PROTO_FLD(TEST, IPV6_DST))
|
||||
REPALCE_PROTO_FLD(IPV6_DST,
|
||||
IPV6_PREFIX64_DST);
|
||||
}
|
||||
break;
|
||||
case VIRTCHNL_PROTO_HDR_UDP:
|
||||
if (rss_type &
|
||||
@ -764,6 +777,16 @@ iavf_any_invalid_rss_type(uint64_t rss_type, uint64_t allow_rss_type)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* current ipv6 prefix only supports prefix 64 bits*/
|
||||
#define _invalid_prefix_ (RTE_ETH_RSS_L3_PRE32 | \
|
||||
RTE_ETH_RSS_L3_PRE40 | \
|
||||
RTE_ETH_RSS_L3_PRE48 | \
|
||||
RTE_ETH_RSS_L3_PRE56 | \
|
||||
RTE_ETH_RSS_L3_PRE96)
|
||||
|
||||
if (rss_type & _invalid_prefix_)
|
||||
return true;
|
||||
|
||||
/* check not allowed RSS type */
|
||||
#define _RSS_ATTR_ (ETH_RSS_L3_SRC_ONLY | \
|
||||
ETH_RSS_L3_DST_ONLY | \
|
||||
|
Loading…
x
Reference in New Issue
Block a user