Skip to content

Commit

Permalink
Merge branch 'xdp21_bpf_load_backport'
Browse files Browse the repository at this point in the history
samples/bpf: backport upstream kernel bpf-loader (bpf_load.*) changes

Bringing the bpf-loader (bpf_load.*) code up to speed with recent
kernel changes (which I did most of myself).

Worth noticing is:

1. bpf-loader is binary compatible with changes to the map
   definitions, which cause ELF map defininition size to change.
   Causing very hard catch problems.

2. A new "fixup" map callback system was introduced.  This made
   me change how map files gets exported in xdp_ddos01_* sample.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
  • Loading branch information
netoptimizer committed May 31, 2017
2 parents 8f5d3e6 + cca840b commit 94c7554
Show file tree
Hide file tree
Showing 7 changed files with 412 additions and 181 deletions.
1 change: 1 addition & 0 deletions kernel/samples/bpf/bpf_helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ struct bpf_map_def {
unsigned int value_size;
unsigned int max_entries;
unsigned int map_flags;
unsigned int inner_map_idx;
};

static int (*bpf_skb_load_bytes)(void *ctx, int off, void *to, int len) =
Expand Down

0 comments on commit 94c7554

Please sign in to comment.