net: mvneta: fix error message when MTU too large for XDP
authorMarek Behún <kabel@kernel.org>
Tue, 5 Jan 2021 17:23:33 +0000 (18:23 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 6 Jan 2021 23:55:14 +0000 (15:55 -0800)
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>
Link: https://lore.kernel.org/r/20210105172333.21613-1-kabel@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/mvneta.c

index 3369ec7..bc4d8d1 100644 (file)
@@ -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, "MTU too large for XDP");
                return -EOPNOTSUPP;
        }