netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] bonding: add software timestamping support
@ 2023-03-29  3:13 Hangbin Liu
  2023-03-29  3:36 ` Jay Vosburgh
  2023-03-29 10:27 ` Miroslav Lichvar
  0 siblings, 2 replies; 11+ messages in thread
From: Hangbin Liu @ 2023-03-29  3:13 UTC (permalink / raw)
  To: netdev
  Cc: Jay Vosburgh, David S . Miller, Jakub Kicinski, Jonathan Toppins,
	Paolo Abeni, Eric Dumazet, Miroslav Lichvar, Richard Cochran,
	Hangbin Liu

At present, bonding attempts to obtain the timestamp (ts) information of
the active slave. However, this feature is only available for mode 1, 5,
and 6. For other modes, bonding doesn't even provide support for software
timestamping. To address this issue, let's call ethtool_op_get_ts_info
when there is no primary active slave. This will enable the use of software
timestamping for the bonding interface.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 drivers/net/bonding/bond_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 00646aa315c3..f0856bec59f5 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -5709,9 +5709,7 @@ static int bond_ethtool_get_ts_info(struct net_device *bond_dev,
 		}
 	}
 
-	info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
-	info->phc_index = -1;
+	ret = ethtool_op_get_ts_info(bond_dev, info);
 
 out:
 	dev_put(real_dev);
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-04-05  9:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-29  3:13 [PATCH net-next] bonding: add software timestamping support Hangbin Liu
2023-03-29  3:36 ` Jay Vosburgh
2023-03-30  4:01   ` Hangbin Liu
2023-03-30  4:39     ` Jay Vosburgh
2023-03-29 10:27 ` Miroslav Lichvar
2023-03-30  3:33   ` Hangbin Liu
2023-03-30  4:07     ` Jakub Kicinski
2023-03-30  4:12     ` Jay Vosburgh
2023-03-31  3:32       ` Hangbin Liu
2023-04-03 10:18         ` Miroslav Lichvar
2023-04-05  9:04           ` Hangbin Liu

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).