netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: use __u8 instead of uint8_t in uapi header
@ 2019-09-21 13:46 Masahiro Yamada
  2019-09-22  7:11 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2019-09-21 13:46 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal, netfilter-devel
  Cc: Masahiro Yamada, linux-kernel

When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to
make sure they can be included from user-space.

Currently, linux/netfilter_bridge/ebtables.h is excluded from the test
coverage. To make it join the compile-test, we need to fix the build
errors attached below.

For a case like this, we decided to use __u{8,16,32,64} variable types
in this discussion:

  https://lkml.org/lkml/2019/6/5/18

Build log:

  CC      usr/include/linux/netfilter_bridge/ebtables.h.s
In file included from <command-line>:32:0:
./usr/include/linux/netfilter_bridge/ebtables.h:126:4: error: unknown type name ‘uint8_t’
    uint8_t revision;
    ^~~~~~~
./usr/include/linux/netfilter_bridge/ebtables.h:139:4: error: unknown type name ‘uint8_t’
    uint8_t revision;
    ^~~~~~~
./usr/include/linux/netfilter_bridge/ebtables.h:152:4: error: unknown type name ‘uint8_t’
    uint8_t revision;
    ^~~~~~~

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/uapi/linux/netfilter_bridge/ebtables.h | 6 +++---
 usr/include/Makefile                           | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/uapi/linux/netfilter_bridge/ebtables.h b/include/uapi/linux/netfilter_bridge/ebtables.h
index 3b86c14ea49d..8076c940ffeb 100644
--- a/include/uapi/linux/netfilter_bridge/ebtables.h
+++ b/include/uapi/linux/netfilter_bridge/ebtables.h
@@ -123,7 +123,7 @@ struct ebt_entry_match {
 	union {
 		struct {
 			char name[EBT_EXTENSION_MAXNAMELEN];
-			uint8_t revision;
+			__u8 revision;
 		};
 		struct xt_match *match;
 	} u;
@@ -136,7 +136,7 @@ struct ebt_entry_watcher {
 	union {
 		struct {
 			char name[EBT_EXTENSION_MAXNAMELEN];
-			uint8_t revision;
+			__u8 revision;
 		};
 		struct xt_target *watcher;
 	} u;
@@ -149,7 +149,7 @@ struct ebt_entry_target {
 	union {
 		struct {
 			char name[EBT_EXTENSION_MAXNAMELEN];
-			uint8_t revision;
+			__u8 revision;
 		};
 		struct xt_target *target;
 	} u;
diff --git a/usr/include/Makefile b/usr/include/Makefile
index 77e0a0cd972a..faba1e5c3873 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -37,7 +37,6 @@ header-test- += linux/hdlc/ioctl.h
 header-test- += linux/ivtv.h
 header-test- += linux/kexec.h
 header-test- += linux/matroxfb.h
-header-test- += linux/netfilter_bridge/ebtables.h
 header-test- += linux/netfilter_ipv4/ipt_LOG.h
 header-test- += linux/netfilter_ipv6/ip6t_LOG.h
 header-test- += linux/nfc.h
-- 
2.17.1


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

* Re: [PATCH] netfilter: use __u8 instead of uint8_t in uapi header
  2019-09-21 13:46 [PATCH] netfilter: use __u8 instead of uint8_t in uapi header Masahiro Yamada
@ 2019-09-22  7:11 ` Pablo Neira Ayuso
  2019-09-22  7:13   ` Pablo Neira Ayuso
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Neira Ayuso @ 2019-09-22  7:11 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Jozsef Kadlecsik, Florian Westphal, netfilter-devel, linux-kernel

On Sat, Sep 21, 2019 at 10:46:48PM +0900, Masahiro Yamada wrote:
> When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to
> make sure they can be included from user-space.
> 
> Currently, linux/netfilter_bridge/ebtables.h is excluded from the test
> coverage. To make it join the compile-test, we need to fix the build
> errors attached below.
> 
> For a case like this, we decided to use __u{8,16,32,64} variable types
> in this discussion:
> 
>   https://lkml.org/lkml/2019/6/5/18
> 
> Build log:
> 
>   CC      usr/include/linux/netfilter_bridge/ebtables.h.s
> In file included from <command-line>:32:0:
> ./usr/include/linux/netfilter_bridge/ebtables.h:126:4: error: unknown type name ‘uint8_t’
>     uint8_t revision;
>     ^~~~~~~
> ./usr/include/linux/netfilter_bridge/ebtables.h:139:4: error: unknown type name ‘uint8_t’
>     uint8_t revision;
>     ^~~~~~~
> ./usr/include/linux/netfilter_bridge/ebtables.h:152:4: error: unknown type name ‘uint8_t’
>     uint8_t revision;
>     ^~~~~~~

Applied.

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

* Re: [PATCH] netfilter: use __u8 instead of uint8_t in uapi header
  2019-09-22  7:11 ` Pablo Neira Ayuso
@ 2019-09-22  7:13   ` Pablo Neira Ayuso
  2019-09-22 11:49     ` Masahiro Yamada
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Neira Ayuso @ 2019-09-22  7:13 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Jozsef Kadlecsik, Florian Westphal, netfilter-devel, linux-kernel

On Sun, Sep 22, 2019 at 09:11:11AM +0200, Pablo Neira Ayuso wrote:
> On Sat, Sep 21, 2019 at 10:46:48PM +0900, Masahiro Yamada wrote:
> > When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to
> > make sure they can be included from user-space.
> > 
> > Currently, linux/netfilter_bridge/ebtables.h is excluded from the test
> > coverage. To make it join the compile-test, we need to fix the build
> > errors attached below.
> > 
> > For a case like this, we decided to use __u{8,16,32,64} variable types
> > in this discussion:
> > 
> >   https://lkml.org/lkml/2019/6/5/18
> > 
> > Build log:
> > 
> >   CC      usr/include/linux/netfilter_bridge/ebtables.h.s
> > In file included from <command-line>:32:0:
> > ./usr/include/linux/netfilter_bridge/ebtables.h:126:4: error: unknown type name ‘uint8_t’
> >     uint8_t revision;
> >     ^~~~~~~
> > ./usr/include/linux/netfilter_bridge/ebtables.h:139:4: error: unknown type name ‘uint8_t’
> >     uint8_t revision;
> >     ^~~~~~~
> > ./usr/include/linux/netfilter_bridge/ebtables.h:152:4: error: unknown type name ‘uint8_t’
> >     uint8_t revision;
> >     ^~~~~~~
> 
> Applied.

Patch does not apply cleanly to nf.git, I have to keep it back, sorry

$ git am /tmp/yamada.masahiro.txt -s
Applying: netfilter: use __u8 instead of uint8_t in uapi header
error: patch failed: usr/include/Makefile:37
error: usr/include/Makefile: patch does not apply
Patch failed at 0001 netfilter: use __u8 instead of uint8_t in uapi header
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

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

* Re: [PATCH] netfilter: use __u8 instead of uint8_t in uapi header
  2019-09-22  7:13   ` Pablo Neira Ayuso
@ 2019-09-22 11:49     ` Masahiro Yamada
  2019-09-22 12:21       ` Pablo Neira Ayuso
  0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2019-09-22 11:49 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: Jozsef Kadlecsik, Florian Westphal,
	Netfilter Development Mailing list, Linux Kernel Mailing List

Hi Pablo,

On Sun, Sep 22, 2019 at 4:13 PM Pablo Neira Ayuso <pablo@netfilter.org> wrote:
>
> On Sun, Sep 22, 2019 at 09:11:11AM +0200, Pablo Neira Ayuso wrote:
> > On Sat, Sep 21, 2019 at 10:46:48PM +0900, Masahiro Yamada wrote:
> > > When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to
> > > make sure they can be included from user-space.
> > >
> > > Currently, linux/netfilter_bridge/ebtables.h is excluded from the test
> > > coverage. To make it join the compile-test, we need to fix the build
> > > errors attached below.
> > >
> > > For a case like this, we decided to use __u{8,16,32,64} variable types
> > > in this discussion:
> > >
> > >   https://lkml.org/lkml/2019/6/5/18
> > >
> > > Build log:
> > >
> > >   CC      usr/include/linux/netfilter_bridge/ebtables.h.s
> > > In file included from <command-line>:32:0:
> > > ./usr/include/linux/netfilter_bridge/ebtables.h:126:4: error: unknown type name ‘uint8_t’
> > >     uint8_t revision;
> > >     ^~~~~~~
> > > ./usr/include/linux/netfilter_bridge/ebtables.h:139:4: error: unknown type name ‘uint8_t’
> > >     uint8_t revision;
> > >     ^~~~~~~
> > > ./usr/include/linux/netfilter_bridge/ebtables.h:152:4: error: unknown type name ‘uint8_t’
> > >     uint8_t revision;
> > >     ^~~~~~~
> >
> > Applied.
>
> Patch does not apply cleanly to nf.git, I have to keep it back, sorry

Perhaps, reducing the context (git am -C<N>) might help.

Shall I rebase and resend it?

Thanks.

> $ git am /tmp/yamada.masahiro.txt -s
> Applying: netfilter: use __u8 instead of uint8_t in uapi header
> error: patch failed: usr/include/Makefile:37
> error: usr/include/Makefile: patch does not apply
> Patch failed at 0001 netfilter: use __u8 instead of uint8_t in uapi header
> The copy of the patch that failed is found in: .git/rebase-apply/patch
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] netfilter: use __u8 instead of uint8_t in uapi header
  2019-09-22 11:49     ` Masahiro Yamada
@ 2019-09-22 12:21       ` Pablo Neira Ayuso
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Neira Ayuso @ 2019-09-22 12:21 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Jozsef Kadlecsik, Florian Westphal,
	Netfilter Development Mailing list, Linux Kernel Mailing List

On Sun, Sep 22, 2019 at 08:49:11PM +0900, Masahiro Yamada wrote:
> Hi Pablo,
> 
> On Sun, Sep 22, 2019 at 4:13 PM Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> >
> > On Sun, Sep 22, 2019 at 09:11:11AM +0200, Pablo Neira Ayuso wrote:
> > > On Sat, Sep 21, 2019 at 10:46:48PM +0900, Masahiro Yamada wrote:
> > > > When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to
> > > > make sure they can be included from user-space.
> > > >
> > > > Currently, linux/netfilter_bridge/ebtables.h is excluded from the test
> > > > coverage. To make it join the compile-test, we need to fix the build
> > > > errors attached below.
> > > >
> > > > For a case like this, we decided to use __u{8,16,32,64} variable types
> > > > in this discussion:
> > > >
> > > >   https://lkml.org/lkml/2019/6/5/18
> > > >
> > > > Build log:
> > > >
> > > >   CC      usr/include/linux/netfilter_bridge/ebtables.h.s
> > > > In file included from <command-line>:32:0:
> > > > ./usr/include/linux/netfilter_bridge/ebtables.h:126:4: error: unknown type name ‘uint8_t’
> > > >     uint8_t revision;
> > > >     ^~~~~~~
> > > > ./usr/include/linux/netfilter_bridge/ebtables.h:139:4: error: unknown type name ‘uint8_t’
> > > >     uint8_t revision;
> > > >     ^~~~~~~
> > > > ./usr/include/linux/netfilter_bridge/ebtables.h:152:4: error: unknown type name ‘uint8_t’
> > > >     uint8_t revision;
> > > >     ^~~~~~~
> > >
> > > Applied.
> >
> > Patch does not apply cleanly to nf.git, I have to keep it back, sorry
> 
> Perhaps, reducing the context (git am -C<N>) might help.

Not working for me.

> Shall I rebase and resend it?

Please do. Thanks.

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

end of thread, other threads:[~2019-09-22 12:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-21 13:46 [PATCH] netfilter: use __u8 instead of uint8_t in uapi header Masahiro Yamada
2019-09-22  7:11 ` Pablo Neira Ayuso
2019-09-22  7:13   ` Pablo Neira Ayuso
2019-09-22 11:49     ` Masahiro Yamada
2019-09-22 12:21       ` Pablo Neira Ayuso

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