netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next] net: dsa: felix: disable always guard band bit for TAS config
@ 2021-04-19 10:25 Xiaoliang Yang
  2021-04-19 12:38 ` Vladimir Oltean
                   ` (3 more replies)
  0 siblings, 4 replies; 33+ messages in thread
From: Xiaoliang Yang @ 2021-04-19 10:25 UTC (permalink / raw)
  To: davem, netdev, linux-kernel
  Cc: xiaoliang.yang_1, Arvid.Brodin, m-karicheri2, vinicius.gomes,
	michael.chan, vishal, saeedm, jiri, idosch, alexandre.belloni,
	UNGLinuxDriver, ivan.khoronzhuk, andre.guedes, yuehaibing,
	allan.nielsen, joergen.andreasen, colin.king, po.liu, mingkai.hu,
	claudiu.manoil, vladimir.oltean, leoyang.li

ALWAYS_GUARD_BAND_SCH_Q bit in TAS config register is descripted as
this:
	0: Guard band is implemented for nonschedule queues to schedule
	   queues transition.
	1: Guard band is implemented for any queue to schedule queue
	   transition.

The driver set guard band be implemented for any queue to schedule queue
transition before, which will make each GCL time slot reserve a guard
band time that can pass the max SDU frame. Because guard band time could
not be set in tc-taprio now, it will use about 12000ns to pass 1500B max
SDU. This limits each GCL time interval to be more than 12000ns.

This patch change the guard band to be only implemented for nonschedule
queues to schedule queues transition, so that there is no need to reserve
guard band on each GCL. Users can manually add guard band time for each
schedule queues in their configuration if they want.

Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
---
 drivers/net/dsa/ocelot/felix_vsc9959.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index 789fe08cae50..2473bebe48e6 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -1227,8 +1227,12 @@ static int vsc9959_qos_port_tas_set(struct ocelot *ocelot, int port,
 	if (taprio->num_entries > VSC9959_TAS_GCL_ENTRY_MAX)
 		return -ERANGE;
 
-	ocelot_rmw(ocelot, QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM(port) |
-		   QSYS_TAS_PARAM_CFG_CTRL_ALWAYS_GUARD_BAND_SCH_Q,
+	/* Set port num and disable ALWAYS_GUARD_BAND_SCH_Q, which means set
+	 * guard band to be implemented for nonschedule queues to schedule
+	 * queues transition.
+	 */
+	ocelot_rmw(ocelot,
+		   QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM(port),
 		   QSYS_TAS_PARAM_CFG_CTRL_PORT_NUM_M |
 		   QSYS_TAS_PARAM_CFG_CTRL_ALWAYS_GUARD_BAND_SCH_Q,
 		   QSYS_TAS_PARAM_CFG_CTRL);
-- 
2.17.1


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

end of thread, other threads:[~2021-06-09  8:42 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 10:25 [net-next] net: dsa: felix: disable always guard band bit for TAS config Xiaoliang Yang
2021-04-19 12:38 ` Vladimir Oltean
2021-04-20  3:06   ` [EXT] " Xiaoliang Yang
2021-04-20  8:26     ` Vladimir Oltean
2021-04-20 10:28       ` Xiaoliang Yang
2021-04-20 10:30         ` Vladimir Oltean
2021-04-20 10:42           ` Vladimir Oltean
2021-04-21  2:51             ` Xiaoliang Yang
2021-04-20 10:33 ` Vladimir Oltean
2021-04-20 23:20 ` patchwork-bot+netdevbpf
2021-05-04 17:05 ` Michael Walle
2021-05-04 18:18   ` Vladimir Oltean
2021-05-04 18:38     ` Michael Walle
2021-05-04 18:50       ` Vladimir Oltean
2021-05-04 19:08         ` Michael Walle
2021-05-04 19:17           ` Vladimir Oltean
2021-05-04 20:23             ` Michael Walle
2021-05-04 21:33               ` Vladimir Oltean
2021-05-06 13:25                 ` Michael Walle
2021-05-06 13:50                   ` Vladimir Oltean
2021-05-06 14:20                     ` Michael Walle
2021-05-06 14:41                     ` Michael Walle
2021-05-06 15:07                       ` Vladimir Oltean
2021-05-06 18:28                         ` Michael Walle
2021-05-07  7:16                   ` [EXT] " Xiaoliang Yang
2021-05-07  7:35                     ` Michael Walle
2021-05-07 11:09                       ` Xiaoliang Yang
2021-05-07 12:19                         ` Vladimir Oltean
2021-05-07 12:43                           ` Michael Walle
2021-06-07 11:26                           ` Michael Walle
2021-06-09  8:06                             ` [EXT] " Xiaoliang Yang
2021-06-09  8:41                               ` Michael Walle
2021-05-07 12:19                         ` Michael Walle

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