net: mvneta: fix error message when MTU too large for XDP
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>
This commit is contained in:
parent
3503ee6c0b
commit
0d136f5cd9
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user