Skip to content

Commit d753381

Browse files
author
Hangbin Liu
committed
bonding: fix incorrect software timestamping report
JIRA: https://issues.redhat.com/browse/RHEL-42409 Upstream Status: net.git commit a95b031 commit a95b031 Author: Hangbin Liu <liuhangbin@gmail.com> Date: Thu Jun 20 16:56:26 2024 +0800 bonding: fix incorrect software timestamping report The __ethtool_get_ts_info function returns directly if the device has a get_ts_info() method. For bonding with an active slave, this works correctly as we simply return the real device's timestamping information. However, when there is no active slave, we only check the slave's TX software timestamp information. We still need to set the phc index and RX timestamp information manually. Otherwise, the result will be look like: Time stamping parameters for bond0: Capabilities: software-transmit PTP Hardware Clock: 0 Hardware Transmit Timestamp Modes: none Hardware Receive Filter Modes: none This issue does not affect VLAN or MACVLAN devices, as they only have one downlink and can directly use the downlink's timestamping information. Fixes: b8768dc ("net: ethtool: Refactor identical get_ts_info implementations.") Reported-by: Liang Li <liali@redhat.com> Closes: https://issues.redhat.com/browse/RHEL-42409 Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Acked-by: Kory Maincent <kory.maincent@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Hangbin Liu <haliu@redhat.com>
1 parent 3f1adee commit d753381

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5778,6 +5778,9 @@ static int bond_ethtool_get_ts_info(struct net_device *bond_dev,
57785778
if (real_dev) {
57795779
ret = ethtool_get_ts_info_by_layer(real_dev, info);
57805780
} else {
5781+
info->phc_index = -1;
5782+
info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
5783+
SOF_TIMESTAMPING_SOFTWARE;
57815784
/* Check if all slaves support software tx timestamping */
57825785
rcu_read_lock();
57835786
bond_for_each_slave_rcu(bond, slave, iter) {

0 commit comments

Comments
 (0)