-
Notifications
You must be signed in to change notification settings - Fork 177
xdp-forward: Introduce xdp-fwd-flowtable support #441
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
Conversation
64eeedc
to
1779d1e
Compare
1779d1e
to
004e068
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits, mostly.
But as a bit of a bigger item, the tests don't cover the NAT code at all, so we basically have no way to check if all the fiddly packet header rewriting works. I think we should amend the tests to include each of the different NAT permutations. I know it's a lot of tedious work to test all the permutations, but I think it should be possible to parameterise the test functions so it becomes manageable. WDYT?
@tohojo what about doing something like:
In this way we can tests all the possible combinations at the same time, WDYT? |
bbae4f7
to
6eef168
Compare
_lore_ ***@***.***> writes:
> A few nits, mostly.
>
> But as a bit of a bigger item, the tests don't cover the NAT code at all, so we basically have no way to check if all the fiddly packet header rewriting works. I think we should amend the tests to include each of the different NAT permutations. I know it's a lot of tedious work to test all the permutations, but I think it should be possible to parameterise the test functions so it becomes manageable. WDYT?
@tohojo what about doing something like:
- perform dnat and snat at the same time changing IP ad port
- load a program on the second veth that allows just selected ips and ports
In this way we can tests all the possible combinations at the same
time, WDYT?
Sure, that sounds reasonable (as long as we run it for both IPv4 and
IPv6, of course) :)
|
f112a0e
to
f898bf7
Compare
I think we can do something even simpler, we can just filter out unexpected packets using some nft rules in the destination namesapce. |
9fe3158
to
d3e5563
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple more nits :)
428e567
to
71f1d98
Compare
71f1d98
to
f8d078d
Compare
Okay, so the code basically LGTM now. However, we don't have a kernel in CI that is new enough to test this, and when I try to run it in a VM on my own machine the test fails:
Is it working on your machine? |
4d27d1f
to
bd9fc81
Compare
Introduce xdp-fwd-flowtable sample in order to perform XDP_REDIRECT between net_devices inserted in a netfilter flowtable. xdp-fwd-flowtable relies on bpf_xdp_flow_lookup kfunc in order to perform the lookup of a given flowtable entry based on a fib tuple of incoming traffic. At the moment we are able to offload just TCP or UDP netfilter flowtable entries to the xdp layer. The user is supposed to configure the flowtable separately. Signed-off-by: Lorenzo Bianconi <[email protected]>
… userspace Introduce the capability to load xdp-fw-flowtable sample to offload in xdp the processing of sw netfilter flowtable. Signed-off-by: Lorenzo Bianconi <[email protected]>
1739847
to
bad7e92
Compare
0c100a3
to
6f7181c
Compare
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
6f7181c
to
fdf6536
Compare
@tohojo yes, the issue is due to the different |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, tests work for me as well now, nice work! :)
Introduce xdp-fwd-flowtable sample in order to perform XDP_REDIRECT between net_devices inserted in a netfilter flowtable.