ptpclient: enable timestamp offload support

Message ID 20210223061412.22827-1-hemant.agrawal@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series ptpclient: enable timestamp offload support |

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance 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-mellanox-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS

Commit Message

Hemant Agrawal Feb. 23, 2021, 6:14 a.m. UTC
  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 <g.singh@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 examples/ptpclient/ptpclient.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Rybalchenko, Kirill March 4, 2021, 4:59 p.m. UTC | #1
> -----Original Message-----
> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> Sent: Tuesday 23 February 2021 06:14
> To: dev@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>
> Cc: Gagandeep Singh <g.singh@nxp.com>
> Subject: [PATCH] ptpclient: enable timestamp offload support
> 
> 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 <g.singh@nxp.com>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Acked-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
  
Thomas Monjalon March 17, 2021, 12:49 p.m. UTC | #2
04/03/2021 17:59, Rybalchenko, Kirill:
> From: Hemant Agrawal <hemant.agrawal@nxp.com>
> > 
> > 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 <g.singh@nxp.com>
> > Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> 
> Acked-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>

Applied, thanks
  

Patch

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;