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]
Date:   Tue, 5 Jan 2021 18:43:08 +0100
From:   Marek BehĂșn <kabel@...nel.org>
To:     Sven Auhagen <sven.auhagen@...eatech.de>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        Jakub Kicinski <kuba@...nel.org>,
        Matteo Croce <mcroce@...rosoft.com>,
        Lorenzo Bianconi <lorenzo@...nel.org>
Subject: Re: [PATCH net-next] net: mvpp2: increase MTU limit when XDP
 enabled

On Tue, 5 Jan 2021 18:24:37 +0100
Sven Auhagen <sven.auhagen@...eatech.de> wrote:

> On Tue, Jan 05, 2021 at 06:19:21PM +0100, Marek BehĂșn wrote:
> > Currently mvpp2_xdp_setup won't allow attaching XDP program if
> >   mtu > ETH_DATA_LEN (1500).
> > 
> > The mvpp2_change_mtu on the other hand checks whether
> >   MVPP2_RX_PKT_SIZE(mtu) > MVPP2_BM_LONG_PKT_SIZE.
> > 
> > These two checks are semantically different.
> > 
> > Moreover this limit can be increased to MVPP2_MAX_RX_BUF_SIZE, since in
> > mvpp2_rx we have
> >   xdp.data = data + MVPP2_MH_SIZE + MVPP2_SKB_HEADROOM;
> >   xdp.frame_sz = PAGE_SIZE;
> > 
> > Change the checks to check whether
> >   mtu > MVPP2_MAX_RX_BUF_SIZE  
> 
> Hello Marek,
> 
> in general, XDP is based on the model, that packets are not bigger than 1500.
> I am not sure if that has changed, I don't believe Jumbo Frames are upstreamed yet.
> You are correct that the MVPP2 driver can handle bigger packets without a problem but
> if you do XDP redirect that won't work with other drivers and your packets will disappear.

At least 1508 is required when I want to use XDP with a Marvell DSA
switch: the DSA header is 4 or 8 bytes long there.

The DSA driver increases MTU on CPU switch interface by this length
(on my switches to 1504).

So without this I cannot use XDP with mvpp2 with a Marvell switch with
default settings, which I think is not OK.

Since with the mvneta driver it works (mvneta checks for
MVNETA_MAX_RX_BUF_SIZE rather than ETH_DATA_LEN), I think it should also work
with mvpp2.

Marek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ