netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS
@ 2021-02-04 14:03 Song Yoong Siang
  2021-02-05  1:08 ` Jesse Brandeburg
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Song Yoong Siang @ 2021-02-04 14:03 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Ong Boon Leong, Voon Wei Feng, Wong Vee Khee, Song Yoong Siang,
	Gomes Vinicius

From: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>

When disable CBS, mode_to_use parameter is not updated even the operation
mode of Tx Queue is changed to Data Centre Bridging (DCB). Therefore,
when tc_setup_cbs() function is called to re-enable CBS, the operation
mode of Tx Queue remains at DCB, which causing CBS fails to work.

This patch updates the value of mode_to_use parameter to MTL_QUEUE_DCB
after operation mode of Tx Queue is changed to DCB in stmmac_dma_qmode()
callback function.

Fixes: 1f705bc61aee ("net: stmmac: Add support for CBS QDISC")
Suggested-by: Gomes, Vinicius <vinicius.gomes@intel.com>
Signed-off-by: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
Signed-off-by: Song, Yoong Siang <yoong.siang.song@intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
index 8ed3b2c..5698554 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
@@ -324,7 +324,12 @@ static int tc_setup_cbs(struct stmmac_priv *priv,
 
 		priv->plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_AVB;
 	} else if (!qopt->enable) {
-		return stmmac_dma_qmode(priv, priv->ioaddr, queue, MTL_QUEUE_DCB);
+		ret = stmmac_dma_qmode(priv, priv->ioaddr, queue,
+				       MTL_QUEUE_DCB);
+		if (ret)
+			return ret;
+
+		priv->plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB;
 	}
 
 	/* Port Transmit Rate and Speed Divider */
-- 
2.7.4


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

* Re: [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS
  2021-02-04 14:03 [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS Song Yoong Siang
@ 2021-02-05  1:08 ` Jesse Brandeburg
  2021-02-05 22:38 ` Vinicius Costa Gomes
  2021-02-06  4:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Jesse Brandeburg @ 2021-02-05  1:08 UTC (permalink / raw)
  To: Song Yoong Siang
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel, Ong Boon Leong,
	Voon Wei Feng, Wong Vee Khee, Gomes Vinicius

Song Yoong Siang wrote:

> From: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
> 
> When disable CBS, mode_to_use parameter is not updated even the operation
> mode of Tx Queue is changed to Data Centre Bridging (DCB). Therefore,
> when tc_setup_cbs() function is called to re-enable CBS, the operation
> mode of Tx Queue remains at DCB, which causing CBS fails to work.
> 
> This patch updates the value of mode_to_use parameter to MTL_QUEUE_DCB
> after operation mode of Tx Queue is changed to DCB in stmmac_dma_qmode()
> callback function.
> 
> Fixes: 1f705bc61aee ("net: stmmac: Add support for CBS QDISC")
> Suggested-by: Gomes, Vinicius <vinicius.gomes@intel.com>
> Signed-off-by: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
> Signed-off-by: Song, Yoong Siang <yoong.siang.song@intel.com>

Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>

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

* Re: [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS
  2021-02-04 14:03 [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS Song Yoong Siang
  2021-02-05  1:08 ` Jesse Brandeburg
@ 2021-02-05 22:38 ` Vinicius Costa Gomes
  2021-02-06  4:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Vinicius Costa Gomes @ 2021-02-05 22:38 UTC (permalink / raw)
  To: Song Yoong Siang, Giuseppe Cavallaro, Alexandre Torgue,
	Jose Abreu, David S . Miller, Jakub Kicinski, Maxime Coquelin
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Ong Boon Leong, Voon Wei Feng, Wong Vee Khee, Song Yoong Siang

Song Yoong Siang <yoong.siang.song@intel.com> writes:

> From: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
>
> When disable CBS, mode_to_use parameter is not updated even the operation
> mode of Tx Queue is changed to Data Centre Bridging (DCB). Therefore,
> when tc_setup_cbs() function is called to re-enable CBS, the operation
> mode of Tx Queue remains at DCB, which causing CBS fails to work.
>
> This patch updates the value of mode_to_use parameter to MTL_QUEUE_DCB
> after operation mode of Tx Queue is changed to DCB in stmmac_dma_qmode()
> callback function.
>
> Fixes: 1f705bc61aee ("net: stmmac: Add support for CBS QDISC")
> Suggested-by: Gomes, Vinicius <vinicius.gomes@intel.com>

Just a nitpick/formality, I would prefer if you used:

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

> Signed-off-by: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
> Signed-off-by: Song, Yoong Siang <yoong.siang.song@intel.com>

Patch looks good.

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

Cheers,
-- 
Vinicius

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

* Re: [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS
  2021-02-04 14:03 [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS Song Yoong Siang
  2021-02-05  1:08 ` Jesse Brandeburg
  2021-02-05 22:38 ` Vinicius Costa Gomes
@ 2021-02-06  4:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-06  4:10 UTC (permalink / raw)
  To: Song Yoong Siang
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, kuba,
	mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel, boon.leong.ong, weifeng.voon, vee.khee.wong,
	vinicius.gomes

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Thu,  4 Feb 2021 22:03:16 +0800 you wrote:
> From: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
> 
> When disable CBS, mode_to_use parameter is not updated even the operation
> mode of Tx Queue is changed to Data Centre Bridging (DCB). Therefore,
> when tc_setup_cbs() function is called to re-enable CBS, the operation
> mode of Tx Queue remains at DCB, which causing CBS fails to work.
> 
> [...]

Here is the summary with links:
  - [net,1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS
    https://git.kernel.org/netdev/net/c/f317e2ea8c88

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-02-06  4:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 14:03 [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS Song Yoong Siang
2021-02-05  1:08 ` Jesse Brandeburg
2021-02-05 22:38 ` Vinicius Costa Gomes
2021-02-06  4:10 ` patchwork-bot+netdevbpf

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).