* [PATCH bpf-next] bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress
@ 2020-11-06 22:54 Martin KaFai Lau
2020-11-09 6:56 ` John Fastabend
2020-11-10 0:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Martin KaFai Lau @ 2020-11-06 22:54 UTC (permalink / raw)
To: bpf; +Cc: Alexei Starovoitov, Daniel Borkmann, kernel-team, netdev
Some globals in the tcp_hdr_options test and btf_skc_cls_ingress test
are not using static scope. This patch fixes it.
Targeting bpf-next branch as an improvement since it currently does not
break the build.
Fixes: ad2f8eb0095e ("bpf: selftests: Tcp header options")
Fixes: 9a856cae2217 ("bpf: selftest: Add test_btf_skc_cls_ingress")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
---
.../selftests/bpf/prog_tests/btf_skc_cls_ingress.c | 2 +-
.../selftests/bpf/prog_tests/tcp_hdr_options.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c b/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c
index 86ccf37e26b3..762f6a9da8b5 100644
--- a/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c
+++ b/tools/testing/selftests/bpf/prog_tests/btf_skc_cls_ingress.c
@@ -17,7 +17,7 @@
#include "test_btf_skc_cls_ingress.skel.h"
static struct test_btf_skc_cls_ingress *skel;
-struct sockaddr_in6 srv_sa6;
+static struct sockaddr_in6 srv_sa6;
static __u32 duration;
#define PROG_PIN_FILE "/sys/fs/bpf/btf_skc_cls_ingress"
diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c b/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
index c85174cdcb77..08d19cafd5e8 100644
--- a/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
+++ b/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
@@ -18,12 +18,12 @@
#define LO_ADDR6 "::1"
#define CG_NAME "/tcpbpf-hdr-opt-test"
-struct bpf_test_option exp_passive_estab_in;
-struct bpf_test_option exp_active_estab_in;
-struct bpf_test_option exp_passive_fin_in;
-struct bpf_test_option exp_active_fin_in;
-struct hdr_stg exp_passive_hdr_stg;
-struct hdr_stg exp_active_hdr_stg = { .active = true, };
+static struct bpf_test_option exp_passive_estab_in;
+static struct bpf_test_option exp_active_estab_in;
+static struct bpf_test_option exp_passive_fin_in;
+static struct bpf_test_option exp_active_fin_in;
+static struct hdr_stg exp_passive_hdr_stg;
+static struct hdr_stg exp_active_hdr_stg = { .active = true, };
static struct test_misc_tcp_hdr_options *misc_skel;
static struct test_tcp_hdr_options *skel;
--
2.24.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH bpf-next] bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress
2020-11-06 22:54 [PATCH bpf-next] bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress Martin KaFai Lau
@ 2020-11-09 6:56 ` John Fastabend
2020-11-10 0:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: John Fastabend @ 2020-11-09 6:56 UTC (permalink / raw)
To: Martin KaFai Lau, bpf
Cc: Alexei Starovoitov, Daniel Borkmann, kernel-team, netdev
Martin KaFai Lau wrote:
> Some globals in the tcp_hdr_options test and btf_skc_cls_ingress test
> are not using static scope. This patch fixes it.
>
> Targeting bpf-next branch as an improvement since it currently does not
> break the build.
>
> Fixes: ad2f8eb0095e ("bpf: selftests: Tcp header options")
> Fixes: 9a856cae2217 ("bpf: selftest: Add test_btf_skc_cls_ingress")
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
> ---
> .../selftests/bpf/prog_tests/btf_skc_cls_ingress.c | 2 +-
> .../selftests/bpf/prog_tests/tcp_hdr_options.c | 12 ++++++------
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
Acked-by: John Fastabend <john.fastabend@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress
2020-11-06 22:54 [PATCH bpf-next] bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress Martin KaFai Lau
2020-11-09 6:56 ` John Fastabend
@ 2020-11-10 0:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2020-11-10 0:30 UTC (permalink / raw)
To: Martin KaFai Lau; +Cc: bpf, ast, daniel, kernel-team, netdev
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Fri, 6 Nov 2020 14:54:02 -0800 you wrote:
> Some globals in the tcp_hdr_options test and btf_skc_cls_ingress test
> are not using static scope. This patch fixes it.
>
> Targeting bpf-next branch as an improvement since it currently does not
> break the build.
>
> Fixes: ad2f8eb0095e ("bpf: selftests: Tcp header options")
> Fixes: 9a856cae2217 ("bpf: selftest: Add test_btf_skc_cls_ingress")
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
>
> [...]
Here is the summary with links:
- [bpf-next] bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress
https://git.kernel.org/bpf/bpf-next/c/f52b8fd33257
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-10 0:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 22:54 [PATCH bpf-next] bpf: selftest: Use static globals in tcp_hdr_options and btf_skc_cls_ingress Martin KaFai Lau
2020-11-09 6:56 ` John Fastabend
2020-11-10 0:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).