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] [day] [month] [year] [list]
Message-ID: <X/TG2G3CaDhwWMHt@lunn.ch>
Date:   Tue, 5 Jan 2021 21:06:48 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Marek Behún <kabel@...nel.org>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Lorenzo Bianconi <lorenzo@...nel.org>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH net-next] net: mvneta: fix error message when MTU too
 large for XDP

On Tue, Jan 05, 2021 at 05:38:33PM +0100, Marek Behún wrote:
> The error message says that "Jumbo frames are not supported on XDP", but
> the code checks for mtu > MVNETA_MAX_RX_BUF_SIZE, not mtu > 1500.
> 
> Fix this error message.
> 
> Signed-off-by: Marek Behún <kabel@...nel.org>
> Fixes: 0db51da7a8e9 ("net: mvneta: add basic XDP support")
> Cc: Lorenzo Bianconi <lorenzo@...nel.org>
> Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>
> ---
>  drivers/net/ethernet/marvell/mvneta.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index 563ceac3060f..8adbfa25465d 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -4432,7 +4432,7 @@ static int mvneta_xdp_setup(struct net_device *dev, struct bpf_prog *prog,
>  	struct bpf_prog *old_prog;
>  
>  	if (prog && dev->mtu > MVNETA_MAX_RX_BUF_SIZE) {
> -		NL_SET_ERR_MSG_MOD(extack, "Jumbo frames not supported on XDP");
> +		NL_SET_ERR_MSG_MOD(extack, "XDP is not supported with MTU > %d", dev->mtu);
>  		return -EOPNOTSUPP;

Hi Marek

In addition to the OMG, don't you actually want to print
MVNETA_MAX_RX_BUF_SIZE, not the dev->mtu?

			Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ