lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 28 Feb 2024 10:37:56 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
	edumazet@...gle.com, netdev@...r.kernel.org,
	Oleksij Rempel <o.rempel@...gutronix.de>, richardcochran@...il.com,
	nathan.sullivan@...com, Jacob Keller <jacob.e.keller@...el.com>,
	Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com>
Subject: Re: [PATCH net] igb: extend PTP timestamp adjustments to i211

Tue, Feb 27, 2024 at 07:49:41PM CET, anthony.l.nguyen@...el.com wrote:
>From: Oleksij Rempel <o.rempel@...gutronix.de>
>
>The i211 requires the same PTP timestamp adjustments as the i210,
>according to its datasheet. To ensure consistent timestamping across
>different platforms, this change extends the existing adjustments to
>include the i211.
>
>The adjustment result are tested and comparable for i210 and i211 based
>systems.
>
>Fixes: 3f544d2a4d5c ("igb: adjust PTP timestamps for Tx/Rx latency")

IIUC, you are just extending the timestamp adjusting to another HW, not
actually fixing any error, don't you? In that case, I don't see why not
to rather target net-next and avoid "Fixes" tag. Or do I misunderstand
this?


>Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
>Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
>Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)
>Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
>---
> drivers/net/ethernet/intel/igb/igb_ptp.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
>index 319c544b9f04..f94570556120 100644
>--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
>+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
>@@ -957,7 +957,7 @@ static void igb_ptp_tx_hwtstamp(struct igb_adapter *adapter)
> 
> 	igb_ptp_systim_to_hwtstamp(adapter, &shhwtstamps, regval);
> 	/* adjust timestamp for the TX latency based on link speed */
>-	if (adapter->hw.mac.type == e1000_i210) {
>+	if (hw->mac.type == e1000_i210 || hw->mac.type == e1000_i211) {
> 		switch (adapter->link_speed) {
> 		case SPEED_10:
> 			adjust = IGB_I210_TX_LATENCY_10;
>@@ -1003,6 +1003,7 @@ int igb_ptp_rx_pktstamp(struct igb_q_vector *q_vector, void *va,
> 			ktime_t *timestamp)
> {
> 	struct igb_adapter *adapter = q_vector->adapter;
>+	struct e1000_hw *hw = &adapter->hw;
> 	struct skb_shared_hwtstamps ts;
> 	__le64 *regval = (__le64 *)va;
> 	int adjust = 0;
>@@ -1022,7 +1023,7 @@ int igb_ptp_rx_pktstamp(struct igb_q_vector *q_vector, void *va,
> 	igb_ptp_systim_to_hwtstamp(adapter, &ts, le64_to_cpu(regval[1]));
> 
> 	/* adjust timestamp for the RX latency based on link speed */
>-	if (adapter->hw.mac.type == e1000_i210) {
>+	if (hw->mac.type == e1000_i210 || hw->mac.type == e1000_i211) {
> 		switch (adapter->link_speed) {
> 		case SPEED_10:
> 			adjust = IGB_I210_RX_LATENCY_10;
>-- 
>2.41.0
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ