examples/ptpclient: enable Rx queue configuration

Message ID 20210819085834.30550-1-simei.su@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series examples/ptpclient: enable Rx queue configuration |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Simei Su Aug. 19, 2021, 8:58 a.m. UTC
  This patch adds support to enable per-queue Rx offloads so that
it can convey the configuration to PMD.

Signed-off-by: Simei Su <simei.su@intel.com>
---
 examples/ptpclient/ptpclient.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
  

Comments

Thomas Monjalon Oct. 13, 2021, 4:32 p.m. UTC | #1
19/08/2021 10:58, Simei Su:
> This patch adds support to enable per-queue Rx offloads so that
> it can convey the configuration to PMD.
> 
> Signed-off-by: Simei Su <simei.su@intel.com>

Applied, thanks.
  

Patch

diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 4f32ade..d083a2e 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -217,8 +217,13 @@  port_init(uint16_t port, struct rte_mempool *mbuf_pool)
 
 	/* Allocate and set up 1 RX queue per Ethernet port. */
 	for (q = 0; q < rx_rings; q++) {
+		struct rte_eth_rxconf *rxconf;
+
+		rxconf = &dev_info.default_rxconf;
+		rxconf->offloads = port_conf.rxmode.offloads;
+
 		retval = rte_eth_rx_queue_setup(port, q, nb_rxd,
-				rte_eth_dev_socket_id(port), NULL, mbuf_pool);
+				rte_eth_dev_socket_id(port), rxconf, mbuf_pool);
 
 		if (retval < 0)
 			return retval;