Skip to content

loader: Header files for each host endpoint BPF program#12657

Closed
pchaigno wants to merge 1 commit intomasterfrom
pr/pchaigno/header-files-host-endpoint
Closed

loader: Header files for each host endpoint BPF program#12657
pchaigno wants to merge 1 commit intomasterfrom
pr/pchaigno/header-files-host-endpoint

Conversation

@pchaigno
Copy link
Copy Markdown
Member

The host endpoint's datapath, living in bpf_host, can be attached to several devices (host devices and native devices). The BPF program is compiled once for the first host device (cilium_host) and patched before loading to adjust it to the other devices, by changing a few symbols in the object file.

Therefore, the state directory of the host endpoint contains one object file per device. There is however a single header file, with the values for the host device.

This commit fixes that to create one header file per device, with the appropriate values. The goal is to simplify inspection of Cilium state and avoid having to read symbols manually in the object files.

@pchaigno pchaigno added area/loader Impacts the loading of BPF programs into the kernel. release-note/misc This PR makes changes that have no direct user impact. area/host-firewall Impacts the host firewall or the host endpoint. labels Jul 24, 2020
@coveralls

This comment has been minimized.

@pchaigno pchaigno force-pushed the pr/pchaigno/header-files-host-endpoint branch 2 times, most recently from b092a28 to 71cbb36 Compare July 27, 2020 10:07
The host endpoint's datapath, living in bpf_host, can be attached to
several devices (host devices and native devices). The BPF program is
compiled once for the first host device (cilium_host) and patched before
loading to adjust it to the other devices, by changing a few symbols in
the object file.

Therefore, the state directory of the host endpoint contains one object
file per device. There is however a single header file, with the values
for the host device.

This commit fixes that to create one header file per device, with the
appropriate values. The goal is to simplify inspection of Cilium state
and avoid having to read symbols manually in the object files.

Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno pchaigno force-pushed the pr/pchaigno/header-files-host-endpoint branch from 71cbb36 to 9876af7 Compare July 27, 2020 10:54
@stale

This comment has been minimized.

@stale stale Bot added the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Aug 27, 2020
@pchaigno pchaigno removed the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Aug 27, 2020
@stale
Copy link
Copy Markdown

stale Bot commented Sep 26, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Sep 26, 2020
@stale

This comment has been minimized.

@stale stale Bot closed this Oct 11, 2020
@pchaigno pchaigno removed the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/host-firewall Impacts the host firewall or the host endpoint. area/loader Impacts the loading of BPF programs into the kernel. release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants