Message ID | f3e76f7cd2862f0075de896cd1f221cb0dbeb9aa.1637013639.git.lorenzo@kernel.org (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | BPF |
Headers | show |
Series | mvneta: introduce XDP multi-buffer support | expand |
diff --git a/net/core/filter.c b/net/core/filter.c index 21a2c47809b5..1de13a790570 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -4182,6 +4182,13 @@ int xdp_do_redirect(struct net_device *dev, struct xdp_buff *xdp, struct bpf_map *map; int err; + /* XDP_REDIRECT is not fully supported yet for xdp multi-buff since + * not all XDP capable drivers can map non-linear xdp_frame in + * ndo_xdp_xmit. + */ + if (unlikely(xdp_buff_is_mb(xdp))) + return -EOPNOTSUPP; + ri->map_id = 0; /* Valid map id idr range: [1,INT_MAX[ */ ri->map_type = BPF_MAP_TYPE_UNSPEC;
XDP_REDIRECT is not fully supported yet for xdp multi-buff since not all XDP capable drivers can map non-linear xdp_frame in ndo_xdp_xmit so disable it for the moment. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> --- net/core/filter.c | 7 +++++++ 1 file changed, 7 insertions(+)