summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ed21e06)
Kernel PF may not respond to virtual channel commands
VIRTCHNL_OP_GET_RSS_HENA_CAPS and VIRTCHNL_OP_SET_RSS_HENA, which
will cause VF to fail to start.
RSS offload type configuration is not a necessary feature for VF,
so in order to improve VF compatibility, in this patch the PMD will
ignore the error result of above two commands and will print warnings
instead.
Fixes:
5a038d19962d ("net/iavf: fix RSS configuration on i40e VF")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
iavf_config_rss_hf(struct iavf_adapter *adapter, uint64_t rss_hf)
{
static const uint64_t map_hena_rss[] = {
iavf_config_rss_hf(struct iavf_adapter *adapter, uint64_t rss_hf)
{
static const uint64_t map_hena_rss[] = {
int ret;
ret = iavf_get_hena_caps(adapter, &caps);
int ret;
ret = iavf_get_hena_caps(adapter, &caps);
+ if (ret) {
+ /**
+ * RSS offload type configuration is not a necessary feature
+ * for VF, so here just print a warning and return.
+ */
+ PMD_DRV_LOG(WARNING,
+ "fail to get RSS offload type caps, ret: %d", ret);
+ return;
+ }
+
/**
* ETH_RSS_IPV4 and ETH_RSS_IPV6 can be considered as 2
* generalizations of all other IPv4 and IPv6 RSS types.
/**
* ETH_RSS_IPV4 and ETH_RSS_IPV6 can be considered as 2
* generalizations of all other IPv4 and IPv6 RSS types.
}
ret = iavf_set_hena(adapter, hena);
}
ret = iavf_set_hena(adapter, hena);
+ if (ret) {
+ /**
+ * RSS offload type configuration is not a necessary feature
+ * for VF, so here just print a warning and return.
+ */
+ PMD_DRV_LOG(WARNING,
+ "fail to set RSS offload types, ret: %d", ret);
+ return;
+ }
if (valid_rss_hf & ipv4_rss)
valid_rss_hf |= rss_hf & ETH_RSS_IPV4;
if (valid_rss_hf & ipv4_rss)
valid_rss_hf |= rss_hf & ETH_RSS_IPV4;
rss_hf & ~valid_rss_hf);
vf->rss_hf = valid_rss_hf;
rss_hf & ~valid_rss_hf);
vf->rss_hf = valid_rss_hf;
- ret = iavf_config_rss_hf(adapter, rss_conf->rss_hf);
- if (ret != -ENOTSUP)
- return ret;
+ iavf_config_rss_hf(adapter, rss_conf->rss_hf);
- ret = iavf_config_rss_hf(adapter, rss_conf->rss_hf);
- if (ret != -ENOTSUP)
- return ret;
+ iavf_config_rss_hf(adapter, rss_conf->rss_hf);