From: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>,
Russell King <linux@armlinux.org.uk>,
Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Alexander Duyck <alexander.duyck@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] dsa: marvell: Provide per device information about max frame size
Date: Fri, 10 Mar 2023 17:12:12 +0100 [thread overview]
Message-ID: <2ed80772-feed-40ac-b0ac-612227558d08@lunn.ch> (raw)
In-Reply-To: <20230310154511.yqf3ykknnwe22b77@skbuf>
On Fri, Mar 10, 2023 at 05:45:11PM +0200, Vladimir Oltean wrote:
> On Fri, Mar 10, 2023 at 02:17:19PM +0100, Lukasz Majewski wrote:
> > This is the "patch 4" in the comment sent by Russel (to fix stuff which
> > is already broken, but it has been visible after running the validation
> > code):
> >
> > https://lists.openwall.net/netdev/2023/03/09/233
>
> Ok, so nope, what I was talking about here (MTU 1492) is *not* what you
> have discussed with Russell in patch 4.
>
> What I was talking about is this:
> https://patchwork.kernel.org/project/netdevbpf/patch/20230309125421.3900962-2-lukma@denx.de/#25245979
> and Russell now seems to agree with me that it should be addressed
> separately, and prior to the extra development work done here.
>
> It looks like it will also need a bit of assistance from Andrew to
> untangle whether EDSA_HLEN should be included in the max_mtu calculations
> for some switch families only, rather than for all.
That is hard to say. From other peoples experiments, it seems like
some families don't impose the frame length check on DSA and CPU
ports. Hence they accept frames with DSA or EDSA headers, even if that
puts them over the theoretical port max. Other families do seem to
perform check on DSA and CPU ports. I don't think the datasheets say
anything about this.
The safe thing to do is:
Assume all switches can accept the standard minimum MTU + DSA/EDSA
headers on their CPU ports.
For those switches which accept frames bigger than the standard,
assume the DSA/EDSA header is counted as part of the limit, and so
adjust the calculation.
This might short change a few switches 4/8 bytes, but that is better
than being broken because frames are dropped.
Andrew
next prev parent reply other threads:[~2023-03-10 16:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 12:54 [PATCH 0/7] dsa: marvell: Add support for mv88e6071 and 6020 switches Lukasz Majewski
2023-03-09 12:54 ` [PATCH 1/7] dsa: marvell: Provide per device information about max frame size Lukasz Majewski
2023-03-10 12:02 ` Vladimir Oltean
2023-03-10 12:25 ` Russell King (Oracle)
2023-03-10 13:04 ` Vladimir Oltean
2023-03-10 13:06 ` Vladimir Oltean
2023-03-10 13:17 ` Lukasz Majewski
2023-03-10 13:36 ` Vladimir Oltean
2023-03-10 14:10 ` Lukasz Majewski
2023-03-10 15:45 ` Vladimir Oltean
2023-03-10 16:12 ` Andrew Lunn [this message]
2023-03-12 15:55 ` Lukasz Majewski
2023-03-13 15:01 ` Vladimir Oltean
2023-03-10 14:04 ` Russell King (Oracle)
2023-03-09 12:54 ` [PATCH 2/7] net: dsa: mv88e6xxx: add support for MV88E6020 switch Lukasz Majewski
2023-03-10 14:23 ` Vladimir Oltean
2023-03-09 12:54 ` [PATCH 3/7] net: dsa: mv88e6xxx: add support for MV88E6071 switch Lukasz Majewski
2023-03-09 12:54 ` [PATCH 4/7] dsa: marvell: Define .set_max_frame_size() function for mv88e6250 SoC family Lukasz Majewski
2023-03-09 12:54 ` [PATCH 5/7] dsa: marvell: Add helper function to validate the max_frame_size variable Lukasz Majewski
2023-03-09 13:21 ` Russell King (Oracle)
2023-03-09 13:26 ` Russell King (Oracle)
2023-03-09 13:47 ` Lukasz Majewski
2023-03-09 13:52 ` Vladimir Oltean
2023-03-09 13:57 ` Lukasz Majewski
2023-03-09 12:54 ` [PATCH 6/7] dsa: marvell: Correct value of max_frame_size variable after validation Lukasz Majewski
2023-03-09 14:05 ` Russell King (Oracle)
2023-03-09 14:43 ` Lukasz Majewski
2023-03-09 15:31 ` Russell King (Oracle)
2023-03-10 9:47 ` Lukasz Majewski
2023-03-09 15:42 ` Andrew Lunn
2023-03-10 11:53 ` Lukasz Majewski
2023-03-10 12:06 ` Russell King (Oracle)
2023-03-10 13:19 ` Lukasz Majewski
2023-03-10 15:25 ` Vladimir Oltean
2023-03-09 12:54 ` [PATCH 7/7] dsa: marvell: Modify get max MTU callback to use per switch provided value Lukasz Majewski
2023-04-03 11:55 ` [PATCH 0/7] dsa: marvell: Add support for mv88e6071 and 6020 switches Vladimir Oltean
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=2ed80772-feed-40ac-b0ac-612227558d08@lunn.ch \
--to=andrew@lunn.ch \
--cc=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lukma@denx.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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®