From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
David Ahern <dsa@cumulusnetworks.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
David Miller <davem@davemloft.net>,
kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, avagin@openvz.org, stephen@networkplumber.org
Subject: Re: [PATCH v5] net: ip, diag -- Add diag interface for raw sockets
Date: Wed, 28 Sep 2016 13:51:47 +0300 [thread overview]
Message-ID: <20160928105147.GV1876@uranus.lan> (raw)
In-Reply-To: <8293413c-a81d-f7ff-24f0-8f58ce877116@mojatatu.com>
On Wed, Sep 28, 2016 at 06:43:01AM -0400, Jamal Hadi Salim wrote:
...
> >
> > Someone may have set it to zero explicitly on source level, and the
> > compilation will fail on new kernel then. So no, keeping the name
> > is reasonable.
> >
>
> I dont know how compilation will fail but you may be right with note:
> that is not how pads have been used in the past. They are supposed to
> cosmetic annotation which indicates "here's a hole; use it in the
> future if you are looking to add something". And someone in the
> future can claim them. I am not sure if MBZ philosophy applies.
This structure is uapi, so anyone has complete rights to reference
@pad in the userspace programs. Sure it would be more clear to remove
the @pad completely, but if we choose so I think it's better to do
on top instead and then if someone complain we can easily revert
the single trivial commit instead of this big patch.
>
> > > Should you not just rename it?
> > > Also I notice when things like __raw_v4_lookup() are claiming it is unsigned
> > > short instead of a u8?
> >
> > The protocol is still up to 255 for a while, is it expected that IPPROTO_MAX
> > will be increased in more-less near future? Of course I can drop the idea
> > of using @pad here and switch to some extended reauest but prefer to stick
> > with simplier solution. Hm?
> >
>
> Ok. If i understood correctly it was already unsigned short before your
> patch -so i agree it doesnt matter. Maybe just put a comment to express
> that if ever protocol goes above 255 it wont be sufficient.
If protocol goes over u8 then complete inet_diag_req_v2 structure will
have to be reworked becaue @sdiag_protocol is u8 as well. IOW, once
someone liftup IPPROTO_MAX > 255, he will notice the problem immediately
because diag for such module simply stop working properly.
next prev parent reply other threads:[~2016-09-28 10:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 9:03 [PATCH v5] net: ip, diag -- Add diag interface for raw sockets Cyrill Gorcunov
2016-09-28 10:08 ` Jamal Hadi Salim
2016-09-28 10:17 ` Cyrill Gorcunov
2016-09-28 10:43 ` Jamal Hadi Salim
2016-09-28 10:51 ` Cyrill Gorcunov [this message]
2016-09-28 11:06 ` Jamal Hadi Salim
2016-09-28 11:27 ` Cyrill Gorcunov
2016-09-28 12:06 ` Jamal Hadi Salim
2016-09-28 12:09 ` David Miller
2016-09-28 12:21 ` Cyrill Gorcunov
2016-09-28 12:07 ` David Miller
2016-09-28 12:09 ` Jamal Hadi Salim
2016-09-28 12:16 ` David Miller
2016-09-28 12:27 ` Jamal Hadi Salim
2016-09-28 12:38 ` Jamal Hadi Salim
2016-09-28 12:45 ` Cyrill Gorcunov
2016-09-28 12:50 ` Jamal Hadi Salim
2016-09-28 12:57 ` Cyrill Gorcunov
2016-09-28 12:18 ` Cyrill Gorcunov
2016-09-28 12:57 ` Eric Dumazet
2016-09-28 13:02 ` Eric Dumazet
2016-09-28 13:09 ` Cyrill Gorcunov
2016-09-28 13:03 ` Cyrill Gorcunov
2016-09-28 13:29 ` Eric Dumazet
2016-09-28 13:43 ` Cyrill Gorcunov
2016-09-28 13:49 ` Eric Dumazet
2016-09-28 14:55 ` Cyrill Gorcunov
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=20160928105147.GV1876@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 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).