Skip to contentSkip to conversation

RX software timestamp for all

PATCH Applied Gal Pressman 5 participants 20 messages Sep 1, 2024 – Sep 3, 2024

Subsystems (15)
lore
Share & tools
lore
#0 lore raw

v2 cover RX software timestamp for all

All devices support SOF_TIMESTAMPING_RX_SOFTWARE by virtue of net_timestamp_check() being called in the device independent code. Following Willem's suggestion [1], make it so drivers do not have to handle SOF_TIMESTAMPING_RX_SOFTWARE and SOF_TIMESTAMPING_SOFTWARE, nor setting of the PHC index to -1.

All drivers will now report RX software timestamp as supported. The series is limited to 15 patches, I will submit other drivers in subsequent submissions.

[1] https://lore.kernel.org/netdev/[email protected]/

Changelog -
v1->v2: https://lore.kernel.org/netdev/[email protected]/
* Split series to patch per driver

Thanks,
Gal

Gal Pressman (15):
ethtool: RX software timestamp for all
can: dev: Remove setting of RX software timestamp
can: peak_canfd: Remove setting of RX software timestamp
can: peak_usb: Remove setting of RX software timestamp
tsnep: Remove setting of RX software timestamp
ionic: Remove setting of RX software timestamp
ravb: Remove setting of RX software timestamp
net: renesas: rswitch: Remove setting of RX software timestamp
net: ethernet: rtsn: Remove setting of RX software timestamp
net: hns3: Remove setting of RX software timestamp
net: fec: Remove setting of RX software timestamp
net: enetc: Remove setting of RX software timestamp
gianfar: Remove setting of RX software timestamp
octeontx2-pf: Remove setting of RX software timestamp
net: mvpp2: Remove setting of RX software timestamp

 drivers/net/can/dev/dev.c                     |  3 ---
 drivers/net/can/peak_canfd/peak_canfd.c       |  3 ---
 drivers/net/can/usb/peak_usb/pcan_usb_core.c  |  3 ---
 drivers/net/ethernet/engleder/tsnep_ethtool.c |  4 ----
 .../ethernet/freescale/enetc/enetc_ethtool.c  | 10 ++--------
 drivers/net/ethernet/freescale/fec_main.c     |  4 ----
 .../net/ethernet/freescale/gianfar_ethtool.c  | 10 ++--------
 .../hisilicon/hns3/hns3pf/hclge_ptp.c         |  4 ----
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   |  2 --
 .../marvell/octeontx2/nic/otx2_ethtool.c      |  2 --
 .../ethernet/pensando/ionic/ionic_ethtool.c   |  2 --
 drivers/net/ethernet/renesas/ravb_main.c      |  4 ++--
 drivers/net/ethernet/renesas/rswitch.c        |  2 --
 drivers/net/ethernet/renesas/rtsn.c           |  2 --
 net/ethtool/common.c                          | 19 ++++++++++---------
 15 files changed, 16 insertions(+), 58 deletions(-)
Signature · 1 line
2.40.1
#1 lore raw

PATCH v2 1/15 ethtool: RX software timestamp for all

All devices support SOF_TIMESTAMPING_RX_SOFTWARE by virtue of net_timestamp_check() being called in the device independent code.

Move the responsibility of reporting SOF_TIMESTAMPING_RX_SOFTWARE and SOF_TIMESTAMPING_SOFTWARE, and setting PHC index to -1 to the core. Device drivers no longer need to use them.

---
 net/ethtool/common.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
net/ethtool/common.c +10 -9
index 7257ae272296..aa7010f97152 100644
@@ -695,20 +695,21 @@ int __ethtool_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info
 {
 	const struct ethtool_ops *ops = dev->ethtool_ops;
 	struct phy_device *phydev = dev->phydev;
+	int err = 0;
 
 	memset(info, 0, sizeof(*info));
 	info->cmd = ETHTOOL_GET_TS_INFO;
-
-	if (phy_is_default_hwtstamp(phydev) && phy_has_tsinfo(phydev))
-		return phy_ts_info(phydev, info);
-	if (ops->get_ts_info)
-		return ops->get_ts_info(dev, info);
-
-	info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
 	info->phc_index = -1;
 
-	return 0;
+	if (phy_is_default_hwtstamp(phydev) && phy_has_tsinfo(phydev))
+		err = phy_ts_info(phydev, info);
+	else if (ops->get_ts_info)
+		err = ops->get_ts_info(dev, info);
+
+	info->so_timestamping |= SOF_TIMESTAMPING_RX_SOFTWARE |
+				 SOF_TIMESTAMPING_SOFTWARE;
+
+	return err;
 }
 
 int ethtool_get_phc_vclocks(struct net_device *dev, int **vclock_index)
Signature · 1 line
2.40.1
#2 lore raw

PATCH v2 2/15 can: dev: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/can/dev/dev.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/can/dev/dev.c +0 -3
index 87828f953073..6792c14fd7eb 100644
@@ -380,12 +380,9 @@ int can_ethtool_op_get_ts_info_hwts(struct net_device *dev,
 {
 	info->so_timestamping =
 		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
-	info->phc_index = -1;
 	info->tx_types = BIT(HWTSTAMP_TX_ON);
 	info->rx_filters = BIT(HWTSTAMP_FILTER_ALL);
 
Signature · 1 line
2.40.1
#3 lore raw

PATCH v2 3/15 can: peak_canfd: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/can/peak_canfd/peak_canfd.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/can/peak_canfd/peak_canfd.c +0 -3
index b50005397463..28f3fd805273 100644
@@ -781,11 +781,8 @@ static int peak_get_ts_info(struct net_device *dev,
 {
 	info->so_timestamping =
 		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
-	info->phc_index = -1;
 	info->tx_types = BIT(HWTSTAMP_TX_OFF);
 	info->rx_filters = BIT(HWTSTAMP_FILTER_ALL);
 
Signature · 1 line
2.40.1
#4 lore raw

PATCH v2 4/15 can: peak_usb: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/can/usb/peak_usb/pcan_usb_core.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/can/usb/peak_usb/pcan_usb_core.c +0 -3
index 3d68fef46ded..59f7cd8ceb39 100644
@@ -901,11 +901,8 @@ int pcan_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info
 {
 	info->so_timestamping =
 		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
-	info->phc_index = -1;
 	info->tx_types = BIT(HWTSTAMP_TX_OFF);
 	info->rx_filters = BIT(HWTSTAMP_FILTER_ALL);
 
Signature · 1 line
2.40.1
#5 lore raw

PATCH v2 5/15 tsnep: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/engleder/tsnep_ethtool.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/ethernet/engleder/tsnep_ethtool.c +0 -4
index 9aa286ba1f00..228a638eae16 100644
@@ -310,16 +310,12 @@ static int tsnep_ethtool_get_ts_info(struct net_device *netdev,
 	struct tsnep_adapter *adapter = netdev_priv(netdev);
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	if (adapter->ptp_clock)
 		info->phc_index = ptp_clock_index(adapter->ptp_clock);
-	else
-		info->phc_index = -1;
 
 	info->tx_types = BIT(HWTSTAMP_TX_OFF) |
 			 BIT(HWTSTAMP_TX_ON);
Signature · 1 line
2.40.1
#6 lore raw

PATCH v2 6/15 ionic: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +0 -2
index 4619fd74f3e3..dda22fa4448c 100644
@@ -989,8 +989,6 @@ static int ionic_get_ts_info(struct net_device *netdev,
 	info->phc_index = ptp_clock_index(lif->phc->ptp);
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
Signature · 1 line
2.40.1
Reviewed-by on v2 6/15
#7 lore raw

Re: [PATCH net-next v2 06/15] ionic: Remove setting of RX software timestamp

Quoted 29 lines · Gal Pressman

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
  drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 2 --
  1 file changed, 2 deletions(-)
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +0 -3
index 4619fd74f3e3..dda22fa4448c 100644
@@ -989,8 +989,6 @@ static int ionic_get_ts_info(struct net_device *netdev,
         info->phc_index = ptp_clock_index(lif->phc->ptp);
 
         info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-                               SOF_TIMESTAMPING_RX_SOFTWARE |
-                               SOF_TIMESTAMPING_SOFTWARE |
                                 SOF_TIMESTAMPING_TX_HARDWARE |
                                 SOF_TIMESTAMPING_RX_HARDWARE |
                                 SOF_TIMESTAMPING_RAW_HARDWARE;
--
Quoted 2 lines

2.40.1

Thanks!

#8 lore raw

PATCH v2 7/15 ravb: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/renesas/ravb_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/renesas/ravb_main.c +2 -2
index c02fb296bf7d..c7ec23688d56 100644
@@ -1744,8 +1744,6 @@ static int ravb_get_ts_info(struct net_device *ndev,
 
 	info->so_timestamping =
 		SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
@@ -1756,6 +1754,8 @@ static int ravb_get_ts_info(struct net_device *ndev,
 		(1 << HWTSTAMP_FILTER_ALL);
 	if (hw_info->gptp || hw_info->ccc_gac)
 		info->phc_index = ptp_clock_index(priv->ptp.clock);
+	else
+		info->phc_index = 0;
 
 	return 0;
 }
Signature · 1 line
2.40.1
Reviewed-by on v2 7/15
#9 lore raw

Re: [PATCH net-next v2 07/15] ravb: Remove setting of RX software timestamp

Quoted 8 lines · Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

[...]

MBR, Sergey

#10 lore raw

PATCH v2 8/15 net: renesas: rswitch: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/renesas/rswitch.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/renesas/rswitch.c +0 -2
index ff50e20856ec..b80aa27a7214 100644
@@ -1815,8 +1815,6 @@ static int rswitch_get_ts_info(struct net_device *ndev, struct kernel_ethtool_ts
 
 	info->phc_index = ptp_clock_index(rdev->priv->ptp_priv->clock);
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
Signature · 1 line
2.40.1
#11 lore raw

PATCH v2 9/15 net: ethernet: rtsn: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/renesas/rtsn.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/renesas/rtsn.c +0 -2
index 0e6cea42f007..f9f63c61d792 100644
@@ -1219,8 +1219,6 @@ static int rtsn_get_ts_info(struct net_device *ndev,
 
 	info->phc_index = ptp_clock_index(priv->ptp_priv->clock);
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-		SOF_TIMESTAMPING_RX_SOFTWARE |
-		SOF_TIMESTAMPING_SOFTWARE |
 		SOF_TIMESTAMPING_TX_HARDWARE |
 		SOF_TIMESTAMPING_RX_HARDWARE |
 		SOF_TIMESTAMPING_RAW_HARDWARE;
Signature · 1 line
2.40.1
#12 lore raw

PATCH v2 10/15 net: hns3: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c +0 -4
index 5fff8ed388f8..5505caea88e9 100644
@@ -389,16 +389,12 @@ int hclge_ptp_get_ts_info(struct hnae3_handle *handle,
 	}
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
 
 	if (hdev->ptp->clock)
 		info->phc_index = ptp_clock_index(hdev->ptp->clock);
-	else
-		info->phc_index = -1;
 
 	info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);
 
Signature · 1 line
2.40.1
#13 lore raw

PATCH v2 11/15 net: fec: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/freescale/fec_main.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/ethernet/freescale/fec_main.c +0 -4
index 8c3bf0faba63..acbb627d51bf 100644
@@ -2775,15 +2775,11 @@ static int fec_enet_get_ts_info(struct net_device *ndev,
 	if (fep->bufdesc_ex) {
 
 		info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-					SOF_TIMESTAMPING_RX_SOFTWARE |
-					SOF_TIMESTAMPING_SOFTWARE |
 					SOF_TIMESTAMPING_TX_HARDWARE |
 					SOF_TIMESTAMPING_RX_HARDWARE |
 					SOF_TIMESTAMPING_RAW_HARDWARE;
 		if (fep->ptp_clock)
 			info->phc_index = ptp_clock_index(fep->ptp_clock);
-		else
-			info->phc_index = -1;
 
 		info->tx_types = (1 << HWTSTAMP_TX_OFF) |
 				 (1 << HWTSTAMP_TX_ON);
Signature · 1 line
2.40.1
#14 lore raw

PATCH v2 12/15 net: enetc: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/freescale/enetc/enetc_ethtool.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c +2 -8
index 5e684b23c5f5..47c478e08d44 100644
@@ -849,17 +849,13 @@ static int enetc_get_ts_info(struct net_device *ndev,
 	if (phc_idx) {
 		info->phc_index = *phc_idx;
 		symbol_put(enetc_phc_index);
-	} else {
-		info->phc_index = -1;
 	}
 
 #ifdef CONFIG_FSL_ENETC_PTP_CLOCK
 	info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE |
-				SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
+				SOF_TIMESTAMPING_TX_SOFTWARE;
 
 	info->tx_types = (1 << HWTSTAMP_TX_OFF) |
 			 (1 << HWTSTAMP_TX_ON) |
@@ -867,9 +863,7 @@ static int enetc_get_ts_info(struct net_device *ndev,
 	info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
 			   (1 << HWTSTAMP_FILTER_ALL);
 #else
-	info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
+	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
 #endif
 	return 0;
 }
Signature · 1 line
2.40.1
#15 lore raw

PATCH v2 13/15 gianfar: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/freescale/gianfar_ethtool.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
drivers/net/ethernet/freescale/gianfar_ethtool.c +2 -8
index f581402ad740..a99b95c4bcfb 100644
@@ -1455,12 +1455,8 @@ static int gfar_get_ts_info(struct net_device *dev,
 	struct device_node *ptp_node;
 	struct ptp_qoriq *ptp = NULL;
 
-	info->phc_index = -1;
-
 	if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER)) {
-		info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
-					SOF_TIMESTAMPING_TX_SOFTWARE |
-					SOF_TIMESTAMPING_SOFTWARE;
+		info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE;
 		return 0;
 	}
 
@@ -1478,9 +1474,7 @@ static int gfar_get_ts_info(struct net_device *dev,
 	info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE;
+				SOF_TIMESTAMPING_TX_SOFTWARE;
 	info->tx_types = (1 << HWTSTAMP_TX_OFF) |
 			 (1 << HWTSTAMP_TX_ON);
 	info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
Signature · 1 line
2.40.1
#16 lore raw

PATCH v2 14/15 octeontx2-pf: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c +0 -2
index 0db62eb0dab3..32468c663605 100644
@@ -962,8 +962,6 @@ static int otx2_get_ts_info(struct net_device *netdev,
 		return ethtool_op_get_ts_info(netdev, info);
 
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
Signature · 1 line
2.40.1
#17 lore raw

PATCH v2 15/15 net: mvpp2: Remove setting of RX software timestamp

In reply to Gal Pressman

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +0 -2
index 0d62a33afa80..1f01c6febc6b 100644
@@ -5268,8 +5268,6 @@ static int mvpp2_ethtool_get_ts_info(struct net_device *dev,
 
 	info->phc_index = mvpp22_tai_ptp_clock_index(port->priv->tai);
 	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-				SOF_TIMESTAMPING_RX_SOFTWARE |
-				SOF_TIMESTAMPING_SOFTWARE |
 				SOF_TIMESTAMPING_TX_HARDWARE |
 				SOF_TIMESTAMPING_RX_HARDWARE |
 				SOF_TIMESTAMPING_RAW_HARDWARE;
Signature · 1 line
2.40.1
maintainer Reviewed-by on v2 15/15
#18 lore raw

Re: [PATCH net-next v2 15/15] net: mvpp2: Remove setting of RX software timestamp

niedz., 1 wrz 2024 o 13:31 Gal Pressman <[email protected]> napisał(a):

Quoted 18 lines

The responsibility for reporting of RX software timestamp has moved to the core layer (see __ethtool_get_ts_info()), remove usage from the device drivers.

---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +0 -0
index 0d62a33afa80..1f01c6febc6b 100644

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c static int mvpp2_ethtool_get_ts_info(struct net_device *dev, · line 5273

Quoted 8 lines
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +0 -2
@@ -5268,8 +5268,6 @@ static int mvpp2_ethtool_get_ts_info(struct net_device *dev,
 
        info->phc_index = mvpp22_tai_ptp_clock_index(port->priv->tai);
        info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
-                               SOF_TIMESTAMPING_RX_SOFTWARE |
-                               SOF_TIMESTAMPING_SOFTWARE |
                                SOF_TIMESTAMPING_TX_HARDWARE |
                                SOF_TIMESTAMPING_RX_HARDWARE |
                                SOF_TIMESTAMPING_RAW_HARDWARE;

Thanks!

#19 lore raw
In reply to Gal Pressman
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 11 lines · On Sun, 1 Sep 2024 14:27:48 +0300 you wrote:

All devices support SOF_TIMESTAMPING_RX_SOFTWARE by virtue of net_timestamp_check() being called in the device independent code. Following Willem's suggestion [1], make it so drivers do not have to handle SOF_TIMESTAMPING_RX_SOFTWARE and SOF_TIMESTAMPING_SOFTWARE, nor setting of the PHC index to -1.

All drivers will now report RX software timestamp as supported. The series is limited to 15 patches, I will submit other drivers in subsequent submissions.

[...]

Here is the summary with links:
- [net-next,v2,01/15] ethtool: RX software timestamp for all

    https://git.kernel.org/netdev/net-next/c/12d337339d9f
  - [net-next,v2,02/15] can: dev: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/b5ed017a5658
  - [net-next,v2,03/15] can: peak_canfd: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/583fee8210cb
  - [net-next,v2,04/15] can: peak_usb: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/ab6ebf02f222
  - [net-next,v2,05/15] tsnep: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/24186dc66b10
  - [net-next,v2,06/15] ionic: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/e052114e14c2
  - [net-next,v2,07/15] ravb: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/277901ee3a26
  - [net-next,v2,08/15] net: renesas: rswitch: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/41ee62317087
  - [net-next,v2,09/15] net: ethernet: rtsn: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/0f79953c0019
  - [net-next,v2,10/15] net: hns3: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/c6a15576e60e
  - [net-next,v2,11/15] net: fec: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/7d20c38d088e
  - [net-next,v2,12/15] net: enetc: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/3dd261ca7f84
  - [net-next,v2,13/15] gianfar: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/673ec22b1de8
  - [net-next,v2,14/15] octeontx2-pf: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/eb87a1daf6fb
  - [net-next,v2,15/15] net: mvpp2: Remove setting of RX software timestamp
    https://git.kernel.org/netdev/net-next/c/406e862b4583

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html