diff options
author | Jakov Petrina <jakov.petrina@sartura.hr> | 2020-05-25 14:14:40 +0200 |
---|---|---|
committer | Luka Perkov <luka.perkov@sartura.hr> | 2020-05-28 11:43:13 +0200 |
commit | 3dbb658d26062b34e5a540a4477e4a768628c42c (patch) | |
tree | eb3342be7f0e8693c3ae1442668ee4a1ba26b04d /target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch | |
parent | 76f9aa6f4bfd12fba34fc44aef890c48d4fb1024 (diff) | |
download | upstream-3dbb658d26062b34e5a540a4477e4a768628c42c.tar.gz upstream-3dbb658d26062b34e5a540a4477e4a768628c42c.tar.bz2 upstream-3dbb658d26062b34e5a540a4477e4a768628c42c.zip |
linux: mvebu: backport mvneta XDP support fixes
This patch backports additional fixes for XDP support in the mvneta driver. These
changes are found upstream as commits:
b37fa92e20ef2 net: mvneta: fix build skb for bm capable devices
f383b2950070c net: mvneta: rely on page_pool_recycle_direct in mvneta_run_xdp
79572c98c554d mvneta driver disallow XDP program on hardware buffer management
44efc78d0e464 net: mvneta: fix XDP support if sw bm is used as fallback
Signed-off-by: Jakov Petrina <jakov.petrina@sartura.hr>
Diffstat (limited to 'target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch')
-rw-r--r-- | target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch b/target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch new file mode 100644 index 0000000000..57ad8b6958 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch @@ -0,0 +1,53 @@ +From 79572c98c554dcdb080bca547c871a51716dcdf8 Mon Sep 17 00:00:00 2001 +From: Sven Auhagen <sven.auhagen@voleatech.de> +Date: Sat, 25 Jan 2020 08:07:03 +0000 +Subject: [PATCH] mvneta driver disallow XDP program on hardware buffer + management + +Recently XDP Support was added to the mvneta driver +for software buffer management only. +It is still possible to attach an XDP program if +hardware buffer management is used. +It is not doing anything at that point. + +The patch disallows attaching XDP programs to mvneta +if hardware buffer management is used. + +I am sorry about that. It is my first submission and I am having +some troubles with the format of my emails. + +v4 -> v5: +- Remove extra tabs + +v3 -> v4: +- Please ignore v3 I accidentally submitted + my other patch with git-send-mail and v4 is correct + +v2 -> v3: +- My mailserver corrupted the patch + resubmission with git-send-email + +v1 -> v2: +- Fixing the patches indentation + +Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/ethernet/marvell/mvneta.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -4231,6 +4231,12 @@ static int mvneta_xdp_setup(struct net_d + return -EOPNOTSUPP; + } + ++ if (pp->bm_priv) { ++ NL_SET_ERR_MSG_MOD(extack, ++ "Hardware Buffer Management not supported on XDP"); ++ return -EOPNOTSUPP; ++ } ++ + need_update = !!pp->xdp_prog != !!prog; + if (running && need_update) + mvneta_stop(dev); |