Skip to content

Commit

Permalink
Take off the XDP_ZEROCOPY flag from port_params_default.xsk_cfg.bind_…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
tjcw authored and tohojo committed Jan 5, 2023
1 parent 112cf3e commit 54a31ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AF_XDP-forwarding/xsk_fwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 54a31ce

Please sign in to comment.