summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Zhao <wei.zhao1@intel.com>2019-05-09 15:20:47 +0800
committerThomas Monjalon <thomas@monjalon.net>2019-05-13 17:06:27 +0200
commit5e91aeef218c452c370aacf74265c7a42b67dffa (patch)
tree7319e4e3b49bd19b306baf500b1c936b8e9a30b1
parent40d9f906f4e2b6028bd61d68d32956c6a809be03 (diff)
downloaddpdk-draft-windows-5e91aeef218c452c370aacf74265c7a42b67dffa.zip
dpdk-draft-windows-5e91aeef218c452c370aacf74265c7a42b67dffa.tar.gz
dpdk-draft-windows-5e91aeef218c452c370aacf74265c7a42b67dffa.tar.xz
app/testpmd: fix offload flags after port config
There is an error in function rxtx_port_config(), which may overwrite offloads configuration get from function launch_args_parse() when run testpmd app. So rxtx_port_config() should do "or" for port offloads. Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure") Cc: stable@dpdk.org Signed-off-by: Wei Zhao <wei.zhao1@intel.com> Tested-by: Peng Yuan <yuan.peng@intel.com>
-rw-r--r--app/test-pmd/testpmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 6fbfd29..f0061d9 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2809,9 +2809,12 @@ static void
rxtx_port_config(struct rte_port *port)
{
uint16_t qid;
+ uint64_t offloads;
for (qid = 0; qid < nb_rxq; qid++) {
+ offloads = port->rx_conf[qid].offloads;
port->rx_conf[qid] = port->dev_info.default_rxconf;
+ port->rx_conf[qid].offloads |= offloads;
/* Check if any Rx parameters have been passed */
if (rx_pthresh != RTE_PMD_PARAM_UNSET)
@@ -2833,7 +2836,9 @@ rxtx_port_config(struct rte_port *port)
}
for (qid = 0; qid < nb_txq; qid++) {
+ offloads = port->tx_conf[qid].offloads;
port->tx_conf[qid] = port->dev_info.default_txconf;
+ port->tx_conf[qid].offloads |= offloads;
/* Check if any Tx parameters have been passed */
if (tx_pthresh != RTE_PMD_PARAM_UNSET)