netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iwl-net] i40e: Fix wrong mask used during DCB config
@ 2023-11-30 19:31 Ivan Vecera
  2023-12-01  7:49 ` [Intel-wired-lan] " Przemek Kitszel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ivan Vecera @ 2023-11-30 19:31 UTC (permalink / raw)
  To: netdev
  Cc: Jesse Brandeburg, Tony Nguyen, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Aleksandr Loktionov,
	Arkadiusz Kubalewski, moderated list:INTEL ETHERNET DRIVERS,
	open list

Mask used for clearing PRTDCB_RETSTCC register in function
i40e_dcb_hw_rx_ets_bw_config() is incorrect as there is used
define I40E_PRTDCB_RETSTCC_ETSTC_SHIFT instead of define
I40E_PRTDCB_RETSTCC_ETSTC_MASK.

The PRTDCB_RETSTCC register is used to configure whether ETS
or strict priority is used as TSA in Rx for particular TC.

In practice it means that once the register is set to use ETS
as TSA then it is not possible to switch back to strict priority
without CoreR reset.

Fix the value in the clearing mask.

Fixes: 90bc8e003be2 ("i40e: Add hardware configuration for software based DCB")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
 drivers/net/ethernet/intel/i40e/i40e_dcb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb.c b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
index 68602fc375f6..073ffbfcbe8d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_dcb.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
@@ -1576,7 +1576,7 @@ void i40e_dcb_hw_rx_ets_bw_config(struct i40e_hw *hw, u8 *bw_share,
 		reg = rd32(hw, I40E_PRTDCB_RETSTCC(i));
 		reg &= ~(I40E_PRTDCB_RETSTCC_BWSHARE_MASK     |
 			 I40E_PRTDCB_RETSTCC_UPINTC_MODE_MASK |
-			 I40E_PRTDCB_RETSTCC_ETSTC_SHIFT);
+			 I40E_PRTDCB_RETSTCC_ETSTC_MASK);
 		reg |= ((u32)bw_share[i] << I40E_PRTDCB_RETSTCC_BWSHARE_SHIFT) &
 			 I40E_PRTDCB_RETSTCC_BWSHARE_MASK;
 		reg |= ((u32)mode[i] << I40E_PRTDCB_RETSTCC_UPINTC_MODE_SHIFT) &
-- 
2.41.0


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

* Re: [Intel-wired-lan] [PATCH iwl-net] i40e: Fix wrong mask used during DCB config
  2023-11-30 19:31 [PATCH iwl-net] i40e: Fix wrong mask used during DCB config Ivan Vecera
@ 2023-12-01  7:49 ` Przemek Kitszel
  2023-12-05 20:48 ` Simon Horman
  2024-02-09 18:57 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
  2 siblings, 0 replies; 4+ messages in thread
From: Przemek Kitszel @ 2023-12-01  7:49 UTC (permalink / raw)
  To: Ivan Vecera, netdev
  Cc: moderated list:INTEL ETHERNET DRIVERS, Jesse Brandeburg,
	Arkadiusz Kubalewski, Aleksandr Loktionov, Eric Dumazet,
	Tony Nguyen, Jakub Kicinski, Paolo Abeni, David S. Miller,
	open list

On 11/30/23 20:31, Ivan Vecera wrote:
> Mask used for clearing PRTDCB_RETSTCC register in function
> i40e_dcb_hw_rx_ets_bw_config() is incorrect as there is used
> define I40E_PRTDCB_RETSTCC_ETSTC_SHIFT instead of define
> I40E_PRTDCB_RETSTCC_ETSTC_MASK.
> 
> The PRTDCB_RETSTCC register is used to configure whether ETS
> or strict priority is used as TSA in Rx for particular TC.
> 
> In practice it means that once the register is set to use ETS
> as TSA then it is not possible to switch back to strict priority
> without CoreR reset.
> 
> Fix the value in the clearing mask.
> 
> Fixes: 90bc8e003be2 ("i40e: Add hardware configuration for software based DCB")
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_dcb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb.c b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
> index 68602fc375f6..073ffbfcbe8d 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_dcb.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
> @@ -1576,7 +1576,7 @@ void i40e_dcb_hw_rx_ets_bw_config(struct i40e_hw *hw, u8 *bw_share,
>   		reg = rd32(hw, I40E_PRTDCB_RETSTCC(i));
>   		reg &= ~(I40E_PRTDCB_RETSTCC_BWSHARE_MASK     |
>   			 I40E_PRTDCB_RETSTCC_UPINTC_MODE_MASK |
> -			 I40E_PRTDCB_RETSTCC_ETSTC_SHIFT);
> +			 I40E_PRTDCB_RETSTCC_ETSTC_MASK);
>   		reg |= ((u32)bw_share[i] << I40E_PRTDCB_RETSTCC_BWSHARE_SHIFT) &
>   			 I40E_PRTDCB_RETSTCC_BWSHARE_MASK;
>   		reg |= ((u32)mode[i] << I40E_PRTDCB_RETSTCC_UPINTC_MODE_SHIFT) &

Thank you!

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>

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

* Re: [PATCH iwl-net] i40e: Fix wrong mask used during DCB config
  2023-11-30 19:31 [PATCH iwl-net] i40e: Fix wrong mask used during DCB config Ivan Vecera
  2023-12-01  7:49 ` [Intel-wired-lan] " Przemek Kitszel
@ 2023-12-05 20:48 ` Simon Horman
  2024-02-09 18:57 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-12-05 20:48 UTC (permalink / raw)
  To: Ivan Vecera
  Cc: netdev, Jesse Brandeburg, Tony Nguyen, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Aleksandr Loktionov,
	Arkadiusz Kubalewski, moderated list:INTEL ETHERNET DRIVERS,
	open list

On Thu, Nov 30, 2023 at 08:31:34PM +0100, Ivan Vecera wrote:
> Mask used for clearing PRTDCB_RETSTCC register in function
> i40e_dcb_hw_rx_ets_bw_config() is incorrect as there is used
> define I40E_PRTDCB_RETSTCC_ETSTC_SHIFT instead of define
> I40E_PRTDCB_RETSTCC_ETSTC_MASK.
> 
> The PRTDCB_RETSTCC register is used to configure whether ETS
> or strict priority is used as TSA in Rx for particular TC.
> 
> In practice it means that once the register is set to use ETS
> as TSA then it is not possible to switch back to strict priority
> without CoreR reset.
> 
> Fix the value in the clearing mask.
> 
> Fixes: 90bc8e003be2 ("i40e: Add hardware configuration for software based DCB")
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Reviewed-by: Simon Horman <horms@kernel.org>

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

* RE: [Intel-wired-lan] [PATCH iwl-net] i40e: Fix wrong mask used during DCB config
  2023-11-30 19:31 [PATCH iwl-net] i40e: Fix wrong mask used during DCB config Ivan Vecera
  2023-12-01  7:49 ` [Intel-wired-lan] " Przemek Kitszel
  2023-12-05 20:48 ` Simon Horman
@ 2024-02-09 18:57 ` Pucha, HimasekharX Reddy
  2 siblings, 0 replies; 4+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-02-09 18:57 UTC (permalink / raw)
  To: ivecera, netdev
  Cc: moderated list:INTEL ETHERNET DRIVERS, Brandeburg, Jesse,
	Kubalewski, Arkadiusz, Loktionov, Aleksandr, Eric Dumazet,
	Nguyen, Anthony L, Jakub Kicinski, Paolo Abeni, David S. Miller,
	open list

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Ivan Vecera
> Sent: Friday, December 1, 2023 1:02 AM
> To: netdev@vger.kernel.org
> Cc: moderated list:INTEL ETHERNET DRIVERS <intel-wired-lan@lists.osuosl.org>; Brandeburg, Jesse <jesse.brandeburg@intel.com>; Kubalewski, Arkadiusz <arkadiusz.kubalewski@intel.com>; Loktionov, Aleksandr <aleksandr.loktionov@intel.com>; Eric Dumazet <edumazet@google.com>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; David S. Miller <davem@davemloft.net>; open list <linux-kernel@vger.kernel.org>
> Subject: [Intel-wired-lan] [PATCH iwl-net] i40e: Fix wrong mask used during DCB config
>
> Mask used for clearing PRTDCB_RETSTCC register in function
> i40e_dcb_hw_rx_ets_bw_config() is incorrect as there is used
> define I40E_PRTDCB_RETSTCC_ETSTC_SHIFT instead of define
> I40E_PRTDCB_RETSTCC_ETSTC_MASK.
>
> The PRTDCB_RETSTCC register is used to configure whether ETS
> or strict priority is used as TSA in Rx for particular TC.
>
> In practice it means that once the register is set to use ETS
> as TSA then it is not possible to switch back to strict priority
> without CoreR reset.
>
> Fix the value in the clearing mask.
>
> Fixes: 90bc8e003be2 ("i40e: Add hardware configuration for software based DCB")
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_dcb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)


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

end of thread, other threads:[~2024-02-09 18:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-30 19:31 [PATCH iwl-net] i40e: Fix wrong mask used during DCB config Ivan Vecera
2023-12-01  7:49 ` [Intel-wired-lan] " Przemek Kitszel
2023-12-05 20:48 ` Simon Horman
2024-02-09 18:57 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).