From: Wei Zhao Date: Mon, 10 Jun 2019 06:45:10 +0000 (+0800) Subject: app/testpmd: fix offloads config X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=575e0fd1a0b33b5b6c977f743fd4ba27b3523517;p=dpdk.git app/testpmd: fix offloads config There is no need to use default offloads configuration if offloads configuration has been pass down from upper layer. The default offloads are overwritten if not zero. Fixes: 5e91aeef218c ("app/testpmd: fix offload flags after port config") Cc: stable@dpdk.org Signed-off-by: Wei Zhao Reviewed-by: Ferruh Yigit --- diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index c578f75e77..3ed3523b79 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2824,7 +2824,8 @@ rxtx_port_config(struct rte_port *port) 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; + if (offloads != 0) + port->rx_conf[qid].offloads = offloads; /* Check if any Rx parameters have been passed */ if (rx_pthresh != RTE_PMD_PARAM_UNSET) @@ -2848,7 +2849,8 @@ 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; + if (offloads != 0) + port->tx_conf[qid].offloads = offloads; /* Check if any Tx parameters have been passed */ if (tx_pthresh != RTE_PMD_PARAM_UNSET)