2020-02-11 12:18:45

by Isaac Young

[permalink] [raw]
Subject: [PATCH] Removing a duplicate condition.

Signed-off-by: Isaac Young <[email protected]>
---
tools/testing/selftests/bpf/prog_tests/select_reuseport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/select_reuseport.c b/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
index 098bcae5f827..0954c7a8aa08 100644
--- a/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
+++ b/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
@@ -823,7 +823,7 @@ void test_select_reuseport(void)

saved_tcp_fo = read_int_sysctl(TCP_FO_SYSCTL);
saved_tcp_syncookie = read_int_sysctl(TCP_SYNCOOKIE_SYSCTL);
- if (saved_tcp_syncookie < 0 || saved_tcp_syncookie < 0)
+ if (saved_tcp_syncookie < 0)
goto out;

if (enable_fastopen())
--
2.24.1


2020-02-11 16:59:59

by Alexei Starovoitov

[permalink] [raw]
Subject: Re: [PATCH] Removing a duplicate condition.

On Tue, Feb 11, 2020 at 5:26 AM Isaac Young <[email protected]> wrote:
>
> Signed-off-by: Isaac Young <[email protected]>
> ---
> tools/testing/selftests/bpf/prog_tests/select_reuseport.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/select_reuseport.c b/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
> index 098bcae5f827..0954c7a8aa08 100644
> --- a/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
> +++ b/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
> @@ -823,7 +823,7 @@ void test_select_reuseport(void)
>
> saved_tcp_fo = read_int_sysctl(TCP_FO_SYSCTL);
> saved_tcp_syncookie = read_int_sysctl(TCP_SYNCOOKIE_SYSCTL);
> - if (saved_tcp_syncookie < 0 || saved_tcp_syncookie < 0)
> + if (saved_tcp_syncookie < 0)
> goto out;

please resend this patch to bpf@vger and cc maintainers.
Also see bpf_devel_QA.rst
Thanks

2020-02-11 17:00:55

by Shuah Khan

[permalink] [raw]
Subject: Re: [PATCH] Removing a duplicate condition.

Please include subsystem and test name in the subject line.

On 2/11/20 4:32 AM, Isaac Young wrote:
> Signed-off-by: Isaac Young <[email protected]>

Missing commit log

> ---
> tools/testing/selftests/bpf/prog_tests/select_reuseport.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/select_reuseport.c b/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
> index 098bcae5f827..0954c7a8aa08 100644
> --- a/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
> +++ b/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
> @@ -823,7 +823,7 @@ void test_select_reuseport(void)
>
> saved_tcp_fo = read_int_sysctl(TCP_FO_SYSCTL);
> saved_tcp_syncookie = read_int_sysctl(TCP_SYNCOOKIE_SYSCTL);
> - if (saved_tcp_syncookie < 0 || saved_tcp_syncookie < 0)

This might not be the right fix. I think the check should be
if (saved_tcp_fo < 0 || saved_tcp_syncookie < 0)

at least makes the most sense based on the code.


> + if (saved_tcp_syncookie < 0)
> goto out;
>
> if (enable_fastopen())
>

thanks,
-- Shuah