mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Woojung Huh <woojung.huh@microchip.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vivien Didelot <vivien.didelot@gmail.com>,
	kernel@pengutronix.de, Jakub Kicinski <kuba@kernel.org>,
	UNGLinuxDriver@microchip.com,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next v2 1/1] net: dsa: microchip: ksz9477: implement MTU configuration
Date: Fri, 25 Feb 2022 13:54:30 +0100	[thread overview]
Message-ID: <20220225125430.GB27407@pengutronix.de> (raw)
In-Reply-To: <20220225115802.bvjd54cwwk6hjyfa@skbuf>

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 |

  reply	other threads:[~2022-02-25 12:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23  8:40 Oleksij Rempel
2022-02-23 23:38 ` Vladimir Oltean
2022-02-24  4:59   ` Oleksij Rempel
2022-02-24  9:33     ` Vladimir Oltean
2022-02-24  9:38       ` Oleksij Rempel
2022-02-24  9:46         ` Vladimir Oltean
2022-02-25 11:47           ` Oleksij Rempel
2022-02-25 11:58             ` Vladimir Oltean
2022-02-25 12:54               ` Oleksij Rempel [this message]
2022-02-25 16:35                 ` Vladimir Oltean
2022-03-08 10:06                   ` Oleksij Rempel
2022-03-08 11:21                     ` Vladimir Oltean
2022-03-08 11:59                       ` Oleksij Rempel

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=20220225125430.GB27407@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    --cc=woojung.huh@microchip.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

all inboxes | Powered by JetHome®