Subject: Re: [RFC 3/4] net: mvneta: add basic XDP support

From: Toke Høiland-Jørgensen <[email-masked]>
Date: Tue, 01 Oct 2019 13:02:21 +0200

Matteo Croce <[email-masked]> writes:

> On Tue,  1 Oct 2019 11:24:43 +0200
> Lorenzo Bianconi <[email-masked]> wrote:
>> +static int mvneta_xdp_setup(struct net_device *dev, struct bpf_prog
>> *prog,
>> +			    struct netlink_ext_ack *extack)
>> +{
>> +	struct mvneta_port *pp = netdev_priv(dev);
>> +	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");
>> +		return -EOPNOTSUPP;
>
> -ENOTSUPP maybe?

No, ENOTSUPP is NFS-specific, and defined in a non-UAPI header; the
correct one to use is EOPNOTSUPP :)

-Toke