lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL+tcoDyeG8oLspkrdjwJX3=ZmcDD7JY63s=F3cmzaEsXNOveA@mail.gmail.com>
Date:   Mon, 23 Jan 2023 09:53:28 +0800
From:   Jason Xing <kerneljasonxing@...il.com>
To:     Paul Menzel <pmenzel@...gen.mpg.de>
Cc:     jesse.brandeburg@...el.com, anthony.l.nguyen@...el.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, richardcochran@...il.com, ast@...nel.org,
        daniel@...earbox.net, hawk@...nel.org, john.fastabend@...il.co,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        intel-wired-lan@...ts.osuosl.org, bpf@...r.kernel.org,
        Jason Xing <kernelxing@...cent.com>
Subject: Re: [Intel-wired-lan] [PATCH net] ixgbe: allow to increase MTU to
 some extent with XDP enalbed

On Mon, Jan 23, 2023 at 4:21 AM Paul Menzel <pmenzel@...gen.mpg.de> wrote:
>
> Dear Jason,
>
>
> Thank you for your patch.

Hello Paul,

Thanks for the review.

>
> Am 21.01.23 um 09:55 schrieb Jason Xing:
> > From: Jason Xing <kernelxing@...cent.com>
>
> There is a small typo in the summary: ena*bl*ed
>

Sure it is. That's my fault.

> > I encountered one case where I cannot increase the MTU size with XDP
> > enabled if the server is equipped with IXGBE card, which happened on
> > thousands of servers. I noticed it was prohibited from 2017[1] and
>
> That’s included since Linux 4.19-rc1.
>
> > added size checks[2] if allowed soon after the previous patch.
> >
> > Interesting part goes like this:
> > 1) Changing MTU directly from 1500 (default value) to 2000 doesn't
> > work because the driver finds out that 'new_frame_size >
> > ixgbe_rx_bufsz(ring)' in ixgbe_change_mtu() function.
> > 2) However, if we change MTU to 1501 then change from 1501 to 2000, it
> > does work, because the driver sets __IXGBE_RX_3K_BUFFER when MTU size
> > is converted to 1501, which later size check policy allows.
> >
> > The default MTU value for most servers is 1500 which cannot be adjusted
> > directly to the value larger than IXGBE_MAX_2K_FRAME_BUILD_SKB (1534 or
> > 1536) if it loads XDP.
> >
> > After I do a quick study on the manner of i40E driver allowing two kinds
> > of buffer size (one is 2048 while another is 3072) to support XDP mode in
> > i40e_max_xdp_frame_size(), I believe the default MTU size is possibly not
> > satisfied in XDP mode when IXGBE driver is in use, we sometimes need to
> > insert a new header, say, vxlan header. So setting the 3K-buffer flag
> > could solve the issue.
>
> What card did you test with exactly?
>

It is the IXGBE driver that has such an issue.  The I40E driver I
mentioned here is only for contrast. It's not that proper from my
point of view if the IXGBE driver cannot directly adjust to 2000. Thus
I would like more reviews and suggestions.

Thanks,
Jason

> > [1] commit 38b7e7f8ae82 ("ixgbe: Do not allow LRO or MTU change with XDP")
> > [2] commit fabf1bce103a ("ixgbe: Prevent unsupported configurations with
> > XDP")
>
> I’d say to not break the line in references.
>
> > Signed-off-by: Jason Xing <kernelxing@...cent.com>
> > ---
> >   drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +++
> >   1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > index ab8370c413f3..dc016582f91e 100644
> > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> > @@ -4313,6 +4313,9 @@ static void ixgbe_set_rx_buffer_len(struct ixgbe_adapter *adapter)
> >               if (IXGBE_2K_TOO_SMALL_WITH_PADDING ||
> >                   (max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)))
> >                       set_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);
> > +
> > +             if (ixgbe_enabled_xdp_adapter(adapter))
> > +                     set_bit(__IXGBE_RX_3K_BUFFER, &rx_ring->state);
> >   #endif
> >       }
> >   }
>
>
> Kind regards,
>
> Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ