linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	UNGLinuxDriver@microchip.com, alexandre.belloni@bootlin.com,
	allan.nielsen@microchip.com,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	davem@davemloft.net, idosch@mellanox.com,
	joergen.andreasen@microchip.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Po Liu <po.liu@nxp.com>,
	vinicius.gomes@intel.com
Subject: Re: [EXT] Re: [net-next] net: dsa: felix: disable always guard band bit for TAS config
Date: Wed, 09 Jun 2021 10:41:55 +0200	[thread overview]
Message-ID: <32f1854fdc0fda86627371bb82f2c873@walle.cc> (raw)
In-Reply-To: <DB8PR04MB5785C5BDBDD51401362563D6F0369@DB8PR04MB5785.eurprd04.prod.outlook.com>

Am 2021-06-09 10:06, schrieb Xiaoliang Yang:
> On 2021-06-07 19:26, Michael Walle wrote:
>> 
>> Hi Vladimir, Hi Xiaoliang,
>> 
>> Am 2021-05-07 14:19, schrieb Vladimir Oltean:
>> > Devices like Felix need the per-queue max SDU from the user - if that
>> > isn's specified in the netlink message they'll have to default to the
>> > interface's MTU.
>> 
>> Btw. just to let you and Xiaoliang know:
>> 
>> It appears that PORT_MAX_SDU isn't working as expected. It is used as 
>> a
>> fallback if QMAXSDU_CFG_n isn't set for the guard band calculation. 
>> But it
>> appears to be _not_ used for discarding any frames. E.g. if you set
>> PORT_MAX_SDU to 500 the port will still happily send frames larger 
>> than 500
>> bytes. (Unless of course you hit the guard band of 500 bytes). OTOH
>> QMAXSDU_CFG_n works as expected, it will discard oversized frames - 
>> and
>> presumly will set the guard band accordingly, I haven't tested this 
>> explicitly.
>> 
>> Thus, I wonder what sense PORT_MAX_SDU makes at all. If you set the 
>> guard
>> band to a smaller value than the MTU, you'll also need to make sure, 
>> there will
>> be no larger frames scheduled on that port.
>> 
>> In any case, the workaround is to set QMAXSDU_CFG_n (for all
>> n=0..7) to the desired max_sdu value instead of using PORT_MAX_SDU.
>> 
>> It might also make sense to check with the IP supplier.
>> 
>> In the case anyone wants to implement that for (upstream) linux ;)
>> 
>> -michael
> 
> Yes, PORT_MAX_SDU is only used for guard band calculation. DEV_GMII:
> MAC_MAXLEN_CFG
> limited the frame length accepted by the MAC.

But MAC_MAXLEN_CFG is for ingress handling while you want egress 
handling,
for example think two ingress ports sending to one egress port. The
limitation is on the egress side. Or two queues with different guard
bands/maxsdu settings.

> I am worried that
> QMAXSDU is not a universal
> setting, it may just be set on Felix, so there is no suitable place to
> add this configuration.

I can't follow you here. I'm talkling about felix and its quirks. Eg. 
the
static guard band handling there, the reason why we need the maxsdu
setting in the first place.

Or do you think about how to communicate that setting from user space to
the kernel? In this case, I'd say we'll need some kind of parameter for
this kind of devices which doesn't have a dynamic guard band mechanism.
Felix won't be the only one.

-michael

  reply	other threads:[~2021-06-09  8:42 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
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 [this message]
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=32f1854fdc0fda86627371bb82f2c873@walle.cc \
    --to=michael@walle.cc \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=allan.nielsen@microchip.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=joergen.andreasen@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=po.liu@nxp.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiaoliang.yang_1@nxp.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).