[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X/TKsHr+8U82kwAz@lunn.ch>
Date:   Tue, 5 Jan 2021 21:23:12 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Marek BehĂșn <kabel@...nel.org>
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
> @@ -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
Powered by blists - more mailing lists
 
