All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock"
@ 2022-05-10  4:23 Geliang Tang
  2022-05-10  4:23 ` [PATCH mptcp-next] Squash to "selftests/bpf: add bpf_first scheduler" Geliang Tang
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Geliang Tang @ 2022-05-10  4:23 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

Drop bpf_mptcp_helpers.h, squash into bpf_tcp_helpers.h (Andrii)

1

CONFLICT (modify/delete): tools/testing/selftests/bpf/bpf_mptcp_helpers.h deleted in HEAD and modified in 8996b41ffcd2 (selftests/bpf: verify token of struct mptcp_sock).  Version 8996b41ffcd2 (selftests/bpf: verify token of struct mptcp_sock) of tools/testing/selftests/bpf/bpf_mptcp_helpers.h left in tree.
Auto-merging tools/testing/selftests/bpf/progs/mptcp_sock.c
error: could not apply 8996b41ffcd2... selftests/bpf: verify token of struct mptcp_sock

cat tools/testing/selftests/bpf/bpf_tcp_helpers.h:

'''
extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;

struct mptcp_sock {
	struct inet_connection_sock	sk;

	__u32		token;
} __attribute__((preserve_access_index));

'''

git add tools/testing/selftests/bpf/bpf_tcp_helpers.h
git rm tools/testing/selftests/bpf/bpf_mptcp_helpers.h

2

CONFLICT (modify/delete): tools/testing/selftests/bpf/bpf_mptcp_helpers.h deleted in HEAD and modified in 57dcfb6f61ec (selftests/bpf: verify ca_name of struct mptcp_sock).  Version 57dcfb6f61ec (selftests/bpf: verify ca_name of struct mptcp_sock) of tools/testing/selftests/bpf/bpf_mptcp_helpers.h left in tree.
Auto-merging tools/testing/selftests/bpf/bpf_tcp_helpers.h
Auto-merging tools/testing/selftests/bpf/progs/mptcp_sock.c
error: could not apply 57dcfb6f61ec... selftests/bpf: verify ca_name of struct mptcp_sock

cat tools/testing/selftests/bpf/bpf_tcp_helpers.h:

'''
extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;

struct mptcp_sock {
	struct inet_connection_sock	sk;

	__u32		token;
	char		ca_name[TCP_CA_NAME_MAX];
} __attribute__((preserve_access_index));

'''

git add tools/testing/selftests/bpf/bpf_tcp_helpers.h
git rm tools/testing/selftests/bpf/bpf_mptcp_helpers.h

3

CONFLICT (modify/delete): tools/testing/selftests/bpf/bpf_mptcp_helpers.h deleted in HEAD and modified in 416cb433f1df (selftests/bpf: verify first of struct mptcp_sock).  Version 416cb433f1df (selftests/bpf: verify first of struct mptcp_sock) of tools/testing/selftests/bpf/bpf_mptcp_helpers.h left in tree.
Auto-merging tools/testing/selftests/bpf/progs/mptcp_sock.c
error: could not apply 416cb433f1df... selftests/bpf: verify first of struct mptcp_sock

cat tools/testing/selftests/bpf/bpf_tcp_helpers.h:

'''
extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;

struct mptcp_sock {
	struct inet_connection_sock	sk;

	__u32		token;
	struct sock	*first;
	char		ca_name[TCP_CA_NAME_MAX];
} __attribute__((preserve_access_index));

'''

git add tools/testing/selftests/bpf/bpf_tcp_helpers.h
git rm tools/testing/selftests/bpf/bpf_mptcp_helpers.h

4

CONFLICT (modify/delete): tools/testing/selftests/bpf/bpf_mptcp_helpers.h deleted in HEAD and modified in 74d3c74494e6 (mptcp: add struct mptcp_sched_ops).  Version 74d3c74494e6 (mptcp: add struct mptcp_sched_ops) of tools/testing/selftests/bpf/bpf_mptcp_helpers.h left in tree.
error: could not apply 74d3c74494e6... mptcp: add struct mptcp_sched_ops

cat tools/testing/selftests/bpf/bpf_tcp_helpers.h:

'''
extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;

struct mptcp_sched_data {
	struct sock	*sock;
	bool		call_again;
};

struct mptcp_sched_ops {
	char name[MPTCP_SCHED_NAME_MAX];

	void (*init)(const struct mptcp_sock *msk);
	void (*release)(const struct mptcp_sock *msk);

	void (*get_subflow)(const struct mptcp_sock *msk, bool reinject,
			    struct mptcp_sched_data *data);
	void *owner;
};

struct mptcp_sock {
	struct inet_connection_sock	sk;

	__u32		token;
	struct sock	*first;
	char		ca_name[TCP_CA_NAME_MAX];
} __attribute__((preserve_access_index));

'''

git add tools/testing/selftests/bpf/bpf_tcp_helpers.h
git rm tools/testing/selftests/bpf/bpf_mptcp_helpers.h

5

CONFLICT (modify/delete): tools/testing/selftests/bpf/bpf_mptcp_helpers.h deleted in HEAD and modified in 1b3d7a5f1f10 (mptcp: add sched in mptcp_sock).  Version 1b3d7a5f1f10 (mptcp: add sched in mptcp_sock) of tools/testing/selftests/bpf/bpf_mptcp_helpers.h left in tree.
error: could not apply 1b3d7a5f1f10... mptcp: add sched in mptcp_sock

cat tools/testing/selftests/bpf/bpf_tcp_helpers.h:

'''
extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;

struct mptcp_sched_data {
	struct sock	*sock;
	bool		call_again;
};

struct mptcp_sched_ops {
	char name[MPTCP_SCHED_NAME_MAX];

	void (*init)(const struct mptcp_sock *msk);
	void (*release)(const struct mptcp_sock *msk);

	void (*get_subflow)(const struct mptcp_sock *msk, bool reinject,
			    struct mptcp_sched_data *data);
	void *owner;
};

struct mptcp_sock {
	struct inet_connection_sock	sk;

	__u32		token;
	struct sock	*first;
	struct mptcp_sched_ops *sched;
	char		ca_name[TCP_CA_NAME_MAX];
} __attribute__((preserve_access_index));

'''

git add tools/testing/selftests/bpf/bpf_tcp_helpers.h
git rm tools/testing/selftests/bpf/bpf_mptcp_helpers.h

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 MAINTAINERS                                     |  1 -
 tools/testing/selftests/bpf/bpf_mptcp_helpers.h | 14 --------------
 tools/testing/selftests/bpf/bpf_tcp_helpers.h   |  5 +++++
 tools/testing/selftests/bpf/progs/mptcp_sock.c  |  2 +-
 4 files changed, 6 insertions(+), 16 deletions(-)
 delete mode 100644 tools/testing/selftests/bpf/bpf_mptcp_helpers.h

diff --git a/MAINTAINERS b/MAINTAINERS
index af0d6a8543f6..56f5dd17859b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13787,7 +13787,6 @@ F:	include/net/mptcp.h
 F:	include/trace/events/mptcp.h
 F:	include/uapi/linux/mptcp.h
 F:	net/mptcp/
-F:	tools/testing/selftests/bpf/bpf_mptcp_helpers.h
 F:	tools/testing/selftests/bpf/*/*mptcp*.c
 F:	tools/testing/selftests/net/mptcp/
 
diff --git a/tools/testing/selftests/bpf/bpf_mptcp_helpers.h b/tools/testing/selftests/bpf/bpf_mptcp_helpers.h
deleted file mode 100644
index 18da4cc65e89..000000000000
--- a/tools/testing/selftests/bpf/bpf_mptcp_helpers.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (c) 2022, SUSE. */
-
-#ifndef __BPF_MPTCP_HELPERS_H
-#define __BPF_MPTCP_HELPERS_H
-
-#include "bpf_tcp_helpers.h"
-
-struct mptcp_sock {
-	struct inet_connection_sock	sk;
-
-} __attribute__((preserve_access_index));
-
-#endif
diff --git a/tools/testing/selftests/bpf/bpf_tcp_helpers.h b/tools/testing/selftests/bpf/bpf_tcp_helpers.h
index b1ede6f0b821..a43b1afe22bd 100644
--- a/tools/testing/selftests/bpf/bpf_tcp_helpers.h
+++ b/tools/testing/selftests/bpf/bpf_tcp_helpers.h
@@ -225,4 +225,9 @@ static __always_inline bool tcp_cc_eq(const char *a, const char *b)
 extern __u32 tcp_slow_start(struct tcp_sock *tp, __u32 acked) __ksym;
 extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;
 
+struct mptcp_sock {
+	struct inet_connection_sock	sk;
+
+} __attribute__((preserve_access_index));
+
 #endif
diff --git a/tools/testing/selftests/bpf/progs/mptcp_sock.c b/tools/testing/selftests/bpf/progs/mptcp_sock.c
index 9552584b1b6c..dd2448d1e7fc 100644
--- a/tools/testing/selftests/bpf/progs/mptcp_sock.c
+++ b/tools/testing/selftests/bpf/progs/mptcp_sock.c
@@ -4,7 +4,7 @@
 
 #include <linux/bpf.h>
 #include <bpf/bpf_helpers.h>
-#include "bpf_mptcp_helpers.h"
+#include "bpf_tcp_helpers.h"
 
 char _license[] SEC("license") = "GPL";
 extern bool CONFIG_MPTCP __kconfig;
-- 
2.34.1


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

* [PATCH mptcp-next] Squash to "selftests/bpf: add bpf_first scheduler"
  2022-05-10  4:23 [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock" Geliang Tang
@ 2022-05-10  4:23 ` Geliang Tang
  2022-05-10  6:48   ` Squash to "selftests/bpf: add bpf_first scheduler": Tests Results MPTCP CI
  2022-05-10 23:03 ` [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock" Mat Martineau
  2022-05-14 11:12 ` Matthieu Baerts
  2 siblings, 1 reply; 10+ messages in thread
From: Geliang Tang @ 2022-05-10  4:23 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

bpf_mptcp_helpers.h is dropped, include bpf_tcp_helpers.h, instead of
bpf_mptcp_helpers.h.

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

diff --git a/tools/testing/selftests/bpf/progs/mptcp_bpf_first.c b/tools/testing/selftests/bpf/progs/mptcp_bpf_first.c
index 8c8acf04fb92..fd67b5f42964 100644
--- a/tools/testing/selftests/bpf/progs/mptcp_bpf_first.c
+++ b/tools/testing/selftests/bpf/progs/mptcp_bpf_first.c
@@ -2,7 +2,7 @@
 /* Copyright (c) 2022, SUSE. */
 
 #include <linux/bpf.h>
-#include "bpf_mptcp_helpers.h"
+#include "bpf_tcp_helpers.h"
 
 char _license[] SEC("license") = "GPL";
 
-- 
2.34.1


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

* Re: Squash to "selftests/bpf: add bpf_first scheduler": Tests Results
  2022-05-10  4:23 ` [PATCH mptcp-next] Squash to "selftests/bpf: add bpf_first scheduler" Geliang Tang
@ 2022-05-10  6:48   ` MPTCP CI
  0 siblings, 0 replies; 10+ messages in thread
From: MPTCP CI @ 2022-05-10  6:48 UTC (permalink / raw)
  To: Geliang Tang; +Cc: mptcp

Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal:
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/5511172811128832
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/5511172811128832/summary/summary.txt

- KVM Validation: debug:
  - Unstable: 3 failed test(s): packetdrill_add_addr selftest_diag selftest_mptcp_join 🔴:
  - Task: https://cirrus-ci.com/task/5055882319888384
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/5055882319888384/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/c6fbed8a275d


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-debug

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)

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

* Re: [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock"
  2022-05-10  4:23 [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock" Geliang Tang
  2022-05-10  4:23 ` [PATCH mptcp-next] Squash to "selftests/bpf: add bpf_first scheduler" Geliang Tang
@ 2022-05-10 23:03 ` Mat Martineau
  2022-05-14 10:05   ` Matthieu Baerts
  2022-05-14 11:12 ` Matthieu Baerts
  2 siblings, 1 reply; 10+ messages in thread
From: Mat Martineau @ 2022-05-10 23:03 UTC (permalink / raw)
  To: Geliang Tang, Matthieu Baerts; +Cc: mptcp

On Tue, 10 May 2022, Geliang Tang wrote:

> Drop bpf_mptcp_helpers.h, squash into bpf_tcp_helpers.h (Andrii)

Hi Geliang -

Since there are 6 different commits touching bpf_mptcp_helpers.h, maybe it 
would be easier for Matthieu if you posted the full patches for 
"selftests/bpf: test bpf_skc_to_mptcp_sock" and all the bpf patches after 
that, instead of squash changes / instructions?

I'm not sure the instructions below translate well to topgit.

- Mat

>
> 1
>
> CONFLICT (modify/delete): tools/testing/selftests/bpf/bpf_mptcp_helpers.h deleted in HEAD and modified in 8996b41ffcd2 (selftests/bpf: verify token of struct mptcp_sock).  Version 8996b41ffcd2 (selftests/bpf: verify token of struct mptcp_sock) of tools/testing/selftests/bpf/bpf_mptcp_helpers.h left in tree.
> Auto-merging tools/testing/selftests/bpf/progs/mptcp_sock.c
> error: could not apply 8996b41ffcd2... selftests/bpf: verify token of struct mptcp_sock
>
> cat tools/testing/selftests/bpf/bpf_tcp_helpers.h:
>
> '''
> extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;
>
> struct mptcp_sock {
> 	struct inet_connection_sock	sk;
>
> 	__u32		token;
> } __attribute__((preserve_access_index));
>
> '''
>
> git add tools/testing/selftests/bpf/bpf_tcp_helpers.h
> git rm tools/testing/selftests/bpf/bpf_mptcp_helpers.h
>
> 2
>
> CONFLICT (modify/delete): tools/testing/selftests/bpf/bpf_mptcp_helpers.h deleted in HEAD and modified in 57dcfb6f61ec (selftests/bpf: verify ca_name of struct mptcp_sock).  Version 57dcfb6f61ec (selftests/bpf: verify ca_name of struct mptcp_sock) of tools/testing/selftests/bpf/bpf_mptcp_helpers.h left in tree.
> Auto-merging tools/testing/selftests/bpf/bpf_tcp_helpers.h
> Auto-merging tools/testing/selftests/bpf/progs/mptcp_sock.c
> error: could not apply 57dcfb6f61ec... selftests/bpf: verify ca_name of struct mptcp_sock
>
> cat tools/testing/selftests/bpf/bpf_tcp_helpers.h:
>
> '''
> extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;
>
> struct mptcp_sock {
> 	struct inet_connection_sock	sk;
>
> 	__u32		token;
> 	char		ca_name[TCP_CA_NAME_MAX];
> } __attribute__((preserve_access_index));
>
> '''
>
> git add tools/testing/selftests/bpf/bpf_tcp_helpers.h
> git rm tools/testing/selftests/bpf/bpf_mptcp_helpers.h
>
> 3
>
> CONFLICT (modify/delete): tools/testing/selftests/bpf/bpf_mptcp_helpers.h deleted in HEAD and modified in 416cb433f1df (selftests/bpf: verify first of struct mptcp_sock).  Version 416cb433f1df (selftests/bpf: verify first of struct mptcp_sock) of tools/testing/selftests/bpf/bpf_mptcp_helpers.h left in tree.
> Auto-merging tools/testing/selftests/bpf/progs/mptcp_sock.c
> error: could not apply 416cb433f1df... selftests/bpf: verify first of struct mptcp_sock
>
> cat tools/testing/selftests/bpf/bpf_tcp_helpers.h:
>
> '''
> extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;
>
> struct mptcp_sock {
> 	struct inet_connection_sock	sk;
>
> 	__u32		token;
> 	struct sock	*first;
> 	char		ca_name[TCP_CA_NAME_MAX];
> } __attribute__((preserve_access_index));
>
> '''
>
> git add tools/testing/selftests/bpf/bpf_tcp_helpers.h
> git rm tools/testing/selftests/bpf/bpf_mptcp_helpers.h
>
> 4
>
> CONFLICT (modify/delete): tools/testing/selftests/bpf/bpf_mptcp_helpers.h deleted in HEAD and modified in 74d3c74494e6 (mptcp: add struct mptcp_sched_ops).  Version 74d3c74494e6 (mptcp: add struct mptcp_sched_ops) of tools/testing/selftests/bpf/bpf_mptcp_helpers.h left in tree.
> error: could not apply 74d3c74494e6... mptcp: add struct mptcp_sched_ops
>
> cat tools/testing/selftests/bpf/bpf_tcp_helpers.h:
>
> '''
> extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;
>
> struct mptcp_sched_data {
> 	struct sock	*sock;
> 	bool		call_again;
> };
>
> struct mptcp_sched_ops {
> 	char name[MPTCP_SCHED_NAME_MAX];
>
> 	void (*init)(const struct mptcp_sock *msk);
> 	void (*release)(const struct mptcp_sock *msk);
>
> 	void (*get_subflow)(const struct mptcp_sock *msk, bool reinject,
> 			    struct mptcp_sched_data *data);
> 	void *owner;
> };
>
> struct mptcp_sock {
> 	struct inet_connection_sock	sk;
>
> 	__u32		token;
> 	struct sock	*first;
> 	char		ca_name[TCP_CA_NAME_MAX];
> } __attribute__((preserve_access_index));
>
> '''
>
> git add tools/testing/selftests/bpf/bpf_tcp_helpers.h
> git rm tools/testing/selftests/bpf/bpf_mptcp_helpers.h
>
> 5
>
> CONFLICT (modify/delete): tools/testing/selftests/bpf/bpf_mptcp_helpers.h deleted in HEAD and modified in 1b3d7a5f1f10 (mptcp: add sched in mptcp_sock).  Version 1b3d7a5f1f10 (mptcp: add sched in mptcp_sock) of tools/testing/selftests/bpf/bpf_mptcp_helpers.h left in tree.
> error: could not apply 1b3d7a5f1f10... mptcp: add sched in mptcp_sock
>
> cat tools/testing/selftests/bpf/bpf_tcp_helpers.h:
>
> '''
> extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;
>
> struct mptcp_sched_data {
> 	struct sock	*sock;
> 	bool		call_again;
> };
>
> struct mptcp_sched_ops {
> 	char name[MPTCP_SCHED_NAME_MAX];
>
> 	void (*init)(const struct mptcp_sock *msk);
> 	void (*release)(const struct mptcp_sock *msk);
>
> 	void (*get_subflow)(const struct mptcp_sock *msk, bool reinject,
> 			    struct mptcp_sched_data *data);
> 	void *owner;
> };
>
> struct mptcp_sock {
> 	struct inet_connection_sock	sk;
>
> 	__u32		token;
> 	struct sock	*first;
> 	struct mptcp_sched_ops *sched;
> 	char		ca_name[TCP_CA_NAME_MAX];
> } __attribute__((preserve_access_index));
>
> '''
>
> git add tools/testing/selftests/bpf/bpf_tcp_helpers.h
> git rm tools/testing/selftests/bpf/bpf_mptcp_helpers.h
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> MAINTAINERS                                     |  1 -
> tools/testing/selftests/bpf/bpf_mptcp_helpers.h | 14 --------------
> tools/testing/selftests/bpf/bpf_tcp_helpers.h   |  5 +++++
> tools/testing/selftests/bpf/progs/mptcp_sock.c  |  2 +-
> 4 files changed, 6 insertions(+), 16 deletions(-)
> delete mode 100644 tools/testing/selftests/bpf/bpf_mptcp_helpers.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index af0d6a8543f6..56f5dd17859b 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -13787,7 +13787,6 @@ F:	include/net/mptcp.h
> F:	include/trace/events/mptcp.h
> F:	include/uapi/linux/mptcp.h
> F:	net/mptcp/
> -F:	tools/testing/selftests/bpf/bpf_mptcp_helpers.h
> F:	tools/testing/selftests/bpf/*/*mptcp*.c
> F:	tools/testing/selftests/net/mptcp/
>
> diff --git a/tools/testing/selftests/bpf/bpf_mptcp_helpers.h b/tools/testing/selftests/bpf/bpf_mptcp_helpers.h
> deleted file mode 100644
> index 18da4cc65e89..000000000000
> --- a/tools/testing/selftests/bpf/bpf_mptcp_helpers.h
> +++ /dev/null
> @@ -1,14 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -/* Copyright (c) 2022, SUSE. */
> -
> -#ifndef __BPF_MPTCP_HELPERS_H
> -#define __BPF_MPTCP_HELPERS_H
> -
> -#include "bpf_tcp_helpers.h"
> -
> -struct mptcp_sock {
> -	struct inet_connection_sock	sk;
> -
> -} __attribute__((preserve_access_index));
> -
> -#endif
> diff --git a/tools/testing/selftests/bpf/bpf_tcp_helpers.h b/tools/testing/selftests/bpf/bpf_tcp_helpers.h
> index b1ede6f0b821..a43b1afe22bd 100644
> --- a/tools/testing/selftests/bpf/bpf_tcp_helpers.h
> +++ b/tools/testing/selftests/bpf/bpf_tcp_helpers.h
> @@ -225,4 +225,9 @@ static __always_inline bool tcp_cc_eq(const char *a, const char *b)
> extern __u32 tcp_slow_start(struct tcp_sock *tp, __u32 acked) __ksym;
> extern void tcp_cong_avoid_ai(struct tcp_sock *tp, __u32 w, __u32 acked) __ksym;
>
> +struct mptcp_sock {
> +	struct inet_connection_sock	sk;
> +
> +} __attribute__((preserve_access_index));
> +
> #endif
> diff --git a/tools/testing/selftests/bpf/progs/mptcp_sock.c b/tools/testing/selftests/bpf/progs/mptcp_sock.c
> index 9552584b1b6c..dd2448d1e7fc 100644
> --- a/tools/testing/selftests/bpf/progs/mptcp_sock.c
> +++ b/tools/testing/selftests/bpf/progs/mptcp_sock.c
> @@ -4,7 +4,7 @@
>
> #include <linux/bpf.h>
> #include <bpf/bpf_helpers.h>
> -#include "bpf_mptcp_helpers.h"
> +#include "bpf_tcp_helpers.h"
>
> char _license[] SEC("license") = "GPL";
> extern bool CONFIG_MPTCP __kconfig;
> -- 
> 2.34.1
>
>
>

--
Mat Martineau
Intel

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

* Re: [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock"
  2022-05-10 23:03 ` [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock" Mat Martineau
@ 2022-05-14 10:05   ` Matthieu Baerts
  2022-05-16 22:56     ` Mat Martineau
  0 siblings, 1 reply; 10+ messages in thread
From: Matthieu Baerts @ 2022-05-14 10:05 UTC (permalink / raw)
  To: Mat Martineau, Geliang Tang; +Cc: mptcp

Hi Mat, Geliang,

On 11/05/2022 01:03, Mat Martineau wrote:
> On Tue, 10 May 2022, Geliang Tang wrote:
> 
>> Drop bpf_mptcp_helpers.h, squash into bpf_tcp_helpers.h (Andrii)

Thank you for the patch!

> Hi Geliang -
> 
> Since there are 6 different commits touching bpf_mptcp_helpers.h, maybe
> it would be easier for Matthieu if you posted the full patches for
> "selftests/bpf: test bpf_skc_to_mptcp_sock" and all the bpf patches
> after that, instead of squash changes / instructions?
> 
> I'm not sure the instructions below translate well to topgit.

Sorry for the late reply. In fact, I prefer to get squash-to patches
instead of reworded patches where I need to find differences :-)

If there are conflicts, I'm usually fine with some explanations in the
commit message. Here, the conflicts are easy to resolve: just move the
content of one file to another one. For these conflicts, I don't even
need the detailed instructions but that's always useful, just in case.

If the conflicts are harder to resolve, sharing a Git branch on a public
repo is an easy way for me to compare the resolution I did with the
expected one.

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

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

* Re: [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock"
  2022-05-10  4:23 [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock" Geliang Tang
  2022-05-10  4:23 ` [PATCH mptcp-next] Squash to "selftests/bpf: add bpf_first scheduler" Geliang Tang
  2022-05-10 23:03 ` [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock" Mat Martineau
@ 2022-05-14 11:12 ` Matthieu Baerts
  2 siblings, 0 replies; 10+ messages in thread
From: Matthieu Baerts @ 2022-05-14 11:12 UTC (permalink / raw)
  To: Geliang Tang, mptcp

Hi Geliang, Mat,

On 10/05/2022 06:23, Geliang Tang wrote:
> Drop bpf_mptcp_helpers.h, squash into bpf_tcp_helpers.h (Andrii)

Just applied (with some delay, sorry) in our tree:

- fea9321e0256: "squashed" in "selftests/bpf: test bpf_skc_to_mptcp_sock"
- fce3bccb2cda: conflict in
t/selftests-bpf-verify-token-of-struct-mptcp_sock
- 9dcaed2c0d9e: conflict in
t/selftests-bpf-verify-ca_name-of-struct-mptcp_sock
- bc1ecc2ce851: conflict in
t/selftests-bpf-verify-first-of-struct-mptcp_sock
- e25640bd2a45: conflict in t/mptcp-add-struct-mptcp_sched_ops
- 5f43144bcb9b: conflict in t/mptcp-add-sched-in-mptcp_sock

ChangeLog have been updated soon.

I'm syncing with the v4 Mat sent yesterday, I will update the "export"
branch just after.

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

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

* Re: [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock"
  2022-05-14 10:05   ` Matthieu Baerts
@ 2022-05-16 22:56     ` Mat Martineau
  0 siblings, 0 replies; 10+ messages in thread
From: Mat Martineau @ 2022-05-16 22:56 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: Geliang Tang, mptcp

On Sat, 14 May 2022, Matthieu Baerts wrote:

> Hi Mat, Geliang,
>
> On 11/05/2022 01:03, Mat Martineau wrote:
>> On Tue, 10 May 2022, Geliang Tang wrote:
>>
>>> Drop bpf_mptcp_helpers.h, squash into bpf_tcp_helpers.h (Andrii)
>
> Thank you for the patch!
>
>> Hi Geliang -
>>
>> Since there are 6 different commits touching bpf_mptcp_helpers.h, maybe
>> it would be easier for Matthieu if you posted the full patches for
>> "selftests/bpf: test bpf_skc_to_mptcp_sock" and all the bpf patches
>> after that, instead of squash changes / instructions?
>>
>> I'm not sure the instructions below translate well to topgit.
>
> Sorry for the late reply. In fact, I prefer to get squash-to patches
> instead of reworded patches where I need to find differences :-)
>

Noted, I should have spoken for myself :)

I was hoping you would not need to find any differences if the old patches 
were dropped in favor of a fresh import of the new ones, but I was 
making a lot of assumptions there.

> If there are conflicts, I'm usually fine with some explanations in the
> commit message. Here, the conflicts are easy to resolve: just move the
> content of one file to another one. For these conflicts, I don't even
> need the detailed instructions but that's always useful, just in case.
>
> If the conflicts are harder to resolve, sharing a Git branch on a public
> repo is an easy way for me to compare the resolution I did with the
> expected one.

I do agree this is the best thing to do in general.


--
Mat Martineau
Intel

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

* [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock"
  2022-05-17  7:43 [PATCH mptcp-next] Squash to "bpf: add bpf_skc_to_mptcp_sock_proto" Geliang Tang
@ 2022-05-17  7:43 ` Geliang Tang
  0 siblings, 0 replies; 10+ messages in thread
From: Geliang Tang @ 2022-05-17  7:43 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

Drop CONFIG_MPTCP (Martin)
Use ASSERT_EQ (Andrii)

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/bpf/prog_tests/mptcp.c | 12 ++----------
 tools/testing/selftests/bpf/progs/mptcp_sock.c |  4 ----
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c
index 6cfb29399989..6f333e3aba9c 100644
--- a/tools/testing/selftests/bpf/prog_tests/mptcp.c
+++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c
@@ -14,7 +14,6 @@ struct mptcp_storage {
 
 static int verify_tsk(int map_fd, int client_fd)
 {
-	char *msg = "plain TCP socket";
 	int err, cfd = client_fd;
 	struct mptcp_storage val;
 
@@ -33,7 +32,6 @@ static int verify_tsk(int map_fd, int client_fd)
 
 static int verify_msk(int map_fd, int client_fd)
 {
-	char *msg = "MPTCP subflow socket";
 	int err, cfd = client_fd;
 	struct mptcp_storage val;
 
@@ -41,17 +39,11 @@ static int verify_msk(int map_fd, int client_fd)
 	if (!ASSERT_OK(err, "bpf_map_lookup_elem"))
 		return err;
 
-	if (val.invoked != 1) {
-		log_err("%s: unexpected invoked count %d != 1",
-			msg, val.invoked);
+	if (!ASSERT_EQ(val.invoked, 1, "unexpected invoked count"))
 		err++;
-	}
 
-	if (val.is_mptcp != 1) {
-		log_err("%s: unexpected bpf_tcp_sock.is_mptcp %d != 1",
-			msg, val.is_mptcp);
+	if (!ASSERT_EQ(val.is_mptcp, 1, "unexpected is_mptcp"))
 		err++;
-	}
 
 	return err;
 }
diff --git a/tools/testing/selftests/bpf/progs/mptcp_sock.c b/tools/testing/selftests/bpf/progs/mptcp_sock.c
index 3feb7ff578e2..dc73b3fbb50b 100644
--- a/tools/testing/selftests/bpf/progs/mptcp_sock.c
+++ b/tools/testing/selftests/bpf/progs/mptcp_sock.c
@@ -7,7 +7,6 @@
 #include "bpf_tcp_helpers.h"
 
 char _license[] SEC("license") = "GPL";
-extern bool CONFIG_MPTCP __kconfig;
 
 struct mptcp_storage {
 	__u32 invoked;
@@ -49,9 +48,6 @@ int _sockops(struct bpf_sock_ops *ctx)
 		if (!storage)
 			return 1;
 	} else {
-		if (!CONFIG_MPTCP)
-			return 1;
-
 		msk = bpf_skc_to_mptcp_sock(sk);
 		if (!msk)
 			return 1;
-- 
2.34.1


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

* Re: [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock"
  2022-05-16  5:50 Geliang Tang
@ 2022-05-16 16:25 ` Matthieu Baerts
  0 siblings, 0 replies; 10+ messages in thread
From: Matthieu Baerts @ 2022-05-16 16:25 UTC (permalink / raw)
  To: Geliang Tang, mptcp

Hi Geliang,

On 16/05/2022 07:50, Geliang Tang wrote:
> Fix mptcp bpf tests failures on export/20220514T172044.

Oops, good catch!

Now in our tree!

- 6aaf2c9e55dd: "squashed" in "selftests/bpf: test bpf_skc_to_mptcp_sock"
- Results: cd3c57373965..c53189ad917e (export)

Builds and tests are now in progress:



https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220516T162419

https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

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

* [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock"
@ 2022-05-16  5:50 Geliang Tang
  2022-05-16 16:25 ` Matthieu Baerts
  0 siblings, 1 reply; 10+ messages in thread
From: Geliang Tang @ 2022-05-16  5:50 UTC (permalink / raw)
  To: mptcp; +Cc: Geliang Tang

Fix mptcp bpf tests failures on export/20220514T172044.

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

diff --git a/tools/testing/selftests/bpf/progs/mptcp_sock.c b/tools/testing/selftests/bpf/progs/mptcp_sock.c
index 25e1c8e6f905..ab135edf3ae3 100644
--- a/tools/testing/selftests/bpf/progs/mptcp_sock.c
+++ b/tools/testing/selftests/bpf/progs/mptcp_sock.c
@@ -48,7 +48,7 @@ int _sockops(struct bpf_sock_ops *ctx)
 		return 1;
 
 	is_mptcp = bpf_core_field_exists(tsk->is_mptcp) ? tsk->is_mptcp : 0;
-	if (is_mptcp) {
+	if (!is_mptcp) {
 		storage = bpf_sk_storage_get(&socket_storage_map, sk, 0,
 					     BPF_SK_STORAGE_GET_F_CREATE);
 		if (!storage)
-- 
2.34.1


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

end of thread, other threads:[~2022-05-17  7:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10  4:23 [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock" Geliang Tang
2022-05-10  4:23 ` [PATCH mptcp-next] Squash to "selftests/bpf: add bpf_first scheduler" Geliang Tang
2022-05-10  6:48   ` Squash to "selftests/bpf: add bpf_first scheduler": Tests Results MPTCP CI
2022-05-10 23:03 ` [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock" Mat Martineau
2022-05-14 10:05   ` Matthieu Baerts
2022-05-16 22:56     ` Mat Martineau
2022-05-14 11:12 ` Matthieu Baerts
2022-05-16  5:50 Geliang Tang
2022-05-16 16:25 ` Matthieu Baerts
2022-05-17  7:43 [PATCH mptcp-next] Squash to "bpf: add bpf_skc_to_mptcp_sock_proto" Geliang Tang
2022-05-17  7:43 ` [PATCH mptcp-next] Squash to "selftests/bpf: test bpf_skc_to_mptcp_sock" Geliang Tang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.