From: Anurag Mandal <anurag.mandal@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, jingjing.wu@intel.com,
praveen.shetty@intel.com, Anurag Mandal <anurag.mandal@intel.com>
Subject: [PATCH] net/idpf: add clock read support
Date: Mon, 27 Jul 2026 17:29:46 +0000 [thread overview]
Message-ID: <20260727172946.824267-1-anurag.mandal@intel.com> (raw)
Implemented read_clock ethdev operation by adding
idpf_dev_read_clock() feature to get current time
in nanoseconds for scheduling packets based on
transmit time.
Signed-off-by: Anurag Mandal <anurag.mandal@intel.com>
---
drivers/net/intel/idpf/idpf_ethdev.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/intel/idpf/idpf_ethdev.c b/drivers/net/intel/idpf/idpf_ethdev.c
index c13505416a..224a649f53 100644
--- a/drivers/net/intel/idpf/idpf_ethdev.c
+++ b/drivers/net/intel/idpf/idpf_ethdev.c
@@ -1124,6 +1124,15 @@ idpf_timesync_disable(struct rte_eth_dev *dev)
return 0;
}
+static int
+idpf_dev_read_clock(struct rte_eth_dev *dev, uint64_t *clock)
+{
+ struct idpf_vport *vport = dev->data->dev_private;
+ struct idpf_adapter *adapter = vport->adapter;
+
+ return idpf_ptp_read_src_clk_reg(adapter, clock);
+}
+
static const struct eth_dev_ops idpf_eth_dev_ops = {
.dev_configure = idpf_dev_configure,
@@ -1159,6 +1168,7 @@ static const struct eth_dev_ops idpf_eth_dev_ops = {
.timesync_read_time = idpf_timesync_read_time,
.timesync_write_time = idpf_timesync_write_time,
.timesync_disable = idpf_timesync_disable,
+ .read_clock = idpf_dev_read_clock,
};
static int
--
2.34.1
next reply other threads:[~2026-07-27 17:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 17:29 Anurag Mandal [this message]
2026-07-28 0:20 ` [PATCH] net/idpf: add clock read support Mandal, Anurag
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=20260727172946.824267-1-anurag.mandal@intel.com \
--to=anurag.mandal@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=praveen.shetty@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