From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 19975A034F; Tue, 23 Feb 2021 07:26:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F3C2C4067A; Tue, 23 Feb 2021 07:26:16 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id 4E37740041 for ; Tue, 23 Feb 2021 07:26:15 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 05DA31A0270; Tue, 23 Feb 2021 07:26:15 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E50CA1A06EF; Tue, 23 Feb 2021 07:26:12 +0100 (CET) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4448E40324; Tue, 23 Feb 2021 07:26:10 +0100 (CET) From: Hemant Agrawal To: dev@dpdk.org, kirill.rybalchenko@intel.com Cc: Gagandeep Singh Date: Tue, 23 Feb 2021 11:44:12 +0530 Message-Id: <20210223061412.22827-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] ptpclient: enable timestamp offload support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch add support to enabled 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 --- examples/ptpclient/ptpclient.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index 09968cdfc..33b297e37 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; -- 2.17.1