netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Michael Walle <michael@walle.cc>
Cc: xiaoliang.yang_1@nxp.com, Arvid.Brodin@xdin.com,
	UNGLinuxDriver@microchip.com, alexandre.belloni@bootlin.com,
	allan.nielsen@microchip.com, andre.guedes@linux.intel.com,
	claudiu.manoil@nxp.com, colin.king@canonical.com,
	davem@davemloft.net, idosch@mellanox.com,
	ivan.khoronzhuk@linaro.org, jiri@mellanox.com,
	joergen.andreasen@microchip.com, leoyang.li@nxp.com,
	linux-kernel@vger.kernel.org, m-karicheri2@ti.com,
	michael.chan@broadcom.com, mingkai.hu@nxp.com,
	netdev@vger.kernel.org, po.liu@nxp.com, saeedm@mellanox.com,
	vinicius.gomes@intel.com, vladimir.oltean@nxp.com,
	yuehaibing@huawei.com
Subject: Re: [net-next] net: dsa: felix: disable always guard band bit for TAS config
Date: Tue, 4 May 2021 21:18:33 +0300	[thread overview]
Message-ID: <20210504181833.w2pecbp2qpuiactv@skbuf> (raw)
In-Reply-To: <20210504170514.10729-1-michael@walle.cc>

Hi Michael,

On Tue, May 04, 2021 at 07:05:14PM +0200, Michael Walle wrote:
> Hi,
> 
> > 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.
> 
> 
> As explained in another mail in this thread, all queues are marked as
> scheduled. So this is actually a no-op, correct? It doesn't matter if
> it set or not set for now. Dunno why we even care for this bit then.

It matters because ALWAYS_GUARD_BAND_SCH_Q reduces the available throughput when set.

> > 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);
> 
> Anyway, I don't think this the correct place for this:
>  (1) it isn't per port, but a global bit, but here its done per port.

I don't understand. According to the documentation, selecting the port
whose time-aware shaper you are configuring is done through
QSYS::TAS_PARAM_CFG_CTRL.PORT_NUM.

>  (2) rmw, I presume is read-modify-write. and there is one bit CONFIG_CHAGE
>      which is set by software and cleared by hardware. What happens if it
> 	 will be cleared right after we read it. Then it will be set again, no?
> 
> So if we really care about this bit, shouldn't this be moved to switch
> initialization then?

May I know what drew your attention to this patch? Is there something wrong?

  reply	other threads:[~2021-05-04 18:18 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210504181833.w2pecbp2qpuiactv@skbuf \
    --to=olteanv@gmail.com \
    --cc=Arvid.Brodin@xdin.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=allan.nielsen@microchip.com \
    --cc=andre.guedes@linux.intel.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=jiri@mellanox.com \
    --cc=joergen.andreasen@microchip.com \
    --cc=leoyang.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=michael.chan@broadcom.com \
    --cc=michael@walle.cc \
    --cc=mingkai.hu@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=po.liu@nxp.com \
    --cc=saeedm@mellanox.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiaoliang.yang_1@nxp.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).