From: Alexander H Duyck <alexander.duyck@gmail.com>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Cc: Jason Xing <kerneljasonxing@gmail.com>,
jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, richardcochran@gmail.com, ast@kernel.org,
daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
alexandr.lobakin@intel.com, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, Jason Xing <kernelxing@tencent.com>
Subject: Re: [PATCH net v4 1/3] ixgbe: allow to increase MTU to 3K with XDP enabled
Date: Wed, 08 Feb 2023 10:57:22 -0800 [thread overview]
Message-ID: <6ded592b01ba223bce241d6ff3073246cb5dd18b.camel@gmail.com> (raw)
In-Reply-To: <Y+PNjcrSxKc0vD3s@boxer>
On Wed, 2023-02-08 at 17:27 +0100, Maciej Fijalkowski wrote:
> On Wed, Feb 08, 2023 at 07:37:57AM -0800, Alexander H Duyck wrote:
> > On Wed, 2023-02-08 at 10:43 +0800, Jason Xing wrote:
> > > From: Jason Xing <kernelxing@tencent.com>
> > >
> > > Recently I encountered one case where I cannot increase the MTU size
> > > directly from 1500 to a much bigger value with XDP enabled if the
> > > server is equipped with IXGBE card, which happened on thousands of
> > > servers in production environment. After appling the current patch,
> > > we can set the maximum MTU size to 3K.
> > >
> > > This patch follows the behavior of changing MTU as i40e/ice does.
> > >
> > > Referrences:
> > > [1] commit 23b44513c3e6 ("ice: allow 3k MTU for XDP")
> > > [2] commit 0c8493d90b6b ("i40e: add XDP support for pass and drop actions")
> > >
> > > Fixes: fabf1bce103a ("ixgbe: Prevent unsupported configurations with XDP")
> > > Signed-off-by: Jason Xing <kernelxing@tencent.com>
> >
> > This is based on the broken premise that w/ XDP we are using a 4K page.
> > The ixgbe driver isn't using page pool and is therefore running on
> > different limitations. The ixgbe driver is only using 2K slices of the
> > 4K page. In addition that is reduced to 1.5K to allow for headroom and
> > the shared info in the buffer.
> >
> > Currently the only way a 3K buffer would work is if FCoE is enabled and
> > in that case the driver is using order 1 pages and still using the
> > split buffer approach.
>
> Hey Alex, interesting, we based this on the following logic from
> ixgbe_set_rx_buffer_len() I guess:
>
> #if (PAGE_SIZE < 8192)
> if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
> set_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);
>
> if (IXGBE_2K_TOO_SMALL_WITH_PADDING ||
> (max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)))
> set_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);
> #endif
>
> so we assumed that ixgbe is no different than i40e/ice in these terms, but
> we ignored whole overhead of LRO/RSC that ixgbe carries.
If XDP is already enabled the LRO/RSC cannot be enabled. I think that
is already disabled if we have XDP enabled.
> I am not actively working with ixgbe but I know that you were the main dev
> of it, so without premature dive into the datasheet and codebase, are you
> really sure that 3k mtu for XDP is a no go?
I think I mixed up fm10k and ixgbe, either that or I was thinking of
the legacy setup. They all kind of blur together as I had worked on
pretty much all the Intel drivers up to i40e the last time I was
updating them for all the Rx path stuff. :)
So if I am reading things right the issue is that if XDP is enabled you
cannot set a 3K MTU, but if you set the 3K MTU first then you can
enable XDP after the fact right?
Looking it over again after re-reading the code this looks good to me.
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
next prev parent reply other threads:[~2023-02-08 18:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 2:43 [PATCH net v4 1/3] ixgbe: allow to increase MTU to 3K with XDP enabled Jason Xing
2023-02-08 2:43 ` [PATCH net v2 2/3] i40e: add double of VLAN header when computing the max MTU Jason Xing
2023-02-08 15:41 ` Alexander H Duyck
2023-02-14 2:13 ` [Intel-wired-lan] " Rout, ChandanX
2023-02-08 15:37 ` [PATCH net v4 1/3] ixgbe: allow to increase MTU to 3K with XDP enabled Alexander H Duyck
2023-02-08 16:27 ` Maciej Fijalkowski
2023-02-08 18:57 ` Alexander H Duyck [this message]
2023-02-08 19:02 ` Maciej Fijalkowski
2023-02-14 2:23 ` [Intel-wired-lan] " Rout, ChandanX
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=6ded592b01ba223bce241d6ff3073246cb5dd18b.camel@gmail.com \
--to=alexander.duyck@gmail.com \
--cc=alexandr.lobakin@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=john.fastabend@gmail.com \
--cc=kerneljasonxing@gmail.com \
--cc=kernelxing@tencent.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.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;
as well as URLs for NNTP newsgroup(s).