From: Dan Williams <dcbw@redhat.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
Stephen Hemminger <stephen@networkplumber.org>
Cc: Netdev <netdev@vger.kernel.org>
Subject: Re: To netlink or not to netlink, that is the question
Date: Thu, 12 Jan 2017 12:43:04 -0600 [thread overview]
Message-ID: <1484246584.4651.3.camel@redhat.com> (raw)
In-Reply-To: <CAHmME9rWDzO9j8E1HYSXY6j9FJqHODOYnEW8+SSggapDkQ_jBA@mail.gmail.com>
On Thu, 2017-01-12 at 19:28 +0100, Jason A. Donenfeld wrote:
> On Thu, Jan 12, 2017 at 6:14 PM, Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> > It is up to you but I doubt that code with new private ioctl's will
> > be
> > accepted upstream. If you want full review then post for inclusion
> > upstream.
> > If you just want to maintain it is a private fork, go ahead and do
> > what
> > you want and suffer the consequences.
>
> Obviously I'm going for upstream conclusion and not willing to
> "suffer
> the consequences", hence my email in the first place. Given that you
> seem most interested in netlink, might you have any constructive
> suggestions on how netlink might be used with very large atomic
> messages?
Typically kernel code doesn't pass very large atomic messages back and
forth. From the description you mailed, I would guess a better fit API
would be to have specific netlink mechanisms for add/remove wgpeers,
and a specific mechanism for add/remove ipmasks for each peer. And
don't forget netlink events to indicate when peers and ipmasks have
been added/removed, so userspace is aware of that.
Besides, perhaps multiple programs may wish to manipulate a wgdevice,
which could include adding/removing peers or ipmasks from separate
userspace processes. That's not really possible with a huge buffer
that includes all the information, as a process would have to read the
buffer, update it, and send it back, which would then potentially
clobber whatever another process did between the read/write.
In short, if the API doesn't quite fit, then perhaps the API could be
broken up into smaller, more discrete operations that better fit the
netlink API.
Just some thoughts...
Dan
next prev parent reply other threads:[~2017-01-12 18:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 13:01 To netlink or not to netlink, that is the question Jason A. Donenfeld
2017-01-12 17:14 ` Stephen Hemminger
2017-01-12 18:28 ` Jason A. Donenfeld
2017-01-12 18:43 ` Dan Williams [this message]
2017-01-12 19:02 ` Jason A. Donenfeld
2017-01-12 19:11 ` David Miller
2017-01-12 20:07 ` Jason A. Donenfeld
2017-01-12 20:27 ` David Miller
2017-01-13 7:17 ` Johannes Berg
2017-01-13 13:36 ` Nicolas Dichtel
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=1484246584.4651.3.camel@redhat.com \
--to=dcbw@redhat.com \
--cc=Jason@zx2c4.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).