Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Dave Thaler 086b80149d
Nuget package (#999)
* WIP: Developer nuget package

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Add bpf2c utility

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Build nupkg from within VisualStudio

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Don't use relative path to externals

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update props file in nuget package

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix include and library paths

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix debug build

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Co-authored-by: saxena-anurag <43585259+saxena-anurag@users.noreply.github.com>
2022-04-25 10:26:56 -07:00
Dave Thaler d00377f074
Make map definition more cross-platform compatible (#904)
Fixes #903

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2022-04-07 18:53:21 -07:00
Dave Thaler 34598edf84
Update bpftool and libbpf dependencies (#744)
* Update bpftool

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update paths to libbpf and bpftool

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Add more libbpf APIs

* Added bpf_map_create, bpf_object__next_map, bpf_object__next_program, bpf_object__prev_map, bpf_object__prev_program
* Removed obsolete exports ebpf_create_map and ebpf_create_map_name
* Updated prototype of bpf_program__attach and bpf_progam__attach_xdp to
  match latest libbpf header

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Address code review feedback

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2022-02-08 13:21:19 -08:00
Dave Thaler dd3f1b427c
Rename ebpf_helpers.h to bpf_helpers.h for cross-plat compat (#472)
Libbpf has bpf_helpers.h which is mostly platform-agnostic, and
bpf_helper_defs.h which is platform-specific but is included
by bpf_helpers.h.   Until libbpf is made more platform-agnostic
(issue #351), the workaround is to have a separate pair of files.
Our bpf_helpers.h and our own bpf_helper_defs.h, both of which
would ideally be merged into libbpf's in the future.

Platform-specific defines are in ebpf_struct.h, though that
name may need to change later on.  Linux uses "linux/bpf.h"
(e.g., as used in the https://docs.cilium.io/en/v1.8/bpf/ and
https://developers.redhat.com/blog/2021/04/01/get-started-with-xdp
articles) or "vmlinux.h" (e.g., as used in the
https://ruderich.org/simon/notes/xdp-minimal-example article),
and these filenames are hard coded in eBPF programs.  In the future,
we should probably settle on a cross-platform name and use include
paths to distinguish them, as opposed to requiring ifdefs in eBPF
programs.  However, all of that is part of issue 351 and not this
issue.

Also removed obsolete/unused "repro.c" from tests/samples

Fixes #426

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

Co-authored-by: Alan Jowett <alanjo@microsoft.com>
2021-09-01 16:30:33 -07:00