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: <20210106131140.44768b25@kernel.org>
Date:   Wed, 6 Jan 2021 13:11:40 +0100
From:   Marek BehĂșn <kabel@...nel.org>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        Jakub Kicinski <kuba@...nel.org>,
        Sven Auhagen <sven.auhagen@...eatech.de>,
        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 21:23:12 +0100
Andrew Lunn <andrew@...n.ch> wrote:

> > @@ -4913,8 +4914,8 @@ static int mvpp2_xdp_setup(struct mvpp2_port *port, struct netdev_bpf *bpf)
> >  	bool running = netif_running(port->dev);
> >  	bool reset = !prog != !port->xdp_prog;
> >  
> > -	if (port->dev->mtu > ETH_DATA_LEN) {
> > -		NL_SET_ERR_MSG_MOD(bpf->extack, "XDP is not supported with jumbo frames enabled");
> > +	if (port->dev->mtu > MVPP2_MAX_RX_BUF_SIZE) {
> > +		NL_SET_ERR_MSG_MOD(bpf->extack, "MTU too large for XDP");  
> 
> Hi Marek
> 
> Since MVPP2_MAX_RX_BUF_SIZE is a constant, you can probably do some
> CPP magic and have it part of the extack message, to give the user a
> clue what the maximum is.
> 
>      Andrew

It is a constant that is computed using sizeof of some structs. I don't
know if that can be converted at compile-time to string (it should be,
theoretically, but I don't know if compiler allows it).


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ