From: Hemant Agrawal Date: Tue, 23 Feb 2021 06:14:12 +0000 (+0530) Subject: examples/ptpclient: enable Rx timestamp offload X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7a04a4f67dcafe4fb5232985d9f63d507334632b;p=dpdk.git examples/ptpclient: enable Rx timestamp offload This patch add support to enable Rx offload for timestamp. It is required to be enabled for some PMDs e.g. dpaa2. Signed-off-by: Gagandeep Singh Signed-off-by: Hemant Agrawal Acked-by: Kirill Rybalchenko --- diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index 09968cdfc7..33b297e37a 100644 --- a/examples/ptpclient/ptpclient.c +++ b/examples/ptpclient/ptpclient.c @@ -197,6 +197,9 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) return retval; } + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TIMESTAMP) + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_TIMESTAMP; + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) port_conf.txmode.offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;