Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp334900pxm; Fri, 25 Feb 2022 08:53:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0ZFPBVaG7kJNN10LHCdUVbRQ+bh/dPC9ZTApnHQxbCiSZT0QGvsxBK1ZT7pFCgZRKyy3l X-Received: by 2002:a17:902:7fc5:b0:14f:f08b:599a with SMTP id t5-20020a1709027fc500b0014ff08b599amr8499058plb.78.1645808012343; Fri, 25 Feb 2022 08:53:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645808012; cv=none; d=google.com; s=arc-20160816; b=aCrEx9G90KWxfo5YpRk5FbOoplKZXPBlnoVE0YJwUfOOs6fPniZhpxS1+wG4Z2OGqG dX1gVeJ4UYWOaseVNkbURIPrc+AmptO1yKm2EKiBtxzUjNM3V0pRIn9LSuRBrtMeBy8Y 656ozhd0GSDPyrRN1p+EPrSYjQi70MfiLs/fy8y7S76yRftj5t8kmlBozG0AFLuI/AQa EjfE/0teCD76ylBPe5qqiNCeYwPUfuOF22artWpX6HBSgwUWqy2NdTaT1z3ppfHAFNWJ r2QKxaQhcuRu75DTMFM7y/LaVMUioCeETaxgQhfltwYTYHMybux0UGnvCJP7eIF2Xlih wkKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CmIAz9yOyHjkawVxShUQgzygaxSLawrWYb1XRlxnbh4=; b=YQlrsrQa/IslNiGB1Tw1PvnUF/JLBQUdH2PlCnsJ2P/bku0Vo60WKvuiC9sWDFQjVb Fo/i/i0C9cx1c1+ihalp68YGOE2+RoSXR7+D4+fCFMH6jpovqXouAQhoehODNty7BA1o 4DSisZms7GsUQkXsSgeIkgZwRTP7nCTjlXu2rp+5sR3dBn7rYPmYna3WDT22I8aRJLLj pbvKuWimV1Af1TxsKOVvhl+XJsQfm6F316xdfns/5YAXgFn/pcaQVO7G3yI1RkAn7yx0 qoIZqk1J1JaOAopyYZqcpnCyoW7iLhWCx9WI5NVQBDqlv25YmzJt9f2X6lU5lHZAF92a /TMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l5-20020a656805000000b0036c238deae2si2296819pgt.80.2022.02.25.08.53.16; Fri, 25 Feb 2022 08:53:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229812AbiBYMzK (ORCPT + 99 others); Fri, 25 Feb 2022 07:55:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235676AbiBYMzI (ORCPT ); Fri, 25 Feb 2022 07:55:08 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7C2C21D084 for ; Fri, 25 Feb 2022 04:54:33 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nNa7D-0008N1-I1; Fri, 25 Feb 2022 13:54:31 +0100 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1nNa7C-0007ew-BD; Fri, 25 Feb 2022 13:54:30 +0100 Date: Fri, 25 Feb 2022 13:54:30 +0100 From: Oleksij Rempel To: Vladimir Oltean Cc: Woojung Huh , Andrew Lunn , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vivien Didelot , kernel@pengutronix.de, Jakub Kicinski , UNGLinuxDriver@microchip.com, "David S. Miller" Subject: Re: [PATCH net-next v2 1/1] net: dsa: microchip: ksz9477: implement MTU configuration Message-ID: <20220225125430.GB27407@pengutronix.de> References: <20220223084055.2719969-1-o.rempel@pengutronix.de> <20220223233833.mjknw5ko7hpxj3go@skbuf> <20220224045936.GB4594@pengutronix.de> <20220224093329.hssghouq7hmgxvwb@skbuf> <20220224093827.GC4594@pengutronix.de> <20220224094657.jzhvi67ryhuipor4@skbuf> <20220225114740.GA27407@pengutronix.de> <20220225115802.bvjd54cwwk6hjyfa@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220225115802.bvjd54cwwk6hjyfa@skbuf> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 13:01:41 up 76 days, 20:47, 89 users, load average: 0.73, 0.65, 0.38 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 25, 2022 at 01:58:02PM +0200, Vladimir Oltean wrote: > On Fri, Feb 25, 2022 at 12:47:40PM +0100, Oleksij Rempel wrote: > > 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? > > No bridge, why create a bridge? And even if you do, why add lan5 to it? > The expectation is that standalone ports still remain functional when > other ports join a bridge. No, lan5 is not added to the bridge, but stops functioning after creating br with lan1 or any other lanX > I was saying: > > ip link set lan1 up > ip link add link lan1 name lan1.5 type vlan id 5 > ip addr add 172.17.0.2/24 dev lan1.5 && ip link set lan1.5 up > iperf3 -c 172.17.0.10 It works. 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 |