[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221027185447.kd6sqvf4xrdxis56@skbuf>
Date: Thu, 27 Oct 2022 21:54:47 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Sergei Antonov <saproj@...il.com>
Cc: netdev@...r.kernel.org, andrew@...n.ch, pabeni@...hat.com,
kuba@...nel.org, edumazet@...gle.com, davem@...emloft.net
Subject: Re: [PATCH v5 net-next] net: ftmac100: support mtu > 1500
On Thu, Oct 27, 2022 at 07:59:11PM +0300, Sergei Antonov wrote:
> On Thu, 27 Oct 2022 at 14:35, Vladimir Oltean <olteanv@...il.com> wrote:
> > Does the attached series of 3 patches work for you? I only compile
> > tested them.
>
> I have tested your patches. They fix the problem I have. If they can
> make it into mainline Linux - great. Thanks for your help!
Do you mind submitting these patches yourself, to get a better
understanding of the process? You only need to make sure that you
preserve the "From:" field (the authorship), and that below the existing
Signed-off-by line, you also add yours (to make it clear that the
patches authored by me were not submitted by me). Like this:
| From: Vladimir Oltean <vladimir.oltean@....com>
|
| bla bla
|
| Signed-off-by: Vladimir Oltean <vladimir.oltean@....com> <- same as author
| Signed-off-by: Sergei Antonov <saproj@...il.com> <- patch carried by X
| ...etc
| when patch is merged, the netdev maintainer adds his own sign off at
| the end to indicate that the patch went through his own hands
I would do the same if I was the one submitting the series; I would add
my sign-off to patch 3/3, which has your authorship.
> A remark on 0002-net-ftmac100-report-the-correct-maximum-MTU-of-1500.patch:
> I can not make a case for VLAN_ETH_HLEN because it includes 4 bytes
> from a switch and ftmac100 is not always used with a switch.
Why do you think that? What VLAN are you talking about? 802.1Q or
802.1ad? What VLAN ID? Where does it come from, where do you see it?
VLAN_ETH_HLEN in patch 2 has nothing to do with a switch. I tried to
preserve the functionality of the driver as best I could. It accepts
skb->len on TX up to 1518, and it drops in hardware packets with a
skb->len larger than 1514 on RX (this includes L2 header, and is
measured before the eth_type_trans() call; the latter consumes ETH_HLEN
bytes and thus, skb->len becomes 1500).
A VLAN in the real sense (ip link add link eth0 name eth0.100 type vlan id 100)
does not increase the MTU of eth0 specifically because the 802.1Q header
is part of the L2 overhead, and not part of the L2 payload. So this is
why drivers could have a valid reason to subtract the VLAN header length
from the maximum packet size (which is total L2 length).
There's no way, really, to reconcile the fact that the driver can
transmit VLAN-tagged frames with an L2 payload length of 1500 bytes but
it cannot receive them (or at least I think that it can't, based on what
you said; maybe the hardware is smart and makes an exception for the
VLAN header on RX, letting packets with a size of up to 1522 bytes
length + CRC to be accepted?). In any case, 1500 is the MTU value that
the driver supports as of patch 2 (given the definition of MTU as L2
payload length) and I wanted to make that absolutely clear by bringing
in sync what is reported with what is supported, prior to making any
other change to the max_mtu.
Powered by blists - more mailing lists