All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Marek Behún" <kabel@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH net-next] net: mvneta: fix error message when MTU too large for XDP
Date: Tue, 5 Jan 2021 21:06:48 +0100	[thread overview]
Message-ID: <X/TG2G3CaDhwWMHt@lunn.ch> (raw)
In-Reply-To: <20210105163833.389-1-kabel@kernel.org>

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@kernel.org>
> Fixes: 0db51da7a8e9 ("net: mvneta: add basic XDP support")
> Cc: Lorenzo Bianconi <lorenzo@kernel.org>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.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

      parent reply	other threads:[~2021-01-05 20:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 16:38 [PATCH net-next] net: mvneta: fix error message when MTU too large for XDP Marek Behún
2021-01-05 17:15 ` Marek Behún
2021-01-05 20:06 ` Andrew Lunn [this message]

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=X/TG2G3CaDhwWMHt@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=kabel@kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.