-
Notifications
You must be signed in to change notification settings - Fork 111
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 #7087
Conversation
Upstream branch: a87f34e |
169fa82
to
14f768c
Compare
Upstream branch: ecec188 |
84d5f8d
to
3cd1338
Compare
14f768c
to
8cca82b
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_lookup kfunc in order to perform the lookup of a given flowtable entry based on a fib tuple of incoming traffic. bpf_xdp_flow_lookup can be used as building block to offload in xdp the processing of sw flowtable when hw flowtable is not available. Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Introduce e2e selftest for bpf_xdp_flow_lookup kfunc through xdp_flowtable utility. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Upstream branch: c12603e |
3cd1338
to
050ef9a
Compare
8cca82b
to
20219f9
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=855320 expired. Closing PR. |
Pull request for series with
subject: netfilter: Add the capability to offload flowtable in XDP layer
version: 3
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=855320