Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment of BMC #14

Open
nzalik opened this issue Aug 12, 2023 · 0 comments
Open

Deployment of BMC #14

nzalik opened this issue Aug 12, 2023 · 0 comments

Comments

@nzalik
Copy link

nzalik commented Aug 12, 2023

I tried deploying BMC on my machine without much success. With your permission, I will now detail the issues I am facing:

There are several undefined values such as IPPROTO_UDP, IPPROTO_TCP, u16, u32 when I open the code with my VS Code editor. However, I noticed that the code compiles successfully, and the bmc_tx_filter can be properly attached to a network interface. The problem occurs when the program reaches the line "__be16 sport = udp->source" in the bmc_tx_filter function. My question is, can these undefined values cause execution issues in the kernel? If so, how can I resolve these undefined value problems?

Regarding the bmc_tx_filter function exposed at /sys/fs/bpf/, after tracing the execution, I noticed that the bmc_update_cache function is called with the instruction "bpf_tail_call(skb, &map_progs_tc, BMC_PROG_TC_UPDATE_CACHE)". Assuming that skb is properly defined and the constant BMC_PROG_TC_UPDATE_CACHE is also defined, I suspect that the issue might be related to the map map_progs_tc.
My question is, at what point are the data added to this map? Are these data loaded from a userspace program? In short, could you please provide some possible reasons for the failure of the bmc_update_cache function call?

After compiling BMC and obtaining the binary, I ran "sudo ./bmc wlo1" to attach the program to my Wi-Fi network interface. However, as you mentioned in the readme.md, it failed. Nevertheless, this instruction exposes bmc_tx_filter in /sys/fs/bpf/, allowing me to successfully attach bmc_tx_filter to my network interface using the commands mentioned in the readme.md.
My question is, how can I expose the bmc_rx_filter to attach it to my network interface for processing incoming packets?

I'm using Linux Mint with a kenel version of 5.4

Thank you. @YoannGh

@nzalik nzalik changed the title Deployment of B?C Deployment of BMC Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant