On Tue, 5 Jan 2021 21:23:12 +0100
Andrew Lunn <and...@lunn.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).


Reply via email to