patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] app/testpmd: fix offloads default set error
@ 2019-06-10  6:45 Wei Zhao
  2019-06-10 10:09 ` [dpdk-stable] [dpdk-dev] " Kevin Traynor
  0 siblings, 1 reply; 8+ messages in thread
From: Wei Zhao @ 2019-06-10  6:45 UTC (permalink / raw)
  To: dev; +Cc: stable, ferruh.yigit, Wei Zhao

There is no need to use default offloads configuration
if offloads configuration has been pass down from uplayer.

Fixes: 5e91aeef218c ("app/testpmd: fix offload flags after port config")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 app/test-pmd/testpmd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 0148b0a..b5f5801 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2815,7 +2815,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)
+			port->rx_conf[qid].offloads = offloads;
 
 		/* Check if any Rx parameters have been passed */
 		if (rx_pthresh != RTE_PMD_PARAM_UNSET)
@@ -2839,7 +2840,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)
+			port->tx_conf[qid].offloads = offloads;
 
 		/* Check if any Tx parameters have been passed */
 		if (tx_pthresh != RTE_PMD_PARAM_UNSET)
-- 
2.7.5


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-02 18:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-10  6:45 [dpdk-stable] [PATCH] app/testpmd: fix offloads default set error Wei Zhao
2019-06-10 10:09 ` [dpdk-stable] [dpdk-dev] " Kevin Traynor
2019-06-11  1:28   ` Zhao1, Wei
2019-06-11 14:41     ` Ferruh Yigit
2019-06-12  1:04       ` Zhao1, Wei
2019-07-02 17:56         ` Ferruh Yigit
2019-07-02 18:02           ` Ferruh Yigit
2019-06-11  1:31   ` Zhao1, Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).