net/iavf: fix RSS algorithm configuration
When configure RSS rule, the etherdev rss hash function type should be mapped to the corresponding virtchnl rss algorithm type. Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF") Signed-off-by: Jeff Guo <jia.guo@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
parent
56e15e83b8
commit
aeef461fd6
@ -47,7 +47,7 @@ struct iavf_hash_match_type {
|
|||||||
|
|
||||||
struct iavf_rss_meta {
|
struct iavf_rss_meta {
|
||||||
struct virtchnl_proto_hdrs *proto_hdrs;
|
struct virtchnl_proto_hdrs *proto_hdrs;
|
||||||
uint32_t hash_function;
|
enum virtchnl_rss_algorithm rss_algorithm;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iavf_hash_flow_cfg {
|
struct iavf_hash_flow_cfg {
|
||||||
@ -1001,13 +1001,15 @@ iavf_hash_parse_action(struct iavf_pattern_match_item *pattern_match_item,
|
|||||||
|
|
||||||
/* Check hash function and save it to rss_meta. */
|
/* Check hash function and save it to rss_meta. */
|
||||||
if (rss->func == RTE_ETH_HASH_FUNCTION_SIMPLE_XOR)
|
if (rss->func == RTE_ETH_HASH_FUNCTION_SIMPLE_XOR)
|
||||||
rss_meta->hash_function =
|
rss_meta->rss_algorithm =
|
||||||
RTE_ETH_HASH_FUNCTION_SIMPLE_XOR;
|
VIRTCHNL_RSS_ALG_XOR_ASYMMETRIC;
|
||||||
|
else if (rss->func ==
|
||||||
if (rss->func ==
|
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ)
|
||||||
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ)
|
rss_meta->rss_algorithm =
|
||||||
rss_meta->hash_function =
|
VIRTCHNL_RSS_ALG_TOEPLITZ_SYMMETRIC;
|
||||||
RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ;
|
else
|
||||||
|
rss_meta->rss_algorithm =
|
||||||
|
VIRTCHNL_RSS_ALG_TOEPLITZ_ASYMMETRIC;
|
||||||
|
|
||||||
type_match_item =
|
type_match_item =
|
||||||
rte_zmalloc("iavf_type_match_item",
|
rte_zmalloc("iavf_type_match_item",
|
||||||
@ -1126,7 +1128,7 @@ iavf_hash_create(__rte_unused struct iavf_adapter *ad,
|
|||||||
}
|
}
|
||||||
|
|
||||||
rss_cfg->proto_hdrs = *rss_meta->proto_hdrs;
|
rss_cfg->proto_hdrs = *rss_meta->proto_hdrs;
|
||||||
rss_cfg->rss_algorithm = rss_meta->hash_function;
|
rss_cfg->rss_algorithm = rss_meta->rss_algorithm;
|
||||||
|
|
||||||
ret = iavf_add_del_rss_cfg(ad, rss_cfg, true);
|
ret = iavf_add_del_rss_cfg(ad, rss_cfg, true);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user