All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iwl-net] igc: Fix hicredit calculation
@ 2023-12-08 14:58 ` Rodrigo Cataldo
  0 siblings, 0 replies; 11+ messages in thread
From: Rodrigo Cataldo via B4 Relay @ 2023-12-08 14:58 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Aravindhan Gunasekaran,
	Mallikarjuna Chilakala, Vinicius Costa Gomes
  Cc: intel-wired-lan, netdev, linux-kernel, Kurt Kanzenbach, Rodrigo Cataldo

From: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>

According to the Intel Software Manual for I225, Section 7.5.2.7,
hicredit should be multiplied by the constant link-rate value, 0x7736.

Currently, the old constant link-rate value, 0x7735, from the boards
supported on igb are being used, most likely due to a copy'n'paste, as
the rest of the logic is the same for both drivers.

Update hicredit accordingly.

Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
---
This is a simple fix for the credit calculation on igc devices
(i225/i226) to match the Intel software manual.

This is my first contribution to the Linux Kernel. Apologies for any
mistakes and let me know if I improve anything.
---
 drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
index a9c08321aca9..22cefb1eeedf 100644
--- a/drivers/net/ethernet/intel/igc/igc_tsn.c
+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
@@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter)
 			wr32(IGC_TQAVCC(i), tqavcc);
 
 			wr32(IGC_TQAVHC(i),
-			     0x80000000 + ring->hicredit * 0x7735);
+			     0x80000000 + ring->hicredit * 0x7736);
 		} else {
 			/* Disable any CBS for the queue */
 			txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);

---
base-commit: 2078a341f5f609d55667c2dc6337f90d8f322b8f
change-id: 20231206-igc-fix-hicredit-calc-028bf73c50a8

Best regards,
-- 
Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH iwl-net] igc: Fix hicredit calculation
@ 2023-12-08 14:58 ` Rodrigo Cataldo
  0 siblings, 0 replies; 11+ messages in thread
From: Rodrigo Cataldo @ 2023-12-08 14:58 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Aravindhan Gunasekaran,
	Mallikarjuna Chilakala, Vinicius Costa Gomes
  Cc: intel-wired-lan, netdev, linux-kernel, Kurt Kanzenbach, Rodrigo Cataldo

According to the Intel Software Manual for I225, Section 7.5.2.7,
hicredit should be multiplied by the constant link-rate value, 0x7736.

Currently, the old constant link-rate value, 0x7735, from the boards
supported on igb are being used, most likely due to a copy'n'paste, as
the rest of the logic is the same for both drivers.

Update hicredit accordingly.

Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
---
This is a simple fix for the credit calculation on igc devices
(i225/i226) to match the Intel software manual.

This is my first contribution to the Linux Kernel. Apologies for any
mistakes and let me know if I improve anything.
---
 drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
index a9c08321aca9..22cefb1eeedf 100644
--- a/drivers/net/ethernet/intel/igc/igc_tsn.c
+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
@@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter)
 			wr32(IGC_TQAVCC(i), tqavcc);
 
 			wr32(IGC_TQAVHC(i),
-			     0x80000000 + ring->hicredit * 0x7735);
+			     0x80000000 + ring->hicredit * 0x7736);
 		} else {
 			/* Disable any CBS for the queue */
 			txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);

---
base-commit: 2078a341f5f609d55667c2dc6337f90d8f322b8f
change-id: 20231206-igc-fix-hicredit-calc-028bf73c50a8

Best regards,
-- 
Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Intel-wired-lan] [PATCH iwl-net] igc: Fix hicredit calculation
@ 2023-12-08 14:58 ` Rodrigo Cataldo
  0 siblings, 0 replies; 11+ messages in thread
From: Rodrigo Cataldo via B4 Relay @ 2023-12-08 14:58 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Aravindhan Gunasekaran,
	Mallikarjuna Chilakala, Vinicius Costa Gomes
  Cc: netdev, Rodrigo Cataldo, Kurt Kanzenbach, intel-wired-lan, linux-kernel

From: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>

According to the Intel Software Manual for I225, Section 7.5.2.7,
hicredit should be multiplied by the constant link-rate value, 0x7736.

Currently, the old constant link-rate value, 0x7735, from the boards
supported on igb are being used, most likely due to a copy'n'paste, as
the rest of the logic is the same for both drivers.

Update hicredit accordingly.

Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
---
This is a simple fix for the credit calculation on igc devices
(i225/i226) to match the Intel software manual.

This is my first contribution to the Linux Kernel. Apologies for any
mistakes and let me know if I improve anything.
---
 drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
index a9c08321aca9..22cefb1eeedf 100644
--- a/drivers/net/ethernet/intel/igc/igc_tsn.c
+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
@@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter)
 			wr32(IGC_TQAVCC(i), tqavcc);
 
 			wr32(IGC_TQAVHC(i),
-			     0x80000000 + ring->hicredit * 0x7735);
+			     0x80000000 + ring->hicredit * 0x7736);
 		} else {
 			/* Disable any CBS for the queue */
 			txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);

---
base-commit: 2078a341f5f609d55667c2dc6337f90d8f322b8f
change-id: 20231206-igc-fix-hicredit-calc-028bf73c50a8

Best regards,
-- 
Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH iwl-net] igc: Fix hicredit calculation
  2023-12-08 14:58 ` Rodrigo Cataldo
@ 2023-12-09  0:54   ` Vinicius Costa Gomes
  -1 siblings, 0 replies; 11+ messages in thread
From: Vinicius Costa Gomes @ 2023-12-09  0:54 UTC (permalink / raw)
  To: Rodrigo Cataldo via B4 Relay, Jesse Brandeburg, Tony Nguyen,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Aravindhan Gunasekaran, Mallikarjuna Chilakala
  Cc: intel-wired-lan, netdev, linux-kernel, Kurt Kanzenbach, Rodrigo Cataldo

Rodrigo Cataldo via B4 Relay
<devnull+rodrigo.cadore.l-acoustics.com@kernel.org> writes:

> From: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>
> According to the Intel Software Manual for I225, Section 7.5.2.7,
> hicredit should be multiplied by the constant link-rate value, 0x7736.
>
> Currently, the old constant link-rate value, 0x7735, from the boards
> supported on igb are being used, most likely due to a copy'n'paste, as
> the rest of the logic is the same for both drivers.
>
> Update hicredit accordingly.
>
> Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
> Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
> Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> ---

Very good catch.

Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>

Just for curiosity, my test machines are busy right now, what kind of
difference are you seeing?

> This is a simple fix for the credit calculation on igc devices
> (i225/i226) to match the Intel software manual.
>
> This is my first contribution to the Linux Kernel. Apologies for any
> mistakes and let me know if I improve anything.
> ---
>  drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
> index a9c08321aca9..22cefb1eeedf 100644
> --- a/drivers/net/ethernet/intel/igc/igc_tsn.c
> +++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
> @@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter)
>  			wr32(IGC_TQAVCC(i), tqavcc);
>  
>  			wr32(IGC_TQAVHC(i),
> -			     0x80000000 + ring->hicredit * 0x7735);
> +			     0x80000000 + ring->hicredit * 0x7736);
>  		} else {
>  			/* Disable any CBS for the queue */
>  			txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);
>
> ---
> base-commit: 2078a341f5f609d55667c2dc6337f90d8f322b8f
> change-id: 20231206-igc-fix-hicredit-calc-028bf73c50a8
>
> Best regards,
> -- 
> Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>

Cheers,
-- 
Vinicius

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net] igc: Fix hicredit calculation
@ 2023-12-09  0:54   ` Vinicius Costa Gomes
  0 siblings, 0 replies; 11+ messages in thread
From: Vinicius Costa Gomes @ 2023-12-09  0:54 UTC (permalink / raw)
  To: Rodrigo Cataldo via B4 Relay, Jesse Brandeburg, Tony Nguyen,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Aravindhan Gunasekaran, Mallikarjuna Chilakala
  Cc: netdev, Rodrigo Cataldo, Kurt Kanzenbach, intel-wired-lan, linux-kernel

Rodrigo Cataldo via B4 Relay
<devnull+rodrigo.cadore.l-acoustics.com@kernel.org> writes:

> From: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>
> According to the Intel Software Manual for I225, Section 7.5.2.7,
> hicredit should be multiplied by the constant link-rate value, 0x7736.
>
> Currently, the old constant link-rate value, 0x7735, from the boards
> supported on igb are being used, most likely due to a copy'n'paste, as
> the rest of the logic is the same for both drivers.
>
> Update hicredit accordingly.
>
> Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
> Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
> Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> ---

Very good catch.

Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>

Just for curiosity, my test machines are busy right now, what kind of
difference are you seeing?

> This is a simple fix for the credit calculation on igc devices
> (i225/i226) to match the Intel software manual.
>
> This is my first contribution to the Linux Kernel. Apologies for any
> mistakes and let me know if I improve anything.
> ---
>  drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
> index a9c08321aca9..22cefb1eeedf 100644
> --- a/drivers/net/ethernet/intel/igc/igc_tsn.c
> +++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
> @@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter)
>  			wr32(IGC_TQAVCC(i), tqavcc);
>  
>  			wr32(IGC_TQAVHC(i),
> -			     0x80000000 + ring->hicredit * 0x7735);
> +			     0x80000000 + ring->hicredit * 0x7736);
>  		} else {
>  			/* Disable any CBS for the queue */
>  			txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);
>
> ---
> base-commit: 2078a341f5f609d55667c2dc6337f90d8f322b8f
> change-id: 20231206-igc-fix-hicredit-calc-028bf73c50a8
>
> Best regards,
> -- 
> Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>

Cheers,
-- 
Vinicius
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH iwl-net] igc: Fix hicredit calculation
  2023-12-09  0:54   ` [Intel-wired-lan] " Vinicius Costa Gomes
  (?)
@ 2023-12-09 17:22   ` Chilakala, Mallikarjuna
  -1 siblings, 0 replies; 11+ messages in thread
From: Chilakala, Mallikarjuna @ 2023-12-09 17:22 UTC (permalink / raw)
  To: Gomes, Vinicius, Rodrigo Cataldo via B4 Relay, Brandeburg, Jesse,
	Nguyen, Anthony L, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Aravindhan Gunasekaran
  Cc: intel-wired-lan, netdev, linux-kernel, Kurt Kanzenbach, Rodrigo Cataldo

Rodrigo Cataldo via B4 Relay
<devnull+rodrigo.cadore.l-acoustics.com@kernel.org> writes:

> From: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>
> According to the Intel Software Manual for I225, Section 7.5.2.7, 
> hicredit should be multiplied by the constant link-rate value, 0x7736.
>
> Currently, the old constant link-rate value, 0x7735, from the boards 
> supported on igb are being used, most likely due to a copy'n'paste, as 
> the rest of the logic is the same for both drivers.
>
> Update hicredit accordingly.
>
> Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
> Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
> Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> ---

Looks good to me!
Acked-by: Malli Chilakala <mallikarjuna.chilakala@intel.com>

> This is a simple fix for the credit calculation on igc devices
> (i225/i226) to match the Intel software manual.
>
> This is my first contribution to the Linux Kernel. Apologies for any 
> mistakes and let me know if I improve anything.
> ---
>  drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c 
> b/drivers/net/ethernet/intel/igc/igc_tsn.c
> index a9c08321aca9..22cefb1eeedf 100644
> --- a/drivers/net/ethernet/intel/igc/igc_tsn.c
> +++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
> @@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter *adapter)
>  			wr32(IGC_TQAVCC(i), tqavcc);
>  
>  			wr32(IGC_TQAVHC(i),
> -			     0x80000000 + ring->hicredit * 0x7735);
> +			     0x80000000 + ring->hicredit * 0x7736);
>  		} else {
>  			/* Disable any CBS for the queue */
>  			txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);
>
> ---
> base-commit: 2078a341f5f609d55667c2dc6337f90d8f322b8f
> change-id: 20231206-igc-fix-hicredit-calc-028bf73c50a8
>
> Best regards,
> --
> Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH iwl-net] igc: Fix hicredit calculation
  2023-12-09  0:54   ` [Intel-wired-lan] " Vinicius Costa Gomes
@ 2023-12-11  9:21     ` Rodrigo CADORE CATALDO
  -1 siblings, 0 replies; 11+ messages in thread
From: Rodrigo CADORE CATALDO @ 2023-12-11  9:21 UTC (permalink / raw)
  To: Vinicius Costa Gomes, Rodrigo Cataldo via B4 Relay,
	Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Aravindhan Gunasekaran,
	Mallikarjuna Chilakala
  Cc: intel-wired-lan, netdev, linux-kernel, Kurt Kanzenbach

> -----Original Message-----
> From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> 
> Rodrigo Cataldo via B4 Relay
> <devnull+rodrigo.cadore.l-acoustics.com@kernel.org> writes:
> 
> > From: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> >
> > According to the Intel Software Manual for I225, Section 7.5.2.7,
> > hicredit should be multiplied by the constant link-rate value, 0x7736.
> >
> > Currently, the old constant link-rate value, 0x7735, from the boards
> > supported on igb are being used, most likely due to a copy'n'paste, as
> > the rest of the logic is the same for both drivers.
> >
> > Update hicredit accordingly.
> >
> > Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
> > Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
> > Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> > ---
> 
> Very good catch.
> 
> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> 
> Just for curiosity, my test machines are busy right now, what kind of
> difference are you seeing?
> 

Hello Vinicius, thank you for the ACK.

For our internal setup, this does not make a difference. My understanding is 
that hicredit is used for non-SR traffic mixed with SR traffic (i.e., hicredit is
directly related to the max non-SR frame size). But our setup does not mix
them (q0 is used only for milan audio/clock SR class A).

Let me know if you think we need a testcase for this.

> > This is a simple fix for the credit calculation on igc devices
> > (i225/i226) to match the Intel software manual.
> >
> > This is my first contribution to the Linux Kernel. Apologies for any
> > mistakes and let me know if I improve anything.
> > ---
> >  drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c
> b/drivers/net/ethernet/intel/igc/igc_tsn.c
> > index a9c08321aca9..22cefb1eeedf 100644
> > --- a/drivers/net/ethernet/intel/igc/igc_tsn.c
> > +++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
> > @@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter
> *adapter)
> >                       wr32(IGC_TQAVCC(i), tqavcc);
> >
> >                       wr32(IGC_TQAVHC(i),
> > -                          0x80000000 + ring->hicredit * 0x7735);
> > +                          0x80000000 + ring->hicredit * 0x7736);
> >               } else {
> >                       /* Disable any CBS for the queue */
> >                       txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);
> >
> > ---
> > base-commit: 2078a341f5f609d55667c2dc6337f90d8f322b8f
> > change-id: 20231206-igc-fix-hicredit-calc-028bf73c50a8
> >
> > Best regards,
> > --
> > Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> >
> 
> Cheers,
> --
> Vinicius

Best Regards,
Rodrigo Cataldo

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net] igc: Fix hicredit calculation
@ 2023-12-11  9:21     ` Rodrigo CADORE CATALDO
  0 siblings, 0 replies; 11+ messages in thread
From: Rodrigo CADORE CATALDO @ 2023-12-11  9:21 UTC (permalink / raw)
  To: Vinicius Costa Gomes, Rodrigo Cataldo via B4 Relay,
	Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Aravindhan Gunasekaran,
	Mallikarjuna Chilakala
  Cc: netdev, Kurt Kanzenbach, intel-wired-lan, linux-kernel

> -----Original Message-----
> From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> 
> Rodrigo Cataldo via B4 Relay
> <devnull+rodrigo.cadore.l-acoustics.com@kernel.org> writes:
> 
> > From: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> >
> > According to the Intel Software Manual for I225, Section 7.5.2.7,
> > hicredit should be multiplied by the constant link-rate value, 0x7736.
> >
> > Currently, the old constant link-rate value, 0x7735, from the boards
> > supported on igb are being used, most likely due to a copy'n'paste, as
> > the rest of the logic is the same for both drivers.
> >
> > Update hicredit accordingly.
> >
> > Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
> > Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
> > Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> > ---
> 
> Very good catch.
> 
> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> 
> Just for curiosity, my test machines are busy right now, what kind of
> difference are you seeing?
> 

Hello Vinicius, thank you for the ACK.

For our internal setup, this does not make a difference. My understanding is 
that hicredit is used for non-SR traffic mixed with SR traffic (i.e., hicredit is
directly related to the max non-SR frame size). But our setup does not mix
them (q0 is used only for milan audio/clock SR class A).

Let me know if you think we need a testcase for this.

> > This is a simple fix for the credit calculation on igc devices
> > (i225/i226) to match the Intel software manual.
> >
> > This is my first contribution to the Linux Kernel. Apologies for any
> > mistakes and let me know if I improve anything.
> > ---
> >  drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c
> b/drivers/net/ethernet/intel/igc/igc_tsn.c
> > index a9c08321aca9..22cefb1eeedf 100644
> > --- a/drivers/net/ethernet/intel/igc/igc_tsn.c
> > +++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
> > @@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter
> *adapter)
> >                       wr32(IGC_TQAVCC(i), tqavcc);
> >
> >                       wr32(IGC_TQAVHC(i),
> > -                          0x80000000 + ring->hicredit * 0x7735);
> > +                          0x80000000 + ring->hicredit * 0x7736);
> >               } else {
> >                       /* Disable any CBS for the queue */
> >                       txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);
> >
> > ---
> > base-commit: 2078a341f5f609d55667c2dc6337f90d8f322b8f
> > change-id: 20231206-igc-fix-hicredit-calc-028bf73c50a8
> >
> > Best regards,
> > --
> > Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> >
> 
> Cheers,
> --
> Vinicius

Best Regards,
Rodrigo Cataldo
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH iwl-net] igc: Fix hicredit calculation
  2023-12-11  9:21     ` [Intel-wired-lan] " Rodrigo CADORE CATALDO
@ 2023-12-11 18:08       ` Vinicius Costa Gomes
  -1 siblings, 0 replies; 11+ messages in thread
From: Vinicius Costa Gomes @ 2023-12-11 18:08 UTC (permalink / raw)
  To: Rodrigo CADORE CATALDO, Rodrigo Cataldo via B4 Relay,
	Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Aravindhan Gunasekaran,
	Mallikarjuna Chilakala
  Cc: intel-wired-lan, netdev, linux-kernel, Kurt Kanzenbach

Rodrigo CADORE CATALDO <rodrigo.cadore@l-acoustics.com> writes:

>> -----Original Message-----
>> From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
>> 
>> Rodrigo Cataldo via B4 Relay
>> <devnull+rodrigo.cadore.l-acoustics.com@kernel.org> writes:
>> 
>> > From: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>> >
>> > According to the Intel Software Manual for I225, Section 7.5.2.7,
>> > hicredit should be multiplied by the constant link-rate value, 0x7736.
>> >
>> > Currently, the old constant link-rate value, 0x7735, from the boards
>> > supported on igb are being used, most likely due to a copy'n'paste, as
>> > the rest of the logic is the same for both drivers.
>> >
>> > Update hicredit accordingly.
>> >
>> > Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
>> > Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
>> > Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>> > ---
>> 
>> Very good catch.
>> 
>> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
>> 
>> Just for curiosity, my test machines are busy right now, what kind of
>> difference are you seeing?
>> 
>
> Hello Vinicius, thank you for the ACK.
>
> For our internal setup, this does not make a difference. My understanding is 
> that hicredit is used for non-SR traffic mixed with SR traffic (i.e., hicredit is
> directly related to the max non-SR frame size). But our setup does not mix
> them (q0 is used only for milan audio/clock SR class A).

I see.

>
> Let me know if you think we need a testcase for this.
>

It was just curiority. No need. Thanks.

>> > This is a simple fix for the credit calculation on igc devices
>> > (i225/i226) to match the Intel software manual.
>> >
>> > This is my first contribution to the Linux Kernel. Apologies for any
>> > mistakes and let me know if I improve anything.
>> > ---
>> >  drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c
>> b/drivers/net/ethernet/intel/igc/igc_tsn.c
>> > index a9c08321aca9..22cefb1eeedf 100644
>> > --- a/drivers/net/ethernet/intel/igc/igc_tsn.c
>> > +++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
>> > @@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter
>> *adapter)
>> >                       wr32(IGC_TQAVCC(i), tqavcc);
>> >
>> >                       wr32(IGC_TQAVHC(i),
>> > -                          0x80000000 + ring->hicredit * 0x7735);
>> > +                          0x80000000 + ring->hicredit * 0x7736);
>> >               } else {
>> >                       /* Disable any CBS for the queue */
>> >                       txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);
>> >
>> > ---
>> > base-commit: 2078a341f5f609d55667c2dc6337f90d8f322b8f
>> > change-id: 20231206-igc-fix-hicredit-calc-028bf73c50a8
>> >
>> > Best regards,
>> > --
>> > Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>> >
>> 
>> Cheers,
>> --
>> Vinicius
>
> Best Regards,
> Rodrigo Cataldo


Cheers,
-- 
Vinicius

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net] igc: Fix hicredit calculation
@ 2023-12-11 18:08       ` Vinicius Costa Gomes
  0 siblings, 0 replies; 11+ messages in thread
From: Vinicius Costa Gomes @ 2023-12-11 18:08 UTC (permalink / raw)
  To: Rodrigo CADORE CATALDO, Rodrigo Cataldo via B4 Relay,
	Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Aravindhan Gunasekaran,
	Mallikarjuna Chilakala
  Cc: netdev, Kurt Kanzenbach, intel-wired-lan, linux-kernel

Rodrigo CADORE CATALDO <rodrigo.cadore@l-acoustics.com> writes:

>> -----Original Message-----
>> From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
>> 
>> Rodrigo Cataldo via B4 Relay
>> <devnull+rodrigo.cadore.l-acoustics.com@kernel.org> writes:
>> 
>> > From: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>> >
>> > According to the Intel Software Manual for I225, Section 7.5.2.7,
>> > hicredit should be multiplied by the constant link-rate value, 0x7736.
>> >
>> > Currently, the old constant link-rate value, 0x7735, from the boards
>> > supported on igb are being used, most likely due to a copy'n'paste, as
>> > the rest of the logic is the same for both drivers.
>> >
>> > Update hicredit accordingly.
>> >
>> > Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
>> > Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
>> > Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>> > ---
>> 
>> Very good catch.
>> 
>> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
>> 
>> Just for curiosity, my test machines are busy right now, what kind of
>> difference are you seeing?
>> 
>
> Hello Vinicius, thank you for the ACK.
>
> For our internal setup, this does not make a difference. My understanding is 
> that hicredit is used for non-SR traffic mixed with SR traffic (i.e., hicredit is
> directly related to the max non-SR frame size). But our setup does not mix
> them (q0 is used only for milan audio/clock SR class A).

I see.

>
> Let me know if you think we need a testcase for this.
>

It was just curiority. No need. Thanks.

>> > This is a simple fix for the credit calculation on igc devices
>> > (i225/i226) to match the Intel software manual.
>> >
>> > This is my first contribution to the Linux Kernel. Apologies for any
>> > mistakes and let me know if I improve anything.
>> > ---
>> >  drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c
>> b/drivers/net/ethernet/intel/igc/igc_tsn.c
>> > index a9c08321aca9..22cefb1eeedf 100644
>> > --- a/drivers/net/ethernet/intel/igc/igc_tsn.c
>> > +++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
>> > @@ -227,7 +227,7 @@ static int igc_tsn_enable_offload(struct igc_adapter
>> *adapter)
>> >                       wr32(IGC_TQAVCC(i), tqavcc);
>> >
>> >                       wr32(IGC_TQAVHC(i),
>> > -                          0x80000000 + ring->hicredit * 0x7735);
>> > +                          0x80000000 + ring->hicredit * 0x7736);
>> >               } else {
>> >                       /* Disable any CBS for the queue */
>> >                       txqctl &= ~(IGC_TXQCTL_QAV_SEL_MASK);
>> >
>> > ---
>> > base-commit: 2078a341f5f609d55667c2dc6337f90d8f322b8f
>> > change-id: 20231206-igc-fix-hicredit-calc-028bf73c50a8
>> >
>> > Best regards,
>> > --
>> > Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
>> >
>> 
>> Cheers,
>> --
>> Vinicius
>
> Best Regards,
> Rodrigo Cataldo


Cheers,
-- 
Vinicius
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net] igc: Fix hicredit calculation
  2023-12-08 14:58 ` Rodrigo Cataldo
                   ` (2 preceding siblings ...)
  (?)
@ 2023-12-28  9:24 ` naamax.meir
  -1 siblings, 0 replies; 11+ messages in thread
From: naamax.meir @ 2023-12-28  9:24 UTC (permalink / raw)
  To: rodrigo.cadore, Jesse Brandeburg, Tony Nguyen, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Aravindhan Gunasekaran, Mallikarjuna Chilakala,
	Vinicius Costa Gomes
  Cc: netdev, Kurt Kanzenbach, intel-wired-lan, linux-kernel

On 12/8/2023 16:58, Rodrigo Cataldo via B4 Relay wrote:
> From: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> 
> According to the Intel Software Manual for I225, Section 7.5.2.7,
> hicredit should be multiplied by the constant link-rate value, 0x7736.
> 
> Currently, the old constant link-rate value, 0x7735, from the boards
> supported on igb are being used, most likely due to a copy'n'paste, as
> the rest of the logic is the same for both drivers.
> 
> Update hicredit accordingly.
> 
> Fixes: 1ab011b0bf07 ("igc: Add support for CBS offloading")
> Reviewed-by: Kurt Kanzenbach <kurt@linutronix.de>
> Signed-off-by: Rodrigo Cataldo <rodrigo.cadore@l-acoustics.com>
> ---
> This is a simple fix for the credit calculation on igc devices
> (i225/i226) to match the Intel software manual.
> 
> This is my first contribution to the Linux Kernel. Apologies for any
> mistakes and let me know if I improve anything.
> ---
>   drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Naama Meir <naamax.meir@linux.intel.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-12-28  9:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-08 14:58 [PATCH iwl-net] igc: Fix hicredit calculation Rodrigo Cataldo via B4 Relay
2023-12-08 14:58 ` [Intel-wired-lan] " Rodrigo Cataldo via B4 Relay
2023-12-08 14:58 ` Rodrigo Cataldo
2023-12-09  0:54 ` Vinicius Costa Gomes
2023-12-09  0:54   ` [Intel-wired-lan] " Vinicius Costa Gomes
2023-12-09 17:22   ` Chilakala, Mallikarjuna
2023-12-11  9:21   ` Rodrigo CADORE CATALDO
2023-12-11  9:21     ` [Intel-wired-lan] " Rodrigo CADORE CATALDO
2023-12-11 18:08     ` Vinicius Costa Gomes
2023-12-11 18:08       ` [Intel-wired-lan] " Vinicius Costa Gomes
2023-12-28  9:24 ` naamax.meir

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.