Take off the XDP_ZEROCOPY flag from port_params_default.xsk_cfg.bind_flags

Fix for issue 78; veth does not support zerocopy in bind flags
Take off the XDP_ZEROCOPY flag in the setting of
port_params_default.xsk_cfg.bind_flags in AF_XDP-forwarding/xsk_fwd.c

With this change, libxdp first tries to set up zerocopy, and when it finds
that this is not available it sets up an implementation which copies the
data. So performance will not be impactes for eths which support zerocopy.

Signed-off-by: Chris Ward <tjcw@uk.ibm.com>
This commit is contained in:
Chris Ward
2022-12-16 12:40:28 +00:00
committed by Toke Høiland-Jørgensen
parent 112cf3e93b
commit 54a31ceabc

View File

@@ -728,7 +728,7 @@ static const struct port_params port_params_default = {
.tx_size = XSK_RING_PROD__DEFAULT_NUM_DESCS,
.libxdp_flags = 0,
.xdp_flags = XDP_FLAGS_DRV_MODE,
.bind_flags = XDP_USE_NEED_WAKEUP | XDP_ZEROCOPY,
.bind_flags = XDP_USE_NEED_WAKEUP,
},
.bp = NULL,