Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1024930ybe; Wed, 11 Sep 2019 08:15:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBv2DPj+NBbad896ZFS6ttE6v7bSnY1jj4FLnB0kP8IDds/YktNxPNaVNbTRehezUJNHia X-Received: by 2002:a50:fc17:: with SMTP id i23mr3378718edr.287.1568214931067; Wed, 11 Sep 2019 08:15:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568214931; cv=none; d=google.com; s=arc-20160816; b=VK6Hg5zcKUbKqVMpU8ZCTxMsk2ghYDftewUzbFSxgr+0RI5AD5X25JQdKvLyUrhJSv Dv7sa0cseXk2Jco9sMotlQQ5hhW7QmexmoRN/FY7epOx+jQSHjJl52tD3+2+p6Ib+AI1 69Wq+tHJGVfaL9p0Xf5YKVymLW3exa4hP3Mnj5l4xCMt8Nkr3Ty8lJuN4NWdTpqHsxAH +GFZ2ZiH3gJn8QsgInvwJ2QeMhu9uVM5eYJcUaMrg+dRzb3sHFWOQTP4178OCky/Ofzs mCfWD/6C6xdyJQ3qbNYqddqca0prUmnfEO97h3bulsjd1kiwGAi9bFlc6xLPaI4T2oEJ jR3g== 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:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=yWmLB2Kbbq7mFreS3QNrR5boBQ68X8mI4Axh5Z1xxEA=; b=Rtr69LxkcYHqqZ84CxLwshw7ZbIN9P9PjvJUJrX/roQ9QI2PXIdBJ226RRD1PdWBZE uH9U3BYUaCy/dll46SIXND+Gl21fuckS6Ofh3s3QAuFpLIZlQ1Bdlgo3B/N9hFgLXYiw NVrJr8AHkGmkmjkhgIF9HeMMtNcRf0z4SaTAgQqPCxHmtsLLpWYGmUVcdg3KjZC9p4Gk W41iqNERMpxnTL6nCl6C+lXQoGj2wLE5Lq1cm9FpVwCxrPFCzQ0TWrD98uTbuPwFIb6e yfp7xV4Sx3QC34jaYLq/E9x6U5vJw7LRJeTZH56IjZ/k3wI+yDIO6V8NUO8wtGPqZFNd Xlyg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d26si11059791ejb.12.2019.09.11.08.14.56; Wed, 11 Sep 2019 08:15:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728367AbfIKPMP (ORCPT + 99 others); Wed, 11 Sep 2019 11:12:15 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:42796 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727576AbfIKPMP (ORCPT ); Wed, 11 Sep 2019 11:12:15 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1i84I0-0002dk-Os; Wed, 11 Sep 2019 17:12:12 +0200 Message-ID: <0b12af1b27954f62a5ce715f95176d1f0ff393a3.camel@sipsolutions.net> Subject: Re: [RFCv3 3/3] nl80211: Send large new_wiphy events From: Johannes Berg To: Denis Kenzior , linux-wireless@vger.kernel.org Date: Wed, 11 Sep 2019 17:12:11 +0200 In-Reply-To: (sfid-20190911_161324_913292_899186EF) References: <20190906154303.9303-1-denkenz@gmail.com> <20190906154303.9303-3-denkenz@gmail.com> <127c19b1855302a467a1bdbf2f25f625a0254d9e.camel@sipsolutions.net> (sfid-20190911_161324_913292_899186EF) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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