summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2019-01-23 13:51:47 +0100
committerXavier Simonart <xavier.simonart@intel.com>2019-01-23 13:51:47 +0100
commit2aa21bfc505f582b11754c3086685a2fa355fee2 (patch)
tree0c68febd7ffd60208204d248bd82689c0441a2e9
parenta63ee72d5875000622e81036206ae87a17d26f7a (diff)
Configure RSS hashing to IP/UDP and check for with PMD support
RSS was enabled when rss=yes is set in the configuration or when multiqueue is being used. But when RSS was enabled the types of packets on which RSS hashing was applied might not be supported by the PMD, as almost every PMD supported a different set of packets. Change-Id: I1d9516da61df7ef18c1d6953879ee15e33fca077 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
-rw-r--r--VNFs/DPPD-PROX/prox_port_cfg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c
index ede481b3..fc4971f1 100644
--- a/VNFs/DPPD-PROX/prox_port_cfg.c
+++ b/VNFs/DPPD-PROX/prox_port_cfg.c
@@ -449,18 +449,25 @@ static void init_port(struct prox_port_cfg *port_cfg)
}
}
+ print_port_capa(port_cfg);
+
if (port_cfg->n_rxq > 1) {
// Enable RSS if multiple receive queues
port_cfg->port_conf.rxmode.mq_mode |= ETH_MQ_RX_RSS;
port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key = toeplitz_init_key;
port_cfg->port_conf.rx_adv_conf.rss_conf.rss_key_len = TOEPLITZ_KEY_LEN;
#if RTE_VERSION >= RTE_VERSION_NUM(2,0,0,0)
- port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IPV4|ETH_RSS_NONFRAG_IPV4_UDP;
+ port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IP|ETH_RSS_UDP;
#else
port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IPV4|ETH_RSS_NONF_IPV4_UDP;
#endif
}
- print_port_capa(port_cfg);
+
+ // Make sure that the requested RSS offload is supported by the PMD
+#if RTE_VERSION >= RTE_VERSION_NUM(2,0,0,0)
+ port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf &= port_cfg->dev_info.flow_type_rss_offloads;
+#endif
+ plog_info("\t\t Enabling RSS rss_hf = 0x%lx (requested 0x%llx)\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf, ETH_RSS_IP|ETH_RSS_UDP);
// rxmode such as hw src strip
#if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1)