Commit Graph

11 Commits

Author SHA1 Message Date
Jesper Dangaard Brouer
6f0a1e3f01 AF_XDP-interaction: Use bpf_program__section_name
BPF program title (bpf_program__title) is getting deprecated
in libbpf use bpf_program__section_name() instead.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-28 13:35:12 +02:00
Jesper Dangaard Brouer
9e8218556c AF_XDP-interaction: Use new .maps section for BTF aware map definitions
In-practice only 'xdp_stats_map' definition gets associated BTF,
as it uses the proper '__type' construct.

The AF_XDP map BPF_MAP_TYPE_XSKMAP doesn't know about BTF yet.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-28 13:17:33 +02:00
Jesper Dangaard Brouer
3e65f68cdb AF_XDP-interaction: Make af_xdp_user default load af_xdp_kern.o
When not loading an XDP-prog the XSK library bits will load a
default XDP-prog.

In our use-case we always want to load our XDP-prog, which is
stored in af_xdp_kern.o.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-27 18:21:07 +02:00
Jesper Dangaard Brouer
0dc1b0eab5 AF_XDP-interaction: Started on newer .maps SEC usage but stopped
Something in fishy as it seems this BPF-object is not getting used.

Use old maps SEC defines until figuring out what is wrong,
but keep new dot-maps defines.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-26 17:00:48 +02:00
Jesper Dangaard Brouer
d4d325ddfc Introduce USER_TARGETS_OBJS_DEPS for extra dependencies
This USER_TARGETS_OBJS_DEPS allows makefiles to define
dependencies for USER_TARGETS_OBJS targets.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-26 16:02:25 +02:00
Jesper Dangaard Brouer
5d10995545 AF_XDP-interaction: Use USER_TARGETS_OBJS for common_* objects
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-26 15:31:33 +02:00
Jesper Dangaard Brouer
27b0efe3e2 AF_XDP-interaction: Add common_defines.h from XDP-tutorial
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-26 15:29:02 +02:00
Jesper Dangaard Brouer
e6c2d60cbf AF_XDP-interaction: Add common_user_bpf_xdp.c+h from XDP-tutorial
As example (advanced03-AF_XDP) we copied from XDP-tutorial depend on these.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-26 15:23:55 +02:00
Jesper Dangaard Brouer
118bb615b3 AF_XDP-interaction: Add common_params.c+h from XDP-tutorial
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-26 15:17:39 +02:00
Jesper Dangaard Brouer
7c7c1a9039 AF_XDP-interaction: Add Makefile
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-15 18:26:24 +02:00
Eelco Chaudron
68743eb1d3 AF_XDP-interaction: Import AF_XDP example from XDP-tutorial
https://github.com/xdp-project/xdp-tutorial/blob/master/advanced03-AF_XDP/

Give Eelco Chaudron credit as code Author.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
2021-10-15 18:23:42 +02:00