All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Antonov <saproj@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch, pabeni@redhat.com,
	kuba@kernel.org, edumazet@google.com, davem@davemloft.net
Subject: Re: [PATCH v5 net-next] net: ftmac100: support mtu > 1500
Date: Thu, 27 Oct 2022 19:59:11 +0300	[thread overview]
Message-ID: <CABikg9z5uuo9qdcuR4p29Y6W=rGBQedUV4GWB2C+6=6APAtTNQ@mail.gmail.com> (raw)
In-Reply-To: <20221027113513.rqraayuo64zxugbs@skbuf>

On Thu, 27 Oct 2022 at 14:35, Vladimir Oltean <olteanv@gmail.com> wrote:
>
> Hi Sergei,
>
> On Mon, Oct 24, 2022 at 08:58:23PM +0300, Sergei Antonov wrote:
> > The ftmac100 controller considers packets >1518 (1500 + Ethernet + FCS)
> > FTL (frame too long) and drops them. That is fine with mtu 1500 or less
> > and it saves CPU time. When DSA is present, mtu is bigger (for VLAN
> > tagging) and the controller's built-in behavior is not desired then. We
> > can make the controller deliver FTL packets to the driver by setting
> > FTMAC100_MACCR_RX_FTL. Then we have to check ftmac100_rxdes_frame_length()
> > (packet length sans FCS) on packets marked with FTMAC100_RXDES0_FTL flag.
> >
> > Check for mtu > 1500 in .ndo_open() and set FTMAC100_MACCR_RX_FTL to let
> > the driver FTL packets. Implement .ndo_change_mtu() and check for
> > mtu > 1500 to set/clear FTMAC100_MACCR_RX_FTL dynamically.
> >
> > Fixes: 8d77c036b57c ("net: add Faraday FTMAC100 10/100 Ethernet driver")
> > Signed-off-by: Sergei Antonov <saproj@gmail.com>
> > ---
>
> I think it's clear there are problems in communication between us, so
> let me try differently.
>
> 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!

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.

  reply	other threads:[~2022-10-27 16:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 17:58 [PATCH v5 net-next] net: ftmac100: support mtu > 1500 Sergei Antonov
2022-10-27  8:31 ` Paolo Abeni
2022-10-27 11:35 ` Vladimir Oltean
2022-10-27 16:59   ` Sergei Antonov [this message]
2022-10-27 18:54     ` Vladimir Oltean
2022-10-28 15:21       ` Sergei Antonov

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='CABikg9z5uuo9qdcuR4p29Y6W=rGBQedUV4GWB2C+6=6APAtTNQ@mail.gmail.com' \
    --to=saproj@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.