From: Johannes Berg <johannes@sipsolutions.net>
To: Denis Kenzior <denkenz@gmail.com>, linux-wireless@vger.kernel.org
Subject: Re: [RFCv3 3/3] nl80211: Send large new_wiphy events
Date: Wed, 11 Sep 2019 17:12:11 +0200 [thread overview]
Message-ID: <0b12af1b27954f62a5ce715f95176d1f0ff393a3.camel@sipsolutions.net> (raw)
In-Reply-To: <f48bdad3-f9f8-20b7-b6ff-6248368a7ae1@gmail.com> (sfid-20190911_161324_913292_899186EF)
On Wed, 2019-09-11 at 07:20 -0500, Denis Kenzior wrote:
> > I'm not sure I see how the applications could do buffers that are
> > "inherently" large enough, there's no practical message size limit, is
> > there (32-bits for the size).
>
> The kernel caps this to 32k right now if I read the code correctly. But
> fair point.
The kernel caps this for dumps only, no? We can allocate here ourselves
for multicasting a message as large as we like I think.
> > > + if (WARN_ON(nl80211_send_wiphy(rdev, cmd, msg, 0, 0, 0, &state) < 0)) {
> > > + nlmsg_free(msg);
> > > + goto legacy;
> > > + }
> > > +
> > > + genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
> > > + NL80211_MCGRP_CONFIG2, GFP_KERNEL);
> > > +
> > > +legacy:
> >
> > nit: just use "else" instead of the goto?
>
> I'm not sure I understand? We want to send both messages here...
It's equivalent to:
-----
if (WARN_ON(nl80211_send_wiphy(...) < 0)
nlmsg_free(msg);
else
genlmsg_multicast_netns(...);
... code for legacy ...
-----
no?
johannes
next prev parent reply other threads:[~2019-09-11 15:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-06 15:43 [RFCv3 1/3] nl80211: Fix broken non-split wiphy dumps Denis Kenzior
2019-09-06 15:43 ` [RFCv3 2/3] nl80211: Support >4096 byte NEW_WIPHY event nlmsg Denis Kenzior
2019-09-11 9:44 ` Johannes Berg
2019-09-11 12:41 ` Denis Kenzior
2019-09-11 15:28 ` Johannes Berg
2019-09-11 13:51 ` Denis Kenzior
2019-10-01 9:23 ` Johannes Berg
2019-09-06 15:43 ` [RFCv3 3/3] nl80211: Send large new_wiphy events Denis Kenzior
2019-09-11 9:47 ` Johannes Berg
2019-09-11 12:20 ` Denis Kenzior
2019-09-11 15:12 ` Johannes Berg [this message]
2019-09-11 13:23 ` Denis Kenzior
2020-09-28 11:14 ` Johannes Berg
2020-10-02 14:54 ` Denis Kenzior
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=0b12af1b27954f62a5ce715f95176d1f0ff393a3.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=denkenz@gmail.com \
--cc=linux-wireless@vger.kernel.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).