[v2] examples/packet_ordering: use local port config

Message ID 20210319071118.945615-1-dapengx.yu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] examples/packet_ordering: use local port config |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Yu, DapengX March 19, 2021, 7:11 a.m. UTC
  From: Dapeng Yu <dapengx.yu@intel.com>

A global ethernet port configuration is assigned to local variable
because in this way the local variable may be updated as required. But
this local variable is not used as input of rte_eth_dev_configure() in
original implementation, and cause that fast mbuf free feature cannot
be enabled on port.

This patch use this local variable as input of rte_eth_dev_configure().

Fixes: 6833f919f56b ("examples/packet_ordering: convert to new ethdev offloads API")
Cc: shahafs@mellanox.com
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
v2:
* Add Cc:<original author> and Acked-by:<maintainer>

 examples/packet_ordering/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon March 24, 2021, 10:17 a.m. UTC | #1
19/03/2021 08:11, dapengx.yu@intel.com:
> From: Dapeng Yu <dapengx.yu@intel.com>
> 
> A global ethernet port configuration is assigned to local variable
> because in this way the local variable may be updated as required. But
> this local variable is not used as input of rte_eth_dev_configure() in
> original implementation, and cause that fast mbuf free feature cannot
> be enabled on port.
> 
> This patch use this local variable as input of rte_eth_dev_configure().
> 
> Fixes: 6833f919f56b ("examples/packet_ordering: convert to new ethdev offloads API")
> Cc: shahafs@mellanox.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
> Acked-by: Reshma Pattan <reshma.pattan@intel.com>

Applied, thanks
  

Patch

diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 4bea1982d..963b11d6d 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -290,7 +290,7 @@  configure_eth_port(uint16_t port_id)
 	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
 		port_conf.txmode.offloads |=
 			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-	ret = rte_eth_dev_configure(port_id, rxRings, txRings, &port_conf_default);
+	ret = rte_eth_dev_configure(port_id, rxRings, txRings, &port_conf);
 	if (ret != 0)
 		return ret;