fix mptcp bpf selftest error
Subsystems (5)
cover fix mptcp bpf selftest error
Fix the mptcp bpf selftest build break.
Geliang Tang (2):
Squash to "bpf:selftests: add MPTCP test base"
mptcp: add SNDTIMEO setsockopt support
net/mptcp/sockopt.c | 2 ++ tools/testing/selftests/bpf/prog_tests/mptcp.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1
PATCH 1/2 Squash to "bpf:selftests: add MPTCP test base"
Fix this compiling error:
TEST-OBJ [test_progs] mptcp.test.o
/home/tgl/mptcp_net-next/tools/testing/selftests/bpf/prog_tests/mptcp.c: In function ‘run_test’:
/home/tgl/mptcp_net-next/tools/testing/selftests/bpf/prog_tests/mptcp.c:63:2: error: ‘bpf_map__next’ is deprecated: libbpf v0.7+: use bpf_object__next_map() instead [-Werror=deprecated-declarations]
map = bpf_map__next(NULL, obj);
^~~
In file included from ./test_progs.h:33:0,
from /home/tgl/mptcp_net-next/tools/testing/selftests/bpf/prog_tests/mptcp.c:2:
/home/tgl/mptcp_net-next/tools/testing/selftests/bpf/tools/include/bpf/libbpf.h:685:17: note: declared here
struct bpf_map *bpf_map__next(const struct bpf_map *map, const struct bpf_object *obj);
^~~~~~~~~~~~~ cc1: all warnings being treated as errors
make: *** [Makefile:488: /home/tgl/mptcp_net-next/tools/testing/selftests/bpf/mptcp.test.o] Error 1
--- tools/testing/selftests/bpf/prog_tests/mptcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/mptcp.c +1 -1
@@ -60,7 +60,7 @@ static int run_test(int cgroup_fd, int server_fd, bool is_mptcp)return -1 ; } - map =bpf_map__next (NULL , obj); + map =bpf_object__next_map (obj,NULL ); map_fd =bpf_map__fd (map); err =bpf_prog_attach (prog_fd, cgroup_fd,BPF_CGROUP_SOCK_OPS ,0 );
Signature · 1 line
2.34.1
PATCH 2/2 mptcp: add SNDTIMEO setsockopt support
In reply to Geliang TangAdd setsockopt support for SO_SNDTIMEO_OLD and SO_SNDTIMEO_NEW to fix this error reported by the mptcp bpf selftest:
(network_helpers.c:64: errno: Operation not supported) Failed to set SO_SNDTIMEO test_mptcp:FAIL:115
All error logs:
(network_helpers.c:64: errno: Operation not supported) Failed to set SO_SNDTIMEO test_mptcp:FAIL:115
Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED
--- net/mptcp/sockopt.c | 2 ++ 1 file changed, 2 insertions(+)
net/mptcp/sockopt.c +2 -0
@@ -343,6 +343,8 @@ static int mptcp_setsockopt_sol_socket(struct mptcp_sock *msk, int optname,case SO_RCVLOWAT :case SO_RCVTIMEO_OLD :case SO_RCVTIMEO_NEW : +case SO_SNDTIMEO_OLD : +case SO_SNDTIMEO_NEW :case SO_BUSY_POLL :case SO_PREFER_BUSY_POLL :case SO_BUSY_POLL_BUDGET :
Signature · 1 line
2.34.1
Quoted 12 lines · Geliang Tang
Fix the mptcp bpf selftest build break.
Geliang Tang (2):
Squash to "bpf:selftests: add MPTCP test base"
mptcp: add SNDTIMEO setsockopt support
net/mptcp/sockopt.c| 2 ++tools/testing/selftests/bpf/prog_tests/mptcp.c| 2 +-2 files changed, 3 insertions(+), 1 deletion(-)Signature · 1 line
2.34.1
These look good for the export branch.
We did talk about SO_SNDTIMEO about a year ago:
https://lore.kernel.org/mptcp/[email protected]/
But Paolo's concern there no longer applies, because the socket option changes since then will apply the sndtimeo value to the msk instead of the first subflow.
--
Mat Martineau
Intel
Quoted 17 lines · Mat Martineau
Quoted 12 lines · Geliang Tang
Fix the mptcp bpf selftest build break.
Geliang Tang (2):
Squash to "bpf:selftests: add MPTCP test base"
mptcp: add SNDTIMEO setsockopt support
net/mptcp/sockopt.c| 2 ++tools/testing/selftests/bpf/prog_tests/mptcp.c| 2 +-2 files changed, 3 insertions(+), 1 deletion(-)Signature · 1 line
2.34.1These look good for the export branch.
Quoted 9 lines
We did talk about
SO_SNDTIMEOabout a year ago:
https://lore.kernel.org/mptcp/[email protected]/But Paolo's concern there no longer applies, because the socket option changes since then will apply the sndtimeo value to the msk instead of the first subflow.
Reviewed-by Mat Martineau <[email protected]>
Hi Matt,
When you merge the squash-to patch, could you please help me to rename the subject of the original patch from
"bpf:selftests: add MPTCP test base"
to
"bpf: selftests: add MPTCP test base"
I think it seems a little strange that there is no space after the colon. And the subject of another patch "bpf:selftests: add bpf_mptcp_sock() verifier tests" needs to be renamed too.
In addition, I want to know why these four BPF patches have stayed on the export branch for so long. Are there any functions that have not been completed yet? I wonder if I can help.
Thanks,
-Geliang
Quoted 4 lines
--
Mat Martineau
Intel
Hi Geliang,
Quoted 30 lines · Geliang Tang
Quoted 17 lines · Mat Martineau
Quoted 12 lines · Geliang Tang
Fix the mptcp bpf selftest build break.
Geliang Tang (2):
Squash to "bpf:selftests: add MPTCP test base"
mptcp: add SNDTIMEO setsockopt support
net/mptcp/sockopt.c| 2 ++tools/testing/selftests/bpf/prog_tests/mptcp.c| 2 +-2 files changed, 3 insertions(+), 1 deletion(-)Signature · 1 line
2.34.1These look good for the export branch.
Quoted 9 lines
We did talk about
SO_SNDTIMEOabout a year ago:
https://lore.kernel.org/mptcp/[email protected]/But Paolo's concern there no longer applies, because the socket option changes since then will apply the sndtimeo value to the msk instead of the first subflow.
Reviewed-by Mat Martineau <[email protected]>Hi Matt,
Quoted 8 lines
When you merge the squash-to patch, could you please help me to rename the subject of the original patch from
"bpf:selftests: add MPTCP test base"
to
"bpf: selftests: add MPTCP test base"
I think it seems a little strange that there is no space after the colon. And the subject of another patch "bpf:selftests: addbpf_mptcp_sock()verifier tests" needs to be renamed too.
I think it should even be:
selftests: bpf: (...)
I can do the modifications.
Quoted 3 lines
In addition, I want to know why these four BPF patches have stayed on the export branch for so long. Are there any functions that have not been completed yet? I wonder if I can help.
BPF maintainers also wanted a support in BTF [1]. Nicolas -- who worked on these patches up to the v3 when he was doing an internship at Tessares -- wanted to prepare a v4 addressing this comment but he was busy with his uni work.
If you have the opportunity to address comments from [1], that would be great!
[1]
https://lore.kernel.org/netdev/[email protected]/
Cheers,
Matt
Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net
Hi Geliang, Mat,
Quoted 21 lines · Mat Martineau
Quoted 6 lines · Geliang Tang
Fix the mptcp bpf selftest build break.
Geliang Tang (2):
Squash to "bpf:selftests: add MPTCP test base"
mptcp: add SNDTIMEO setsockopt supportQuoted 6 lines
net/mptcp/sockopt.c | 2 ++
tools/testing/selftests/bpf/prog_tests/mptcp.c| 2 +-2 files changed, 3 insertions(+), 1 deletion(-)--
2.34.1These look good for the export branch.
We did talk about
SO_SNDTIMEOabout a year ago:
https://lore.kernel.org/mptcp/[email protected]/
Quoted 5 lines
But Paolo's concern there no longer applies, because the socket option changes since then will apply the sndtimeo value to the msk instead of the first subflow.
Reviewed-by Mat Martineau <[email protected]>
Thank you for the patches and the reviews!
Now in our tree (feat. for net-next) with Mat's RvB tag (on patch 2/2 only):
- 9e3b7120da20: "squashed" patch 1/2 in "selftests: bpf: add MPTCP test base"
- 0cc76a0dbc16: "Signed-off-by" + "Co-developed-by"
- 0e4737981bcc: mptcp: add SNDTIMEO setsockopt support
Also renamed the title of two patches: s/bpf:selftests:/selftests: bpf:/
- e93e37b063eb: tg:msg: fix prefix order and space
- 0df242af6c98: tg:msg: fix prefix order and space
- Results: 56333e0f13bc..3484d41ff4f2
Builds and tests are now in progress:
https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220209T122329
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export
Cheers,
Matt
Signature · 2 lines
Tessares | Belgium | Hybrid Access Solutions www.tessares.net