summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_port_cfg.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2018-04-15 15:35:07 +0200
committerXavier Simonart <xavier.simonart@intel.com>2018-04-26 01:24:24 +0200
commit0250340696153af1c8536f3a38eb99e1b67a2ea2 (patch)
tree2290f3629c8f1566840b126dc49fc6f34f412c9f /VNFs/DPPD-PROX/prox_port_cfg.c
parentca2085d3c7a630da6a1f28ee49b605d214d6b2e7 (diff)
Fix crc offloads.
When configuring a port, prox configures queue flags. For historitical reasons, offloads had to be disabled on some pmds. There is now an API to query the ports and gets their capabilities. This fix sets now the flags based on the capabilities, and not the driver name. Change-Id: Ic72d15001992f26910f653c70d31e4381fff8089 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_port_cfg.c')
-rw-r--r--VNFs/DPPD-PROX/prox_port_cfg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c
index c00948ad..269b1c63 100644
--- a/VNFs/DPPD-PROX/prox_port_cfg.c
+++ b/VNFs/DPPD-PROX/prox_port_cfg.c
@@ -372,14 +372,14 @@ static void init_port(struct prox_port_cfg *port_cfg)
PROX_PANIC(ret < 0, "\t\t\trte_eth_rx_queue_setup() failed on port %u: error %s (%d)\n", port_id, strerror(-ret), ret);
}
- if (!strcmp(port_cfg->short_name, "virtio")) {
+ if (port_cfg->capabilities.tx_offload_cksum == 0) {
port_cfg->tx_conf.txq_flags |= ETH_TXQ_FLAGS_NOOFFLOADS;
- plog_info("\t\tDisabling TX offloads (virtio does not support TX offloads)\n");
+ plog_info("\t\tDisabling TX offloads as pmd reports that it does not support them)\n");
}
if (!strcmp(port_cfg->short_name, "vmxnet3")) {
- port_cfg->tx_conf.txq_flags |= ETH_TXQ_FLAGS_NOOFFLOADS | ETH_TXQ_FLAGS_NOMULTSEGS;
- plog_info("\t\tDisabling TX offloads and multsegs on port %d as vmxnet3 does not support them\n", port_id);
+ port_cfg->tx_conf.txq_flags |= ETH_TXQ_FLAGS_NOMULTSEGS;
+ plog_info("\t\tDisabling multsegs on port %d as vmxnet3 does not support them\n", port_id);
}
/* initialize one TX queue per logical core on each port */
for (uint16_t queue_id = 0; queue_id < port_cfg->n_txq; ++queue_id) {