lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 14 Apr 2020 12:38:06 +0300 From: Vladimir Oltean <olteanv@...il.com> To: DENG Qingfang <dqfext@...il.com> Cc: Florian Fainelli <f.fainelli@...il.com>, David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>, René van Dorst <opensource@...rst.com>, John Crispin <john@...ozen.org>, Vivien Didelot <vivien.didelot@...il.com>, Andrew Lunn <andrew@...n.ch>, Sean Wang <sean.wang@...iatek.com>, Weijie Gao <weijie.gao@...iatek.com>, "moderated list:ARM/Mediatek SoC support" <linux-mediatek@...ts.infradead.org> Subject: Re: [PATCH net-next] net: dsa: mt7530: enable jumbo frame On Tue, 14 Apr 2020 at 06:03, DENG Qingfang <dqfext@...il.com> wrote: > > On Fri, Apr 10, 2020 at 6:46 PM Vladimir Oltean <olteanv@...il.com> wrote: > > > > Hi Qingfang, > > > > On Fri, 10 Apr 2020 at 05:51, DENG Qingfang <dqfext@...il.com> wrote: > > > > > > On Fri, Apr 10, 2020 at 10:27 AM Florian Fainelli <f.fainelli@...il.com> wrote: > > > > > > > > > > > > > > > > On 4/9/2020 7:19 PM, DENG Qingfang wrote: > > > > > So, since nothing else uses the mt7530_set_jumbo function, should I > > > > > remove the function and just add a single rmw to mt7530_setup? > > > > > > > > (please do not top-post on netdev) > > > > > > > > There is a proper way to support the MTU configuration for DSA switch > > > > drivers which is: > > > > > > > > /* > > > > * MTU change functionality. Switches can also adjust their MRU > > > > through > > > > * this method. By MTU, one understands the SDU (L2 payload) length. > > > > * If the switch needs to account for the DSA tag on the CPU > > > > port, this > > > > * method needs to to do so privately. > > > > */ > > > > int (*port_change_mtu)(struct dsa_switch *ds, int port, > > > > int new_mtu); > > > > int (*port_max_mtu)(struct dsa_switch *ds, int port); > > > > > > MT7530 does not support configuring jumbo frame per-port > > > The register affects globally > > > > > > > > > > > -- > > > > Florian > > > > This is a bit more tricky, but I think you can still deal with it > > using the port_change_mtu functionality. Basically it is only a > > problem when the other ports are standalone - otherwise the > > dsa_bridge_mtu_normalization function should kick in. > > So if you implement port_change_mtu, you should do something along the lines of: > > > > for (i = 0; i < MT7530_NUM_PORTS; i++) { > > struct net_device *slave; > > > > if (!dsa_is_user_port(ds, i)) > > continue; > > > > slave = ds->ports[i].slave; > > > > slave->mtu = new_mtu; > > } > > > > to update the MTU known by the stack for all net devices. > Should we warn users that all ports will be affected? > > > > Hope this helps, > > -Vladimir Unless I'm missing something, all ports are affected anyway, so changing the MTU _is_ informing users that all switch ports are affected. Thanks, -Vladimir
Powered by blists - more mailing lists