From: Simon Horman <horms@kernel.org>
To: Kohei Enju <kohei@enjuk.jp>
Cc: aleksander.lobakin@intel.com, andrew+netdev@lunn.ch,
anthony.l.nguyen@intel.com, davem@davemloft.net,
edumazet@google.com, intel-wired-lan@lists.osuosl.org,
kohei.enju@gmail.com, kuba@kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com, przemyslaw.kitszel@intel.com
Subject: Re: [PATCH v1 iwl-net] iavf: fix netdev->max_mtu to respect actual
Date: Thu, 12 Feb 2026 18:15:49 +0000 [thread overview]
Message-ID: <aY4Y1a8QbN18kkPm@horms.kernel.org> (raw)
In-Reply-To: <20260210170603.149842-1-kohei@enjuk.jp>
On Tue, Feb 10, 2026 at 05:05:55PM +0000, Kohei Enju wrote:
> On Tue, 10 Feb 2026 17:37:23 +0100, Alexander Lobakin wrote:
>
> > From: Kohei Enju <kohei@enjuk.jp>
> > Date: Tue, 10 Feb 2026 15:57:14 +0000
> >
> > > iavf sets LIBIE_MAX_MTU as netdev->max_mtu, ignoring vf_res->max_mtu
> > > from PF [1]. This allows setting an MTU beyond the actual hardware
> > > limit, causing TX queue timeouts [2].
> > >
> > > Set correct netdev->max_mtu using vf_res->max_mtu from the PF.
> > >
> > > Note that currently PF drivers such as ice/i40e set the frame size in
> > > vf_res->max_mtu, not MTU. Convert vf_res->max_mtu to MTU before setting
> > > netdev->max_mtu.
> > >
> > > [1]
> > > # ip -j -d link show $DEV | jq '.[0].max_mtu'
> > > 16356
> > >
> > > [2]
> > > iavf 0000:00:05.0 enp0s5: NETDEV WATCHDOG: CPU: 1: transmit queue 0 timed out 5692 ms
> > > iavf 0000:00:05.0 enp0s5: NIC Link is Up Speed is 10 Gbps Full Duplex
> > > iavf 0000:00:05.0 enp0s5: NETDEV WATCHDOG: CPU: 6: transmit queue 3 timed out 5312 ms
> > > iavf 0000:00:05.0 enp0s5: NIC Link is Up Speed is 10 Gbps Full Duplex
> > > ...
> > >
> > > Fixes: 5fa4caff59f2 ("iavf: switch to Page Pool")
> > > Signed-off-by: Kohei Enju <kohei@enjuk.jp>
> >
> > Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> >
> > Although I'm not sure the 'Fixes:' tag is correct. Was vs_res->max_mtu
> > accounted before switching to Page Pool? If so, then yes, my fault.
> > Otherwise, this issue is older than libie.
>
> You're right that vf_res->mtu was also not accounted before the commit.
>
> The commit changes:
> - netdev->max_mtu = IAVF_MAX_RXBUFFER - IAVF_PACKET_HDR_PAD;
> + netdev->max_mtu = LIBIE_MAX_MTU;
> ...
> -#define IAVF_MAX_RXBUFFER 9728 /* largest size for single descriptor */
>
> and thus netdev->max_mtu was already hardcoded, but just because
> IAVF_MAX_RXBUFFER was valid for VFs there hadn't been any issues, and
> invalid MTU could start to be set after the commit.
>
> > I'm asking as IIRC before I did set max_mtu to the libie definition,
> > there was a hardcoded value already.
>
> Yea, as far as I checked the value was hardcoded from the beginning
> (91c527a55664 ("ethernet/intel: use core min/max MTU checking")).
>
> Although I'm not attached to the exact commit as the Fixes: tag, I chose
> that since (coincidently) that commit made this regression.
That seems like a reasonable approach to me.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2026-02-12 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 15:57 [PATCH v1 iwl-net] iavf: fix netdev->max_mtu to respect actual hardware limit Kohei Enju
2026-02-10 16:37 ` Alexander Lobakin
2026-02-10 17:05 ` [PATCH v1 iwl-net] iavf: fix netdev->max_mtu to respect actual Kohei Enju
2026-02-12 18:15 ` Simon Horman [this message]
2026-02-23 15:56 ` [Intel-wired-lan] [PATCH v1 iwl-net] iavf: fix netdev->max_mtu to respect actual hardware limit Romanowski, Rafal
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=aY4Y1a8QbN18kkPm@horms.kernel.org \
--to=horms@kernel.org \
--cc=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kohei.enju@gmail.com \
--cc=kohei@enjuk.jp \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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