[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9BE5800D-DA65-485A-8E5E-5B84F59F70BD@fb.com>
Date: Wed, 24 Aug 2022 15:03:23 +0000
From: Mykola Lysenko <mykolal@...com>
To: Qiao Ma <mqaio@...ux.alibaba.com>
CC: Mykola Lysenko <mykolal@...com>,
"andrii@...nel.org" <andrii@...nel.org>,
"shuah@...nel.org" <shuah@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH bpf-next] selftests/bpf: fix incorrect fcntl call
Hi Qiao,
> On Aug 24, 2022, at 7:01 AM, Qiao Ma <mqaio@...ux.alibaba.com> wrote:
>
> !-------------------------------------------------------------------|
> This Message Is From an External Sender
>
> |-------------------------------------------------------------------!
>
> To set socket noblock, we need to use
>> fcntl(fd, F_SETFL, O_NONBLOCK);
> rather than:
>> fcntl(fd, O_NONBLOCK);
Can you please add more description on what is it fixing?
Additionally, add file name to the title to make it easier to identify the commit from oneline git log.
Something like “selftests/bpf: fix incorrect fcntl call (test_sockmap.c)”.
Thank you!
>
> Signed-off-by: Qiao Ma <mqaio@...ux.alibaba.com>
> ---
> tools/testing/selftests/bpf/test_sockmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c
> index 0fbaccdc8861..b163b7cfd957 100644
> --- a/tools/testing/selftests/bpf/test_sockmap.c
> +++ b/tools/testing/selftests/bpf/test_sockmap.c
> @@ -598,7 +598,7 @@ static int msg_loop(int fd, int iov_count, int iov_length, int cnt,
> struct timeval timeout;
> fd_set w;
>
> - fcntl(fd, fd_flags);
> + fcntl(fd, F_SETFL, fd_flags);
> /* Account for pop bytes noting each iteration of apply will
> * call msg_pop_data helper so we need to account for this
> * by calculating the number of apply iterations. Note user
> --
> 1.8.3.1
>
Powered by blists - more mailing lists