From: Hangbin Liu <liuhangbin@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Jay Vosburgh <j.vosburgh@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Jonathan Toppins <jtoppins@redhat.com>,
Paolo Abeni <pabeni@redhat.com>, David Ahern <dsahern@gmail.com>,
Tom Herbert <tom@herbertland.com>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCHv2 net] net: use struct_group to copy addresses
Date: Tue, 15 Nov 2022 21:32:27 +0800 [thread overview]
Message-ID: <Y3OU6z1PnKiRwzfK@Laptop-X1> (raw)
In-Reply-To: <20221114211645.539397df@kernel.org>
On Mon, Nov 14, 2022 at 09:16:45PM -0800, Jakub Kicinski wrote:
> On Mon, 14 Nov 2022 16:12:10 +0800 Hangbin Liu wrote:
> > diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h
> > index 961ec16a26b8..6f7e833a00f7 100644
> > --- a/include/uapi/linux/ip.h
> > +++ b/include/uapi/linux/ip.h
> > @@ -100,8 +100,10 @@ struct iphdr {
> > __u8 ttl;
> > __u8 protocol;
> > __sum16 check;
> > - __be32 saddr;
> > - __be32 daddr;
> > + struct_group(addrs,
> > + __be32 saddr;
> > + __be32 daddr;
> > + );
> > /*The options start here. */
> > };
> >
> > diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h
> > index 03cdbe798fe3..3a3a80496c7c 100644
> > --- a/include/uapi/linux/ipv6.h
> > +++ b/include/uapi/linux/ipv6.h
> > @@ -130,8 +130,10 @@ struct ipv6hdr {
> > __u8 nexthdr;
> > __u8 hop_limit;
> >
> > - struct in6_addr saddr;
> > - struct in6_addr daddr;
> > + struct_group(addrs,
> > + struct in6_addr saddr;
> > + struct in6_addr daddr;
> > + );
> > };
> >
>
> Can you double check the build with clang? It seems to fail with an odd
> message, maybe some includes missing?
>
> In file included from ./usr/include/linux/if_tunnel.h:7:
> usr/include/linux/ip.h:103:2: error: type name requires a specifier or qualifier
> struct_group(addrs,
> ^
Ah, because this is a UAPI header, we need to use __struct_group() here.
I will fix it. Thanks for the info.
Hangbin
prev parent reply other threads:[~2022-11-15 13:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 8:12 [PATCHv2 net] net: use struct_group to copy addresses Hangbin Liu
2022-11-15 5:16 ` Jakub Kicinski
2022-11-15 13:32 ` Hangbin Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3OU6z1PnKiRwzfK@Laptop-X1 \
--to=liuhangbin@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=j.vosburgh@gmail.com \
--cc=jtoppins@redhat.com \
--cc=kuba@kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tom@herbertland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox