-
Notifications
You must be signed in to change notification settings - Fork 5
add BPF_F_PERMANENT flag for sockmap skmsg redirect #599
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
base: bpf-next_base
Are you sure you want to change the base?
Conversation
|
Upstream branch: 99c9991 |
6a0ffaf to
80792ec
Compare
|
Upstream branch: 99c9991 |
50be9f4 to
46480af
Compare
80792ec to
7114db8
Compare
|
Upstream branch: 99c9991 |
46480af to
e5c5221
Compare
5d0a354 to
6c38f9e
Compare
|
Upstream branch: 44cb03f Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/netdevbpf/list/?series=793216 conflict: |
3c4854d to
c497ec6
Compare
c497ec6 to
1cc1e1b
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=793216 expired. Closing PR. |
|
Upstream branch: f2fbb90 |
|
Upstream branch: e80742d |
a5fabad to
694cbe3
Compare
b7b6ef0 to
293e027
Compare
|
Upstream branch: e80742d |
694cbe3 to
c3a09f7
Compare
293e027 to
260b428
Compare
|
Upstream branch: e80742d |
c3a09f7 to
663917e
Compare
260b428 to
08949e6
Compare
|
Upstream branch: 155addf |
663917e to
97a95b0
Compare
08949e6 to
3a8c9bf
Compare
|
Upstream branch: 689b097 |
97a95b0 to
6099857
Compare
3a8c9bf to
32f9f95
Compare
If the sockmap msg redirection function is used only to forward packets and no other operation, the execution result of the BPF_SK_MSG_VERDICT program is the same each time. In this case, the BPF program only needs to be run once. Add BPF_F_PERMANENT flag to bpf_msg_redirect_map() and bpf_msg_redirect_hash() to implement this ability. Then we can enable this function in the bpf program as follows: bpf_msg_redirect_hash(xx, xx, xx, BPF_F_INGRESS | BPF_F_PERMANENT); Test results using netperf TCP_STREAM mode: for i in 1 64 128 512 1k 2k 32k 64k 100k 500k 1m;then netperf -T 1,2 -t TCP_STREAM -H 127.0.0.1 -l 20 -- -m $i -s 100m,100m -S 100m,100m done before: 3.84 246.52 496.89 1885.03 3415.29 6375.03 40749.09 48764.40 51611.34 55678.26 55992.78 after: 4.43 279.20 555.82 2080.79 3870.70 7105.44 41836.41 49709.75 51861.56 55211.00 54566.85 Signed-off-by: Liu Jian <[email protected]> Tested-by: Jakub Sitnicki <[email protected]>
Add one test for txmsg ingress permanently test for sockmap. Signed-off-by: Liu Jian <[email protected]>
Add one test for txmsg redir permanently test for sockmap. Signed-off-by: Liu Jian <[email protected]>
Add two normal skmsg verdict tests in sockmap_basic.c Signed-off-by: Liu Jian <[email protected]>
Add two tests for BPF_F_PERMANENT flag in sockmap_basic.c. Signed-off-by: Liu Jian <[email protected]>
Add tests for verdict skmsg to itself in sockmap_basic.c Signed-off-by: Liu Jian <[email protected]>
|
Upstream branch: 9241176 |
Add four tests for verdict skmsg to closed socket in sockmap_basic.c. Signed-off-by: Liu Jian <[email protected]>
6099857 to
e9f6c31
Compare
Pull request for series with
subject: add BPF_F_PERMANENT flag for sockmap skmsg redirect
version: 6
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=793216