From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: dev@dpdk.org, kirill.rybalchenko@intel.com
Cc: Gagandeep Singh <g.singh@nxp.com>
Subject: [dpdk-dev] [PATCH] ptpclient: enable timestamp offload support
Date: Tue, 23 Feb 2021 11:44:12 +0530 [thread overview]
Message-ID: <20210223061412.22827-1-hemant.agrawal@nxp.com> (raw)
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(+)
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
next reply other threads:[~2021-02-23 6:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-23 6:14 Hemant Agrawal [this message]
2021-03-04 16:59 ` Rybalchenko, Kirill
2021-03-17 12:49 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210223061412.22827-1-hemant.agrawal@nxp.com \
--to=hemant.agrawal@nxp.com \
--cc=dev@dpdk.org \
--cc=g.singh@nxp.com \
--cc=kirill.rybalchenko@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).