Skip to contentSkip to conversation

ixgbe: Don't report unsupported timestamping filters for X550

PATCH New Miroslav Lichvar 3 participants 4 messages Jan 9, 2018 – Jan 10, 2018

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

PATCH 1/1 ixgbe: Don't report unsupported timestamping filters for X550

The current code enables on X550 timestamping of all packets for any filter, which means ethtool should not report any PTP-specific filters as supported.

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 37 ++++++++++++------------
 1 file changed, 19 insertions(+), 18 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +19 -18
index 0aaf70b..0a5a351 100644
@@ -3086,26 +3086,9 @@ static int ixgbe_get_ts_info(struct net_device *dev,
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_x550em_a:
 		info->rx_filters |= BIT(HWTSTAMP_FILTER_ALL);
-		/* fallthrough */
+		break;
 	case ixgbe_mac_X540:
 	case ixgbe_mac_82599EB:
-		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);
-
 		info->rx_filters |=
 			BIT(HWTSTAMP_FILTER_PTP_V1_L4_SYNC) |
 			BIT(HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) |
@@ -3114,6 +3097,24 @@ static int ixgbe_get_ts_info(struct net_device *dev,
 	default:
 		return ethtool_op_get_ts_info(dev, 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;
+
+	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);
+
 	return 0;
 }
 
Signature · 1 line
2.9.5
#1 lore raw

PATCH 1/1 ixgbe: Don't report unsupported timestamping filters for X550

Quoted 3 lines · Miroslav Lichvar

The current code enables on X550 timestamping of all packets for any filter, which means ethtool should not report any PTP-specific filters as supported.

Right. I keep forgetting the rule about this. It is found in the comment on ethtool_ts_info:

* Drivers should only report the filters they actually support without
* upscaling in the SIOCSHWTSTAMP ioctl. If the SIOCSHWSTAMP request for
* HWTSTAMP_FILTER_V1_SYNC is supported by HWTSTAMP_FILTER_V1_EVENT, then the
* driver should only report HWTSTAMP_FILTER_V1_EVENT in this op.

#2 lore raw

PATCH 1/1 ixgbe: Don't report unsupported timestamping filters for X550

Quoted 18 lines

-----Original Message-----
From: Richard Cochran [mailto:richardcochran at gmail.com]
Sent: Tuesday, January 09, 2018 7:47 AM
To: Miroslav Lichvar <[email protected]>
Cc: intel-wired-lan at lists.osuosl.org; Keller, Jacob E <[email protected]>
Subject: Re: [PATCH] ixgbe: Don't report unsupported timestamping filters for X550

Quoted 3 lines · Miroslav Lichvar

The current code enables on X550 timestamping of all packets for any filter, which means ethtool should not report any PTP-specific filters as supported.

Right. I keep forgetting the rule about this. It is found in the comment on ethtool_ts_info:

Quoted 7 lines

* Drivers should only report the filters they actually support without
* upscaling in the SIOCSHWTSTAMP ioctl. If the SIOCSHWSTAMP request for
* HWTSTAMP_FILTER_V1_SYNC is supported by HWTSTAMP_FILTER_V1_EVENT,
then the
* driver should only report HWTSTAMP_FILTER_V1_EVENT in this op.

Yep. Various developers had different ideas about this in the past.

Thanks,
Jake

#3 lore raw

PATCH 1/1 ixgbe: Don't report unsupported timestamping filters for X550

In reply to Miroslav Lichvar
Quoted 9 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Miroslav Lichvar
Sent: Tuesday, January 9, 2018 3:37 AM
To: intel-wired-lan at lists.osuosl.org
Cc: Richard Cochran <[email protected]>
Subject: [Intel-wired-lan] [PATCH] ixgbe: Don't report unsupported timestamping filters for X550

Quoted 8 lines

The current code enables on X550 timestamping of all packets for any filter, which means ethtool should not report any PTP-specific filters as supported.

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 37 ++++++++++++-------
-----
 1 file changed, 19 insertions(+), 18 deletions(-)