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

netfilter: Add the capability to offload flowtable in XDP layer #7042

Closed

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

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

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 5c16727
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=853510
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 4505311
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=853510
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 83eea61
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=853510
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 71ed6c2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=853510
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 71ed6c2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=854168
version: 2

Florian Westphal and others added 4 commits May 18, 2024 10:56
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>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 6f130e4
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=854168
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=854168 expired. Closing PR.

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot deleted the series/852307=>bpf-next branch May 23, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant