netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: stmmac: fix cbs configuration
@ 2017-03-31 13:22 Joao Pinto
  0 siblings, 0 replies; 2+ messages in thread
From: Joao Pinto @ 2017-03-31 13:22 UTC (permalink / raw)
  To: davem; +Cc: niklas.cassel, netdev, Joao Pinto

Sending again, because forgot to include net-dev.

The QoS IP does not accept AVB capabilities to default/queue 0, this way we
guarantee 75% bandwidth for AVB. This patch assures that only queues >= 1
gets CBS confgured. Additional info was also added to stmmac.txt.

Reported-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: Joao Pinto <jpinto@synopsys.com>
---
 Documentation/devicetree/bindings/net/stmmac.txt  | 2 ++
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
index 784d988..f652b0c 100644
--- a/Documentation/devicetree/bindings/net/stmmac.txt
+++ b/Documentation/devicetree/bindings/net/stmmac.txt
@@ -103,6 +103,8 @@ Optional properties:
 		- Choose one of these modes:
 			- snps,dcb-algorithm: TX queue will be working in DCB
 			- snps,avb-algorithm: TX queue will be working in AVB
+			  [Attention] Queue 0 is reserved for legacy traffic
+			  and so no AVB is available in this queue.
 		- Configure Credit Base Shaper (if AVB Mode selected):
 			- snps,send_slope: enable Low Power Interface
 			- snps,idle_slope: unlock on WoL
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 43361f3..c1c6319 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1880,7 +1880,8 @@ static void stmmac_configure_cbs(struct stmmac_priv *priv)
 	u32 mode_to_use;
 	u32 queue;
 
-	for (queue = 0; queue < tx_queues_count; queue++) {
+	/* queue 0 is reserved for legacy traffic */
+	for (queue = 1; queue < tx_queues_count; queue++) {
 		mode_to_use = priv->plat->tx_queues_cfg[queue].mode_to_use;
 		if (mode_to_use == MTL_QUEUE_DCB)
 			continue;
-- 
2.9.3

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

* Re: [PATCH] net: stmmac: fix cbs configuration
       [not found] <fba7548363a0a3300bdc28679da8bd7bae91b24e.1490959712.git.jpinto@synopsys.com>
@ 2017-04-03  2:30 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-04-03  2:30 UTC (permalink / raw)
  To: Joao.Pinto; +Cc: niklas.cassel, netdev

From: Joao Pinto <Joao.Pinto@synopsys.com>
Date: Fri, 31 Mar 2017 14:22:02 +0100

> Sending again, because forgot to include net-dev.
> 
> The QoS IP does not accept AVB capabilities to default/queue 0, this way we
> guarantee 75% bandwidth for AVB. This patch assures that only queues >= 1
> gets CBS confgured. Additional info was also added to stmmac.txt.
> 
> Reported-by: Niklas Cassel <niklas.cassel@axis.com>
> Signed-off-by: Joao Pinto <jpinto@synopsys.com>

Applied, thanks.

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

end of thread, other threads:[~2017-04-03  2:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <fba7548363a0a3300bdc28679da8bd7bae91b24e.1490959712.git.jpinto@synopsys.com>
2017-04-03  2:30 ` [PATCH] net: stmmac: fix cbs configuration David Miller
2017-03-31 13:22 Joao Pinto

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