From: John Fraker <jfraker@google.com>
To: netdev@vger.kernel.org
Cc: John Fraker <jfraker@google.com>,
Praveen Kaligineedi <pkaligineedi@google.com>,
Harshitha Ramamurthy <hramamurthy@google.com>,
Shailend Chand <shailend@google.com>,
Willem de Bruijn <willemb@google.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Junfeng Guo <junfeng.guo@intel.com>,
Ziwei Xiao <ziweixiao@google.com>,
Jeroen de Borst <jeroendb@google.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next] gve: Correctly report software timestamping capabilities
Date: Mon, 8 Apr 2024 11:09:01 -0700 [thread overview]
Message-ID: <20240408180918.2773238-1-jfraker@google.com> (raw)
gve has supported software timestamp generation since its inception,
but has not advertised that support via ethtool. This patch correctly
advertises that support.
Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Signed-off-by: John Fraker <jfraker@google.com>
---
drivers/net/ethernet/google/gve/gve_ethtool.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c
index 815dead..99f5aeb 100644
--- a/drivers/net/ethernet/google/gve/gve_ethtool.c
+++ b/drivers/net/ethernet/google/gve/gve_ethtool.c
@@ -4,6 +4,8 @@
* Copyright (C) 2015-2021 Google, Inc.
*/
+#include <linux/ethtool.h>
+#include <linux/net_tstamp.h>
#include <linux/rtnetlink.h>
#include "gve.h"
#include "gve_adminq.h"
@@ -763,6 +765,15 @@ static int gve_set_coalesce(struct net_device *netdev,
return 0;
}
+static int gve_get_ts_info(struct net_device *netdev, struct ethtool_ts_info *info)
+{
+ info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
+ SOF_TIMESTAMPING_TX_SOFTWARE |
+ SOF_TIMESTAMPING_SOFTWARE;
+
+ return 0;
+}
+
const struct ethtool_ops gve_ethtool_ops = {
.supported_coalesce_params = ETHTOOL_COALESCE_USECS,
.supported_ring_params = ETHTOOL_RING_USE_TCP_DATA_SPLIT,
@@ -784,5 +795,6 @@ const struct ethtool_ops gve_ethtool_ops = {
.set_tunable = gve_set_tunable,
.get_priv_flags = gve_get_priv_flags,
.set_priv_flags = gve_set_priv_flags,
- .get_link_ksettings = gve_get_link_ksettings
+ .get_link_ksettings = gve_get_link_ksettings,
+ .get_ts_info = gve_get_ts_info
};
--
2.44.0.478.gd926399ef9-goog
next reply other threads:[~2024-04-08 18:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 18:09 John Fraker [this message]
2024-04-09 14:29 ` [PATCH net-next] gve: Correctly report software timestamping capabilities Willem de Bruijn
2024-04-10 0:28 ` Jakub Kicinski
2024-04-10 4:40 ` Rahul Rameshbabu
2024-04-10 13:19 ` Jakub Kicinski
2024-04-10 19:31 ` Willem de Bruijn
2024-04-11 0:40 ` Rahul Rameshbabu
2024-04-11 1:36 ` Willem de Bruijn
2024-04-10 0:26 ` Jakub Kicinski
2024-04-11 3:22 ` Willem de Bruijn
2024-04-11 19:37 ` John Fraker
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=20240408180918.2773238-1-jfraker@google.com \
--to=jfraker@google.com \
--cc=davem@davemloft.net \
--cc=hramamurthy@google.com \
--cc=jeroendb@google.com \
--cc=junfeng.guo@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pkaligineedi@google.com \
--cc=shailend@google.com \
--cc=willemb@google.com \
--cc=ziweixiao@google.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).