Skip to content

XDP requires null passing to sendto and recvfrom #1530

@timwoocker

Description

@timwoocker

When using XDP with XDP_USE_NEED_WAKEUP, the kernel needs to be woken up by calling either sendto or recvfrom depending on the ring using the fd.

According to the docs (https://docs.ebpf.io/linux/concepts/af_xdp/#xdp_use_need_wakeup), since the buffers are handled separately in the rings and not actually passed to sendto/recvfrom, you need to pass null for the buffers as well as the socket addresses.

I guess for the buffers we could pass an empty slice to rustix (which still wouldn't be optimal) - but the sockaddr can't be passed as null under any circumstances right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions