From: Cyrill Gorcunov <gorcunov@gmail.com>
To: David Ahern <dsa@cumulusnetworks.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, eric.dumazet@gmail.com, jhs@mojatatu.com,
linux-kernel@vger.kernel.org, kuznet@ms2.inr.ac.ru,
jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net,
avagin@openvz.org, stephen@networkplumber.org
Subject: Re: [PATCH v6] net: ip, diag -- Add diag interface for raw sockets
Date: Thu, 13 Oct 2016 18:58:37 +0300 [thread overview]
Message-ID: <20161013155837.GD1847@uranus.lan> (raw)
In-Reply-To: <e59c339f-ca3d-92e9-88e0-8c3e9e02e01a@cumulusnetworks.com>
On Thu, Oct 13, 2016 at 09:43:57AM -0600, David Ahern wrote:
> On 10/13/16 1:16 AM, Cyrill Gorcunov wrote:
> > On Wed, Oct 12, 2016 at 07:55:04PM -0400, David Miller wrote:
> >> From: Cyrill Gorcunov <gorcunov@gmail.com>
> >> Date: Wed, 12 Oct 2016 09:53:29 +0300
> >>
> >>> I can't rename the field, neither a can use union.
> >>
> >> Remind me again what is wrong with using an anonymous union?
> >
> > Anon union would be a preferred but Eric pointed me that even
> > though it might cause problems (https://patchwork.kernel.org/patch/9353365/)
> >
> > | Note that some programs could fail to compile with the added union
> > | anyway.
> > |
> > | Some gcc versions are unable to compile a static init with an union
> > |
> > | struct inet_diag_req_v2 foo = { .pad = 0, sdiag_family = AF_INET, };
> > |
> > | When I cooked my recent fq commit I simply removed a pad and replaced
> > | it :
> > |
> > | git show fefa569a9d4bc4 -- include
> >
>
> That commit suggests it is acceptable to just rename the
> pad field, which is the simplest approach.
No. In further message Eric points that
| This is a bit different of course, since struct tc_fq_qd_stats is only
| one way : Kernel produces the content and gives it to user space.
and we are simply lucky that we didn't break anything in userspace yet.
IOW, it's not a problem for me simply to
- rename it or,
- use anonymous union
but both options have own problems :/
Also I just thought what if we introduce
struct inet_diag_req_raw_v2 {
__u8 sdiag_family;
__u8 sdiag_protocol;
__u8 idiag_ext;
__u8 sdiag_raw_protocol;
__u32 idiag_states;
struct inet_diag_sockid id;
};
where @sdiag_raw_protocol explicitly stated and
will collide with existing struct inet_diag_req_v2?
This is a hack too of course but at least this
won't break api definitely.
prev parent reply other threads:[~2016-10-13 16:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 10:00 [PATCH v6] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov
2016-10-12 5:50 ` David Miller
2016-10-12 6:53 ` Cyrill Gorcunov
2016-10-12 23:55 ` David Miller
2016-10-13 7:16 ` Cyrill Gorcunov
2016-10-13 15:43 ` David Ahern
2016-10-13 15:58 ` Cyrill Gorcunov [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=20161013155837.GD1847@uranus.lan \
--to=gorcunov@gmail.com \
--cc=avagin@openvz.org \
--cc=davem@davemloft.net \
--cc=dsa@cumulusnetworks.com \
--cc=eric.dumazet@gmail.com \
--cc=jhs@mojatatu.com \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=yoshfuji@linux-ipv6.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.