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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 25 Feb 2022 12:47:40 +0100
From:   Oleksij Rempel <o.rempel@...gutronix.de>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     Woojung Huh <woojung.huh@...rochip.com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Vivien Didelot <vivien.didelot@...il.com>,
        kernel@...gutronix.de, Jakub Kicinski <kuba@...nel.org>,
        UNGLinuxDriver@...rochip.com,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next v2 1/1] net: dsa: microchip: ksz9477: implement
 MTU configuration

On Thu, Feb 24, 2022 at 11:46:57AM +0200, Vladimir Oltean wrote:
 
> So where is it failing exactly? Here I guess, because mtu_limit will be
> negative?
> 
> 	mtu_limit = min_t(int, master->max_mtu, dev->max_mtu);
> 	old_master_mtu = master->mtu;
> 	new_master_mtu = largest_mtu + dsa_tag_protocol_overhead(cpu_dp->tag_ops);
> 	if (new_master_mtu > mtu_limit)
> 		return -ERANGE;
> 
> I don't think we can work around it in DSA, it's garbage in, garbage out.
> 
> In principle, I don't have such a big issue with writing the MTU
> register as part of the switch initialization, especially if it's global
> and not per port. But tell me something else. You pre-program the MTU
> with VLAN_ETH_FRAME_LEN + ETH_FCS_LEN, but in the MTU change procedure,
> you also add KSZ9477_INGRESS_TAG_LEN (2) to that. Is that needed at all?
> I expect that if it's needed, it's needed in both places. Can you
> sustain an iperf3 tcp session over a VLAN upper of a ksz9477 port?
> I suspect that the missing VLAN_HLEN is masking a lack of KSZ9477_INGRESS_TAG_LEN.

Hm... I assume I need to do something like this:
- build kernel with BRIDGE_VLAN_FILTERING
- |
  ip l a name br0 type bridge vlan_filtering 1
  ip l s dev br0 up
  ip l s lan1 master br0
  ip l s dev lan1 up
  bridge vlan add dev lan1 vid 5 pvid untagged
  ip link add link br0 name vlan5 type vlan id 5

I use lan5@ksz for net boot. As soon as i link lan1@ksz to the br0 with
vlan_filtering enabled, the nfs on lan5 will be broken. Currently I have
no time to investigate it. I'll try to fix VLAN support in a separate
task. What will is acceptable way to proceed with MTU patch?

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists