linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bpf: selftests: Fix warning in flow_dissector
@ 2019-06-13 11:27 Arthur Fabre
  2019-06-13 15:41 ` Stanislav Fomichev
  0 siblings, 1 reply; 3+ messages in thread
From: Arthur Fabre @ 2019-06-13 11:27 UTC (permalink / raw)
  To: Shuah Khan, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, linux-kselftest,
	netdev, bpf, linux-kernel
  Cc: Arthur Fabre

Building the userspace part of the flow_dissector resulted in:

prog_tests/flow_dissector.c: In function ‘tx_tap’:
prog_tests/flow_dissector.c:176:9: warning: implicit declaration
of function ‘writev’; did you mean ‘write’? [-Wimplicit-function-declaration]
  return writev(fd, iov, ARRAY_SIZE(iov));
         ^~~~~~
         write

Include <sys/uio.h> to fix this.

Signed-off-by: Arthur Fabre <afabre@cloudflare.com>
---
 tools/testing/selftests/bpf/prog_tests/flow_dissector.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
index fbd1d88a6095..c938283ac232 100644
--- a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
+++ b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
@@ -3,6 +3,7 @@
 #include <error.h>
 #include <linux/if.h>
 #include <linux/if_tun.h>
+#include <sys/uio.h>
 
 #define CHECK_FLOW_KEYS(desc, got, expected)				\
 	CHECK_ATTR(memcmp(&got, &expected, sizeof(got)) != 0,		\
-- 
2.20.1


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

* Re: [PATCH] bpf: selftests: Fix warning in flow_dissector
  2019-06-13 11:27 [PATCH] bpf: selftests: Fix warning in flow_dissector Arthur Fabre
@ 2019-06-13 15:41 ` Stanislav Fomichev
  2019-06-13 15:47   ` Arthur Fabre
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislav Fomichev @ 2019-06-13 15:41 UTC (permalink / raw)
  To: Arthur Fabre
  Cc: Shuah Khan, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, linux-kselftest,
	netdev, bpf, linux-kernel

On 06/13, Arthur Fabre wrote:
> Building the userspace part of the flow_dissector resulted in:
> 
> prog_tests/flow_dissector.c: In function ‘tx_tap’:
> prog_tests/flow_dissector.c:176:9: warning: implicit declaration
> of function ‘writev’; did you mean ‘write’? [-Wimplicit-function-declaration]
>   return writev(fd, iov, ARRAY_SIZE(iov));
>          ^~~~~~
>          write
> 
> Include <sys/uio.h> to fix this.
Wasn't it fixed already?

See
https://lore.kernel.org/netdev/20190528190218.GA6950@ip-172-31-44-144.us-west-2.compute.internal/

> Signed-off-by: Arthur Fabre <afabre@cloudflare.com>
> ---
>  tools/testing/selftests/bpf/prog_tests/flow_dissector.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
> index fbd1d88a6095..c938283ac232 100644
> --- a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
> +++ b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
> @@ -3,6 +3,7 @@
>  #include <error.h>
>  #include <linux/if.h>
>  #include <linux/if_tun.h>
> +#include <sys/uio.h>
>  
>  #define CHECK_FLOW_KEYS(desc, got, expected)				\
>  	CHECK_ATTR(memcmp(&got, &expected, sizeof(got)) != 0,		\
> -- 
> 2.20.1
> 

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

* Re: [PATCH] bpf: selftests: Fix warning in flow_dissector
  2019-06-13 15:41 ` Stanislav Fomichev
@ 2019-06-13 15:47   ` Arthur Fabre
  0 siblings, 0 replies; 3+ messages in thread
From: Arthur Fabre @ 2019-06-13 15:47 UTC (permalink / raw)
  To: Stanislav Fomichev
  Cc: Shuah Khan, Alexei Starovoitov, Daniel Borkmann,
	Martin KaFai Lau, Song Liu, Yonghong Song, linux-kselftest,
	netdev, bpf, linux-kernel

Ah yes good catch. I guess it hasn't made it into bpf-next yet.

On Thu, Jun 13, 2019 at 4:41 PM Stanislav Fomichev <sdf@fomichev.me> wrote:
>
> On 06/13, Arthur Fabre wrote:
> > Building the userspace part of the flow_dissector resulted in:
> >
> > prog_tests/flow_dissector.c: In function ‘tx_tap’:
> > prog_tests/flow_dissector.c:176:9: warning: implicit declaration
> > of function ‘writev’; did you mean ‘write’? [-Wimplicit-function-declaration]
> >   return writev(fd, iov, ARRAY_SIZE(iov));
> >          ^~~~~~
> >          write
> >
> > Include <sys/uio.h> to fix this.
> Wasn't it fixed already?
>
> See
> https://lore.kernel.org/netdev/20190528190218.GA6950@ip-172-31-44-144.us-west-2.compute.internal/
>
> > Signed-off-by: Arthur Fabre <afabre@cloudflare.com>
> > ---
> >  tools/testing/selftests/bpf/prog_tests/flow_dissector.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
> > index fbd1d88a6095..c938283ac232 100644
> > --- a/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
> > +++ b/tools/testing/selftests/bpf/prog_tests/flow_dissector.c
> > @@ -3,6 +3,7 @@
> >  #include <error.h>
> >  #include <linux/if.h>
> >  #include <linux/if_tun.h>
> > +#include <sys/uio.h>
> >
> >  #define CHECK_FLOW_KEYS(desc, got, expected)                         \
> >       CHECK_ATTR(memcmp(&got, &expected, sizeof(got)) != 0,           \
> > --
> > 2.20.1
> >

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

end of thread, other threads:[~2019-06-13 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 11:27 [PATCH] bpf: selftests: Fix warning in flow_dissector Arthur Fabre
2019-06-13 15:41 ` Stanislav Fomichev
2019-06-13 15:47   ` Arthur Fabre

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).