Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1029974ybe; Wed, 11 Sep 2019 08:19:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0ZYuRh8sOgmqIZZVSafLwWcY8ILrjWUBHmXR1aRb01zvx0X6tRxxieq24cdcFF2Wdqaa4 X-Received: by 2002:a17:906:7494:: with SMTP id e20mr30536173ejl.166.1568215172367; Wed, 11 Sep 2019 08:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568215172; cv=none; d=google.com; s=arc-20160816; b=wQpqGMFkJHjBKvUkaSdkgTnMOIhsTvLSA+WLZHB/OgzhUbe1Z63ZSroy4J8wEpU3z2 aA8kFDogg5pDdtDtg4cryooM5LMBkOWmqnGtQcQGAUQmcNdN02SFpACwn6emfUtyxyqa 6V+RjSnSZC7s9T1uZVmk1bEeOB8kjlS5qbQGettm4BNaNC76sAPHy5OdWgMBM2qne6kG kLkII0nKpg9E4SPQPxHKni+sL5GemUVD4ASI6WgISHaP8YdTgI7PxcQ5EDiJWIc78p4y 2Ng8MNxP8E63zlZmULgFWC1MHwAh0HBAvS21Yh39HS0lMuBw71z9Of8KakXQC9L40STo FyFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=w6/F/d2P0bNIPOnh5jaEFjQ8//w4DSzVS7q5TwNPS0E=; b=B2q4iLQULfCZH5Ax9kDdqXtfqcC0pgo/JyRuHdOdnIPpkFjLFYR017J4N8dMsz6Zzv K1c/HAwqwRjcHQQc/NNPOuvJzRgRmSZ9jJMIkuR3DStUSUk07pnsiicjyIqap3WFWM3X 90pw4ryUEJ1UX3uQ82aH268Nrz2qN1+Izi3aQCHEBPOlk621gie9wP7K1061cpfXOd+S v8Xg2Ud7zyy4PDZy3GmgSWX0x7UPssUld6XWe7lkFIcsNsR3uDdwihhkpiUG5d9hwlC+ XTWqmWKk49D5nKbzjyFBkGU12BewiqDmH4Svw2LeezOvskUxwZi5pTkzPJv/GhBh85Ve 5ZmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gE8lGM94; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s56si14909383edd.159.2019.09.11.08.19.07; Wed, 11 Sep 2019 08:19:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gE8lGM94; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728291AbfIKPRV (ORCPT + 99 others); Wed, 11 Sep 2019 11:17:21 -0400 Received: from mail-ot1-f54.google.com ([209.85.210.54]:40242 "EHLO mail-ot1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728183AbfIKPRV (ORCPT ); Wed, 11 Sep 2019 11:17:21 -0400 Received: by mail-ot1-f54.google.com with SMTP id y39so22919126ota.7 for ; Wed, 11 Sep 2019 08:17:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=w6/F/d2P0bNIPOnh5jaEFjQ8//w4DSzVS7q5TwNPS0E=; b=gE8lGM94zrTh/5oWYhtel9CPQfI4FZjPKg8vyvZJjHC9iFqG98Y8nNl6/KmjU7XfYv brPzNB0OmWmqavkTpYaKolR+QkraM1LFLJv30J30+JXU0STkgJDeRkiz3STEuSgtVpiQ rvB8P7VQ+zCKZs1uLDbf7EfAH0k5kBJbVXiZdflp/m5FvZUIU615/1MlEoUe5Ta2tMI/ a5SyCah/Xr66rHT22igPXcGBaRbaus5PXrvmxM3CQD253E2hGC6omFixUrM9cazVp3qr c9SyfZjOBn/Whzu0VdHpbEDSY1/CQgl/OLULMFX5x+71sbENqaN/C2IqOkRnhvZVdjmt XrXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=w6/F/d2P0bNIPOnh5jaEFjQ8//w4DSzVS7q5TwNPS0E=; b=KpdhYK+jY3fRqai+r5eMzlrNfMh+eGFD5XdmNgfE0zNtXbZvW5Q6FJsxwZu1dv6TiM aNVK329H6JTM8nDuYsJdSJ36DwG8ijg7KiFAR/huBzYP9ZM0qjZrb1CIRv67AMCKpvHK NME4apoaelGauDmFvfUDmbZ6gPZcoKZEV0MoxCsqc9h8lYrAnQ42muQPtWSov7ATvDis vCBZs3WI703fYgzIrNnT027u6acfVKfvLDUJK8cOZwfoABwZAcb6yEeJZQZxCI4mS5Nr 6LAzQ/SY+He1GfZIFxI5/Lm5/MjS7TbbTSKl0Mjyc5/bbJsOPWJagmll4Y3dDrG7SQnD wyag== X-Gm-Message-State: APjAAAVZIiTJnebrWDRAk4IaKP5+H+PLK+/gDPEfAWljTugKXTPevQKr qlICLp7ze4onBi853g2IGpB2+2XU X-Received: by 2002:a05:6830:200d:: with SMTP id e13mr14203825otp.315.1568215040580; Wed, 11 Sep 2019 08:17:20 -0700 (PDT) Received: from [192.168.1.249] (cpe-70-114-247-242.austin.res.rr.com. [70.114.247.242]) by smtp.googlemail.com with ESMTPSA id v2sm7578961otq.52.2019.09.11.08.17.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Sep 2019 08:17:20 -0700 (PDT) Subject: Re: [RFCv3 3/3] nl80211: Send large new_wiphy events To: Johannes Berg , linux-wireless@vger.kernel.org References: <20190906154303.9303-1-denkenz@gmail.com> <20190906154303.9303-3-denkenz@gmail.com> <127c19b1855302a467a1bdbf2f25f625a0254d9e.camel@sipsolutions.net> <0b12af1b27954f62a5ce715f95176d1f0ff393a3.camel@sipsolutions.net> From: Denis Kenzior Message-ID: Date: Wed, 11 Sep 2019 08:23:58 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <0b12af1b27954f62a5ce715f95176d1f0ff393a3.camel@sipsolutions.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Johannes, On 9/11/19 10:12 AM, Johannes Berg wrote: > 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. > Right, but it is set for only 8k at the moment. Anyway, I will take care of this. >>>> + 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? Ah, now I see what you want. Sure I will take care of this in v4. Regards, -Denis