patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] app/testpmd: fix offloads overwrite by default configuration
@ 2019-05-09  7:20 Wei Zhao
  2019-05-13  3:30 ` Zhao1, Wei
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Wei Zhao @ 2019-05-09  7:20 UTC (permalink / raw)
  To: dev; +Cc: stable, yuan.peng, ferruh.yigit, wenzhuo.lu, Wei Zhao

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>
---
 app/test-pmd/testpmd.c | 5 +++++
 1 file changed, 5 insertions(+)

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)
-- 
2.7.5


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

end of thread, other threads:[~2019-06-17 12:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-09  7:20 [dpdk-stable] [PATCH] app/testpmd: fix offloads overwrite by default configuration Wei Zhao
2019-05-13  3:30 ` Zhao1, Wei
2019-05-13 15:08   ` Thomas Monjalon
2019-05-13 16:35 ` Ferruh Yigit
2019-05-14  1:56   ` Zhao1, Wei
2019-05-20 15:23     ` Ferruh Yigit
2019-05-21  1:30       ` Zhao1, Wei
2019-05-21 15:42         ` Ferruh Yigit
2019-05-24  1:55           ` Zhao1, Wei
2019-05-24 13:03             ` Ferruh Yigit
2019-06-10  7:27               ` Zhao1, Wei
2019-06-11 14:37 ` Ferruh Yigit
2019-06-12  0:57   ` Zhao1, Wei
2019-06-12  1:17   ` Zhao1, Wei
2019-06-14 15:42     ` Ferruh Yigit
2019-06-17  1:51       ` Zhao1, Wei
2019-06-17 12:59         ` Ferruh Yigit

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).