]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
libbpf: Replace size_t with __u32 in xsk interfaces
authorMagnus Karlsson <magnus.karlsson@intel.com>
Thu, 26 Nov 2020 09:37:35 +0000 (10:37 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 27 Nov 2020 20:58:38 +0000 (21:58 +0100)
commit105c4e75feb411a60f5089f7a1e68b8523f986cc
tree7eb3be9f186a1b36c25d98c478d41bf30e5203b7
parent830382e4ccb5e5d9164fcd28854238ef5f5a1751
libbpf: Replace size_t with __u32 in xsk interfaces

Replace size_t with __u32 in the xsk interfaces that contain this.
There is no reason to have size_t since the internal variable that
is manipulated is a __u32. The following APIs are affected:

__u32 xsk_ring_prod__reserve(struct xsk_ring_prod *prod, __u32 nb, __u32 *idx)
void xsk_ring_prod__submit(struct xsk_ring_prod *prod, __u32 nb)
__u32 xsk_ring_cons__peek(struct xsk_ring_cons *cons, __u32 nb, __u32 *idx)
void xsk_ring_cons__cancel(struct xsk_ring_cons *cons, __u32 nb)
void xsk_ring_cons__release(struct xsk_ring_cons *cons, __u32 nb)

The "nb" variable and the return values have been changed from size_t
to __u32.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/1606383455-8243-1-git-send-email-magnus.karlsson@gmail.com
tools/lib/bpf/xsk.h