-
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
bpf: Force to MPTCP #5467
bpf: Force to MPTCP #5467
Conversation
Upstream branch: 87dc2bb |
Upstream branch: 87dc2bb |
57d82ad
to
206f948
Compare
Upstream branch: 87dc2bb |
206f948
to
7a8b39e
Compare
bf18480
to
1bd1b71
Compare
Upstream branch: 648880e |
7a8b39e
to
57923f9
Compare
1bd1b71
to
a32cfa8
Compare
Upstream branch: 6f9bad6 |
57923f9
to
4c480d4
Compare
a32cfa8
to
83f304b
Compare
Upstream branch: 5964d1e |
4c480d4
to
076abac
Compare
Upstream branch: 5964d1e |
076abac
to
97db5c1
Compare
Upstream branch: 5964d1e |
97db5c1
to
7b589fc
Compare
83f304b
to
5c927e8
Compare
Upstream branch: 21ce6ab |
7b589fc
to
d106b44
Compare
Upstream branch: a5c0a42 |
5e14fc3
to
a546ead
Compare
1c4fa43
to
aaff672
Compare
Upstream branch: eb62e6a |
a546ead
to
2a3ee97
Compare
aaff672
to
5593ea7
Compare
Upstream branch: e546a11 |
2a3ee97
to
af0cd0f
Compare
5593ea7
to
3e7ba7d
Compare
Upstream branch: 96ead1e |
af0cd0f
to
24ff6bc
Compare
3e7ba7d
to
b0bc468
Compare
Upstream branch: 898f55f |
24ff6bc
to
9456798
Compare
b0bc468
to
5ee3285
Compare
Upstream branch: 526bc5b |
9456798
to
0d4ac2a
Compare
5ee3285
to
42d4b6d
Compare
Add a hook named update_socket_protocol in __sys_socket(), for bpf progs to attach to and update socket protocol. One user case is to force legacy TCP apps to create and use MPTCP sockets instead of TCP ones. Define a mod_ret set named bpf_mptcp_fmodret_ids, add the hook update_socket_protocol into this set, and register it in bpf_mptcp_kfunc_init(). Closes: multipath-tcp/mptcp_net-next#79 Acked-by: Matthieu Baerts <matthieu.baerts@tessares.net> Acked-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
When running mptcp tests simultaneously, it fails sometimes with "Cannot create namespace file "/var/run/netns/mptcp_ns": File exists" errors. So this patch uses rand() to generate a random netns name instead of using the fixed name "mptcp_ns" for every test. Add "ip netns show" after "ip netns del" to check if there is a test did not clean up its netns By doing that, we can re-launch the test even if there was an issue removing the previous netns or if by accident, a netns with this generic name already existed on the system. Note that using a different name each will also help adding more subtests in future commits. Acked-by: Yonghong Song <yonghong.song@linux.dev> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Add two netns helpers for mptcp tests: create_netns() and cleanup_netns(). Use them in test_base(). These new helpers will be re-used in the following commits introducing new tests. Acked-by: Yonghong Song <yonghong.song@linux.dev> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Upstream branch: 2adbb76 |
Return libbpf_get_error(), instead of -EIO, for the error from mptcp_sock__open_and_load(). Load success means prog_fd and map_fd are always valid. So drop these unneeded ASSERT_GE checks for them in mptcp run_test(). Acked-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Implement a new test program mptcpify: if the family is AF_INET or AF_INET6, the type is SOCK_STREAM, and the protocol ID is 0 or IPPROTO_TCP, set it to IPPROTO_MPTCP. It will be hooked in update_socket_protocol(). Extend the MPTCP test base, add a selftest test_mptcpify() for the mptcpify case. Open and load the mptcpify test prog to mptcpify the TCP sockets dynamically, then use start_server() and connect_to_fd() to create a TCP socket, but actually what's created is an MPTCP socket, which can be verified through 'getsockopt(SOL_PROTOCOL)' and 'nstat' commands. Acked-by: Yonghong Song <yonghong.song@linux.dev> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
0d4ac2a
to
29fe9dc
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=773504 expired. Closing PR. |
Pull request for series with
subject: bpf: Force to MPTCP
version: 8
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=772472