diff mbox series

[1/2] igc: Fix wrong timestamp latency numbers

Message ID 20200817231231.2971207-1-vinicius.gomes@intel.com
State Superseded
Delegated to: Anthony Nguyen
Headers show
Series [1/2] igc: Fix wrong timestamp latency numbers | expand

Commit Message

Vinicius Costa Gomes Aug. 17, 2020, 11:12 p.m. UTC
The previous timestamping latency numbers were obtained by
interpolating the i210 numbers with the i225 crystal clock value. That
calculation was wrong.

Use the correct values from real measurements.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
 drivers/net/ethernet/intel/igc/igc.h | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

Comments

Jesse Brandeburg Aug. 18, 2020, 9:36 p.m. UTC | #1
Vinicius Costa Gomes wrote:

> The previous timestamping latency numbers were obtained by
> interpolating the i210 numbers with the i225 crystal clock value. That
> calculation was wrong.
> 
> Use the correct values from real measurements.
> 
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>

Is this targeted at net or net-next, and because it is a fix I
recommend you have subject
[PATCH net 1/2]

and you should include a "Fixes:" tag since this driver has been
released in previous kernels.
Vinicius Costa Gomes Aug. 18, 2020, 10:52 p.m. UTC | #2
Jesse Brandeburg <jesse.brandeburg@intel.com> writes:

> Vinicius Costa Gomes wrote:
>
>> The previous timestamping latency numbers were obtained by
>> interpolating the i210 numbers with the i225 crystal clock value. That
>> calculation was wrong.
>> 
>> Use the correct values from real measurements.
>> 
>> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
>
> Is this targeted at net or net-next, and because it is a fix I
> recommend you have subject
> [PATCH net 1/2]

Oh, sorry about that. I used the wrong 'git format-patch' line.

>
> and you should include a "Fixes:" tag since this driver has been
> released in previous kernels.

Yes. This should have been directed to 'net-queue', thanks for noticing.

Will send a v2.


Cheers,
Brown, Aaron F Aug. 26, 2020, 10:02 p.m. UTC | #3
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Vinicius Costa Gomes
> Sent: Monday, August 17, 2020 4:13 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: Guedes, Andre <andre.guedes@intel.com>
> Subject: [Intel-wired-lan] [PATCH 1/2] igc: Fix wrong timestamp latency numbers
> 
> The previous timestamping latency numbers were obtained by
> interpolating the i210 numbers with the i225 crystal clock value. That
> calculation was wrong.
> 
> Use the correct values from real measurements.
> 
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> ---
>  drivers/net/ethernet/intel/igc/igc.h | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index 19f88f705ec3..522699b870c9 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -303,18 +303,14 @@  extern char igc_driver_name[];
 #define IGC_RX_HDR_LEN			IGC_RXBUFFER_256
 
 /* Transmit and receive latency (for PTP timestamps) */
-/* FIXME: These values were estimated using the ones that i225 has as
- * basis, they seem to provide good numbers with ptp4l/phc2sys, but we
- * need to confirm them.
- */
-#define IGC_I225_TX_LATENCY_10		9542
-#define IGC_I225_TX_LATENCY_100		1024
-#define IGC_I225_TX_LATENCY_1000	178
-#define IGC_I225_TX_LATENCY_2500	64
-#define IGC_I225_RX_LATENCY_10		20662
-#define IGC_I225_RX_LATENCY_100		2213
-#define IGC_I225_RX_LATENCY_1000	448
-#define IGC_I225_RX_LATENCY_2500	160
+#define IGC_I225_TX_LATENCY_10		240
+#define IGC_I225_TX_LATENCY_100		58
+#define IGC_I225_TX_LATENCY_1000	80
+#define IGC_I225_TX_LATENCY_2500	1325
+#define IGC_I225_RX_LATENCY_10		6450
+#define IGC_I225_RX_LATENCY_100		185
+#define IGC_I225_RX_LATENCY_1000	300
+#define IGC_I225_RX_LATENCY_2500	1485
 
 /* RX and TX descriptor control thresholds.
  * PTHRESH - MAC will consider prefetch if it has fewer than this number of