If you are using the legacy implementation of XDP (instead of the kernel-provided one), see onload_bpftools dependencies in Build Dependencies.
# onload_bpftool help
Usage:
onload_bpftool help
onload_bpftool prog { show | list }
onload_bpftool prog dump { xlated | jited } ATTACHMENT
onload_bpftool prog load object FILE [ section NAME ] [ verbose ] attach ATTACHMENT [attach ATTACHMENT]...
onload_bpftool prog detach ATTACHMENT
ATTACH_POINT := { xdp_ingress }
ATTACHMENT := ATTACH_POINT [dev IFNAME] [stack STACKNAME]
An example eBPF program and build command lines are documented in the Onload Release Notes.