Conversation
mengxiang0811
left a comment
There was a problem hiding this comment.
gk: add BPF programs to struct gk_config
|
There is a conflict that needs to be addressed for file |
AltraMayor
left a comment
There was a problem hiding this comment.
gk: add BPF programs to struct gk_config
cjdoucette
left a comment
There was a problem hiding this comment.
These changes are just needed because of the update to the DPDK library that Qiaobin did.
|
When running Gatekeeper with BPF, I get this error: |
c7eb5f9 to
ac5d5fa
Compare
|
I have not yet addressed the load issue that Cody found, but the code already reflects the other suggestions. |
mengxiang0811
left a comment
There was a problem hiding this comment.
gk: add the BPF state to flow entries
mengxiang0811
left a comment
There was a problem hiding this comment.
ggu: extend protocol to include BPF decisions
mengxiang0811
left a comment
There was a problem hiding this comment.
gt: add support to sending BPF policy decisions
mengxiang0811
left a comment
There was a problem hiding this comment.
bpf: add the first BPF programs
I cannot comment in the commit messages. There is a typo: granted.pdf should be granted.bpf.
|
The commits are out-of-order now, please make them in chronological order. |
mengxiang0811
left a comment
There was a problem hiding this comment.
gk: add BPF programs to struct gk_config
|
The code is ready for another review. All suggestions were incorporated and bugs fixed. In order to test the code, remember to update the submodule DPDK since it has been updated. Although the patches are in proper order in git, GitHub is having the bug of not showing them in correct order. I guess it has something to do with the fact that I didn't need to edit all patches to incorporate the suggestions. One can find the proper order of the patches as well as verify that the patches are correctly ordered in git here. |
mengxiang0811
left a comment
There was a problem hiding this comment.
gk: add the BPF state to flow entries
|
There's a compilation error when using It seems to be fixed by installing |
|
I also get this error from I believe this is due to parts of the policy like: The reference to Once this bug is solved, we'll need to same kind of fix for the other functions in that file. I'll change the policy to call |
|
Oh, I got it to work by using |
|
Those are the only two issues for testing: (1) add a package to By making small changes to my local code to get past these issues, I was able to use BPF programs on both IPv4 and IPv6 packets to both forward granted packets to the destination and to drop packets at Gatekeeper. |
The BPF programs being added to struct gk_config do nothing at this point, but they are necessary for the following commits. The BPF programs will eventually be used to implement the action that a flow entry will take over its flow.
This patch adds the BPF state to flow entries. This state has an associated BPF program that is called on each packet of the flow corresponding to a given entry. The BPF program decides the fate of the packets of the flow.
This patch includes support to BPF (policy) decisions in the grantor-to-gatekeeker protocol in order to enable association of BPF programs to BPF flow states.
The BPF programs granted.bpf and declined.bpf included in this patch mimic the respective states of a flow entry.
This pull request adds a BPF state to flow entries. This new state has an associated BPF program to decide on the action that GK blocks must take over the packets of those flows.
BPF states are key to enable policies to have a failsafe mechanism when granted flows misbehave after receiving their capabilities, or to narrowly control the packets in granted flows.