-
Notifications
You must be signed in to change notification settings - Fork 97
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
netfilter: Add the capability to offload flowtable in XDP layer #7042
Conversation
Upstream branch: 5c16727 |
2a6f558
to
82dcd12
Compare
Upstream branch: 4505311 |
e3a9738
to
c1daeb0
Compare
82dcd12
to
0a226e9
Compare
Upstream branch: 83eea61 |
c1daeb0
to
cc49190
Compare
0a226e9
to
c7673c1
Compare
Upstream branch: 71ed6c2 |
cc49190
to
145f04d
Compare
Upstream branch: 71ed6c2 |
145f04d
to
64f766b
Compare
c7673c1
to
0b7406d
Compare
This adds a small internal mapping table so that a new bpf (xdp) kfunc can perform lookups in a flowtable. As-is, xdp program has access to the device pointer, but no way to do a lookup in a flowtable -- there is no way to obtain the needed struct without questionable stunts. This allows to obtain an nf_flowtable pointer given a net_device structure. In order to keep backward compatibility, the infrastructure allows the user to add a given device to multiple flowtables, but it will always return the first added mapping performing the lookup since it assumes the right configuration is 1:1 mapping between flowtables and net_devices. Signed-off-by: Florian Westphal <fw@strlen.de> Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Introduce bpf_xdp_flow_offload_lookup kfunc in order to perform the lookup of a given flowtable entry based on a fib tuple of incoming traffic. bpf_xdp_flow_offload_lookup can be used as building block to offload in xdp the processing of sw flowtable when hw flowtable is not available. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Introduce xdp_flowtable_offload bpf sample to offload sw flowtable logic in xdp layer if hw flowtable is not available or does not support a specific kind of traffic. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Introduce e2e selftest for bpf_xdp_flow_offload_lookup kfunc through xdp_flowtable utility. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Upstream branch: 6f130e4 |
64f766b
to
18da9b6
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=854168 expired. Closing PR. |
Pull request for series with
subject: netfilter: Add the capability to offload flowtable in XDP layer
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=853510