diff options
author | Luc Provoost <luc.provoost@intel.com> | 2020-08-17 14:12:28 +0200 |
---|---|---|
committer | Luc Provoost <luc.provoost@intel.com> | 2020-08-18 10:47:45 +0200 |
commit | 05af2d54e86e36dae6009e2fbeb258c0fe37cffd (patch) | |
tree | 4ad5b653866ba272ed7785d39370681cbce318ac /VNFs/DPPD-PROX/prox_port_cfg.c | |
parent | 9d1c6c3ff1f464fc2b99857f9113f5688f9b34f1 (diff) |
Setting mq_mode for virtio to ETH_MQ_RX_NONE
As described in https://patches.dpdk.org/patch/60354/, we cannot set
mq_mode for a vertio device to ETH_MQ_RX_RSS. Therefore adding this
extra test before setting mq_mode.
Change-Id: I8a33cf73afaa2cef8b9b012bf8ebe7296e1e692d
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_port_cfg.c')
-rw-r--r-- | VNFs/DPPD-PROX/prox_port_cfg.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c index b8b80a12..451555a9 100644 --- a/VNFs/DPPD-PROX/prox_port_cfg.c +++ b/VNFs/DPPD-PROX/prox_port_cfg.c @@ -638,21 +638,27 @@ static void init_port(struct prox_port_cfg *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 (strcmp(port_cfg->short_name, "virtio")) { + 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_IP|ETH_RSS_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; + port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IPV4|ETH_RSS_NONF_IPV4_UDP; #endif + } } // 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, supported 0x%lx)\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf, ETH_RSS_IP|ETH_RSS_UDP, port_cfg->dev_info.flow_type_rss_offloads); + if (strcmp(port_cfg->short_name, "virtio")) { + plog_info("\t\t Enabling RSS rss_hf = 0x%lx (requested 0x%llx, supported 0x%lx)\n", port_cfg->port_conf.rx_adv_conf.rss_conf.rss_hf, ETH_RSS_IP|ETH_RSS_UDP, port_cfg->dev_info.flow_type_rss_offloads); + } else { + plog_info("\t\t Not enabling RSS on virtio port"); + } // rxmode such as hw src strip #if RTE_VERSION >= RTE_VERSION_NUM(18,8,0,1) |