aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/af_xdp/af_xdp.h
AgeCommit message (Collapse)AuthorFilesLines
2023-01-13af_xdp: update af_xdp driver plugin to depend on libxdpYulong Pei1-1/+1
AF_XDP support is deprecated in libbpf since v0.7.0 [1], the libxdp library now provides the functionality which once was in libbpf, this commit updates af_xdp plugin to depend on libxdp, libbpf still remains a dependency even if libxdp is present, as it need use libbpf APIs for program loading. libxdp is distributed within xdp-tool [2], xdp-tools package also include libbpf in it as dependency, so here installed libxdp v1.2.9 and libbpf v0.8.0, both from xdp-tool-1.2.9 package. More information about libxdp compatibility can be found in the libxdp README [3]. In libbpf v0.8.0, The bpf_prog_load function was deprecated and changed to bpf_object__open_file and bpf_object__next_program and bpf_object__load, The bpf_get_link_xdp_id and bpf_set_link_xdp_fd functions were deprecated and changed to bpf_xdp_attach and bpf_xdp_detach, The bpf_object__unload function was deprecated and changed to bpf_object__close. [1] https://github.com/libbpf/libbpf/commit/277846bc6c15 [2] https://github.com/xdp-project/xdp-tools/releases/tag/v1.2.9 [3] https://github.com/xdp-project/xdp-tools/blob/master/lib/libxdp/README.org Type: improvement Change-Id: Ifbf6e3aa38bc6e0b77561f26311fd11c15ddb47e Signed-off-by: Yulong Pei <yulong.pei@intel.com>
2021-11-19af_xdp: integrate with new tx infraarikachen1-0/+4
Type: improvement Signed-off-by: arikachen <eaglesora@gmail.com> Signed-off-by: Benoît Ganne <bganne@cisco.com> Change-Id: If8d57bcf033864935bd5e3a9912b2c1a7c712f44
2021-11-18af_xdp: introduce to netns apiarikachen1-0/+3
In some situation, we support to deploy vpp as per host and handler packet in container, so we use xdp to redirect the flow. Type: improvement Signed-off-by: arikachen <eaglesora@gmail.com> Change-Id: Iab42d6a0abb2b330a284d519018a90aff2fa4371
2021-05-21af_xdp: refill rx rings when interface goes upBenoît Ganne1-0/+2
If interrupt mode is configured through startup.conf exec script, the input function will not be polled and the rx ring will never be filled. Always refill the ring when interface goes up so it is ready to receive packets. Type: fix Change-Id: I4cf22c8ae00638679f2e8650303a6fe916c1319b Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-05-21af_xdp: workaround kernel race between poll() and sendmsg()Benoît Ganne1-6/+24
Prior to Linux 5.6 there is a race condition between poll() and sendmsg() in the kernel. This patch protects the syscalls with a lock to prevent it, unless the NO_SYSCALL_LOCK flag is set at create time. See https://lore.kernel.org/bpf/BYAPR11MB365382C5DB1E5FCC53242609C1549@BYAPR11MB3653.namprd11.prod.outlook.com/ Type: fix Change-Id: Ie7d4f5cb41f697b11a09b6046e54d190430d76df Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-01-21af_xdp: update interrupt mode to new infraBenoît Ganne1-6/+8
Type: improvement Change-Id: Icb23af5f5e458a555f416cb0a829e84646b25dd9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-10-24af_xdp: add option to claim all available rx queuesBenoît Ganne1-0/+2
Type: feature Change-Id: I97176c2c90ea664a68078b3a7b7d44eb237a7f13 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-08-31af_xdp: AF_XDP input pluginBenoît Ganne1-0/+183
Type: feature Change-Id: I85aa4ad6b68c1aa0e51938002dc691a4b11c545c Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Benoît Ganne <bganne@cisco.com>