* Add interface luid to bpf_sock_addr and bpf_sock_ops
And also add compartment id to bpf_sock_ops for consistency with
bpf_sock_addr, so that it is available to eBPF programs.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Expose interface luid and compartment id to sock_ops and sock_addr hooks
* compartment_id was exposed to sock_addr but not sock_ops
* interface_luid was not exposed to either
Exposing the interface_luid should be a performant way to compensate for
lack of scope_id in the hooks, since the interface luid is available
in the WFP callout, and is more specific than a scope id (so a scope id
can always be looked up from the interface luid in the future if
needed).
Fixes#1129
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update expected bpf2c output
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* remove dependabot from the fork.
* Revert "remove dependabot from the fork."
This reverts commit c542c6cd44.
* add sock_ops program and attach types.
* PR Feedback.
Several fields were missing descriptions in the generated docs.
This PR fixes the docs to actually show the relevant descriptions.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
* Add some header file names included by typical eBPF programs
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* PR feedback
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix test
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Remove unneeded include
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add _MSC_VER checks around pragma warnings in ebpf program headers
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Use full path to avoid requiring an include path
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
* remove dependabot from the fork.
* Revert "remove dependabot from the fork."
This reverts commit c542c6cd44.
* Program info and hook NPI providers for sock_addr.
* Program info and hook NPI providers for sock_addr.
* PR Feedback.
* PR Feedback 2.
* wfp callout for sock_addr hook.
* PR Feedback.
* fix build break.
* Add BPF_PROG_TYPE_CGROUP_SOCK_ADDR program type and CGROUP_INET4/6_CONNECT/RECV_ACCEPT attach types.
* PR Feedback #1.
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* Initial version of bpf_printk support
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Convert printk.c sample to use bind hook instead of xdp hook
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add wprp file to deployment script
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Unify UM and KM platforms as much as possible for printk support
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix annotation
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Work around compiler warning
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix comment
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix keyword
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix test when -s is used
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* add ingress interface index to xdp context.
* Address PR feedback.
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
This PR is the second of three steps towards fully addressing #259
The doxygen \ref annotation tells doxygen to make the following word
be linked to the appropriate location in the generated docs.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Make all enum values have a description in the generated API docs
* Also remove SAL annotation from the generated docs, since SAL
breaks doxygen type detection
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>