From 92854ed2b9d2000ff8007350251b491b9602dcdb Mon Sep 17 00:00:00 2001 From: Simei Su Date: Thu, 19 Aug 2021 16:58:34 +0800 Subject: [PATCH] examples/ptpclient: enable Rx queue configuration This patch adds support to enable per-queue Rx offloads so that it can convey the configuration to PMD. Signed-off-by: Simei Su --- examples/ptpclient/ptpclient.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index 61e4ee0ea1..d94eca0353 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; -- 2.20.1