Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
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
Message-ID: <0b12af1b27954f62a5ce715f95176d1f0ff393a3.camel@sipsolutions.net> (raw)
In-Reply-To: <f48bdad3-f9f8-20b7-b6ff-6248368a7ae1@gmail.com>

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


  reply index

Thread overview: 12+ 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

Reply instructions:

You may reply publically 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

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org linux-wireless@archiver.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/ public-inbox