MPTCP Linux Development
 help / color / mirror / Atom feed
* [PATCH mptcp-next v2 0/7] for bpf-next
@ 2022-05-19  8:25 Geliang Tang
  2022-05-19  8:25 ` [PATCH mptcp-next v2 1/7] bpf: add bpf_skc_to_mptcp_sock_proto Geliang Tang
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Geliang Tang @ 2022-05-19  8:25 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

v2:
 - The series is for bpf-next v5.
 - patch 1, keep bpf_mptcp_sock_from_subflow() in bpf.c
 - patch 3, Drop the 'msg' parameter of verify_sk
 - base-commit: df896c77f02a ("DO-NOT-MERGE: git markup: features
net-next-next"), export/20220517T155019
 - The last squash-to patch is for "BPF packet scheduler" series.

v1:
 - The first 10 patches is for bpf-next v5.
 - Rebased the "BPF packet scheduler" series on export branch.

Geliang Tang (6):
  bpf: add bpf_skc_to_mptcp_sock_proto
  selftests/bpf: Enable CONFIG_IKCONFIG_PROC in config
  selftests/bpf: test bpf_skc_to_mptcp_sock
  selftests/bpf: verify token of struct mptcp_sock
  selftests/bpf: verify ca_name of struct mptcp_sock
  selftests/bpf: verify first of struct mptcp_sock

Nicolas Rybowski (1):
  selftests/bpf: add MPTCP test base

 MAINTAINERS                                   |   1 +
 include/linux/bpf.h                           |   1 +
 include/linux/btf_ids.h                       |   3 +-
 include/net/mptcp.h                           |   6 +
 include/uapi/linux/bpf.h                      |   7 +
 kernel/bpf/verifier.c                         |   1 +
 kernel/trace/bpf_trace.c                      |   2 +
 net/core/filter.c                             |  18 ++
 net/mptcp/Makefile                            |   2 +
 net/mptcp/bpf.c                               |  21 +++
 scripts/bpf_doc.py                            |   2 +
 tools/include/uapi/linux/bpf.h                |   7 +
 tools/testing/selftests/bpf/bpf_tcp_helpers.h |  13 ++
 tools/testing/selftests/bpf/config            |   3 +
 tools/testing/selftests/bpf/network_helpers.c |  40 +++-
 tools/testing/selftests/bpf/network_helpers.h |   2 +
 .../testing/selftests/bpf/prog_tests/mptcp.c  | 174 ++++++++++++++++++
 .../testing/selftests/bpf/progs/mptcp_sock.c  |  89 +++++++++
 18 files changed, 382 insertions(+), 10 deletions(-)
 create mode 100644 net/mptcp/bpf.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/mptcp.c
 create mode 100644 tools/testing/selftests/bpf/progs/mptcp_sock.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first test"
@ 2022-06-09  5:23 Geliang Tang
  2022-06-09  6:46 ` Squash to "selftests/bpf: Add bpf_first test": Tests Results MPTCP CI
  0 siblings, 1 reply; 13+ messages in thread
From: Geliang Tang @ 2022-06-09  5:23 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

A small cleanup, separate the code of base subtest and sched subtest, do
not mix them together.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/bpf/prog_tests/mptcp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 9f3242c7920a..8426a5aba721 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -15,9 +15,6 @@
 #define TCP_CA_NAME_MAX	16
 #endif
 
-#define ADDR_1	"10.0.1.1"
-#define ADDR_2	"10.0.1.2"
-
 struct mptcp_storage {
 	__u32 invoked;
 	__u32 is_mptcp;
@@ -27,9 +24,6 @@ struct mptcp_storage {
 	char ca_name[TCP_CA_NAME_MAX];
 };
 
-static const unsigned int total_bytes = 10 * 1024 * 1024;
-static int stop, duration;
-
 static int verify_tsk(int map_fd, int client_fd)
 {
 	int err, cfd = client_fd;
@@ -177,6 +171,9 @@ static void test_base(void)
 	close(cgroup_fd);
 }
 
+static const unsigned int total_bytes = 10 * 1024 * 1024;
+static int stop, duration;
+
 static void *server(void *arg)
 {
 	int lfd = (int)(long)arg, err = 0, fd;
@@ -256,6 +253,9 @@ static void send_data(int lfd, int fd)
 	      PTR_ERR(thread_ret));
 }
 
+#define ADDR_1	"10.0.1.1"
+#define ADDR_2	"10.0.1.2"
+
 static void sched_init(char *flags, char *sched)
 {
 	char cmd[64];
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH mptcp-next] Squash to "selftests/bpf: add bpf_first test"
@ 2022-05-17  7:43 Geliang Tang
  2022-05-17  8:06 ` Squash to "selftests/bpf: add bpf_first test": Tests Results MPTCP CI
  0 siblings, 1 reply; 13+ messages in thread
From: Geliang Tang @ 2022-05-17  7:43 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

Drop connect_to_mptcp_fd

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/bpf/prog_tests/mptcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index d9e6dec32bfe..fd42e22d5e7d 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -315,7 +315,7 @@ static void test_first(void)
 
 	system("sysctl -qw net.mptcp.scheduler=bpf_first");
 	server_fd = start_mptcp_server(AF_INET, NULL, 0, 0);
-	client_fd = connect_to_mptcp_fd(server_fd, 0);
+	client_fd = connect_to_fd(server_fd, 0);
 
 	send_data(server_fd, client_fd);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-06-09  6:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-19  8:25 [PATCH mptcp-next v2 0/7] for bpf-next Geliang Tang
2022-05-19  8:25 ` [PATCH mptcp-next v2 1/7] bpf: add bpf_skc_to_mptcp_sock_proto Geliang Tang
2022-05-19  8:25 ` [PATCH mptcp-next v2 2/7] selftests/bpf: Enable CONFIG_IKCONFIG_PROC in config Geliang Tang
2022-05-19  8:25 ` [PATCH mptcp-next v2 3/7] selftests/bpf: add MPTCP test base Geliang Tang
2022-05-19  8:25 ` [PATCH mptcp-next v2 4/7] selftests/bpf: test bpf_skc_to_mptcp_sock Geliang Tang
2022-05-19  8:25 ` [PATCH mptcp-next v2 5/7] selftests/bpf: verify token of struct mptcp_sock Geliang Tang
2022-05-19  8:25 ` [PATCH mptcp-next v2 6/7] selftests/bpf: verify ca_name " Geliang Tang
2022-05-19  8:25 ` [PATCH mptcp-next v2 7/7] selftests/bpf: verify first " Geliang Tang
2022-05-19  8:25 ` [PATCH mptcp-next v2] Squash to "selftests/bpf: add bpf_first test" Geliang Tang
2022-05-19 10:49   ` Squash to "selftests/bpf: add bpf_first test": Tests Results MPTCP CI
2022-05-19 14:12 ` [PATCH mptcp-next v2 0/7] for bpf-next Matthieu Baerts
  -- strict thread matches above, loose matches on Subject: below --
2022-06-09  5:23 [PATCH mptcp-next] Squash to "selftests/bpf: Add bpf_first test" Geliang Tang
2022-06-09  6:46 ` Squash to "selftests/bpf: Add bpf_first test": Tests Results MPTCP CI
2022-05-17  7:43 [PATCH mptcp-next] Squash to "selftests/bpf: add bpf_first test" Geliang Tang
2022-05-17  8:06 ` Squash to "selftests/bpf: add bpf_first test": Tests Results MPTCP CI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox