Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp853013yba; Fri, 26 Apr 2019 09:47:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwGssF3F+gQNLs0Q6PCbw+CakQSEAXE0qpyUzPlucyY1PbDVz1W2q9KaMPQBFq+1uYIK86 X-Received: by 2002:a17:902:bcc6:: with SMTP id o6mr41545793pls.275.1556297249253; Fri, 26 Apr 2019 09:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556297249; cv=none; d=google.com; s=arc-20160816; b=mh6aygYavF6HG9Z6LZcnilM/YqlTU9qL4cpb7ErogcnDB7UzPaWF0ovfM73sEEdNE+ HGX9fqnQtEac37Qn6ruLbuIpxBOWUinBLRbw5x+CdeTk3tZiuvp8Kybzk9+1Rot0CP9D mYuqKv1ovwKH+Ijshx9QMgn3afJzJIjn7z8sNbxGS8N4CcV4WXq1CmDIeQoieXzxoIGZ ZVsU23tb6pKQO0n3Pti/dm0vXVgd5QUZvCAk16LU6jZGBvvseJd9OlTAJEqLYTu+1mub uyySX4S6Uwq2WNHhk2or4GWXZvR7Wy/tfCRdyt38vmxyKP2UMyFRrgjNhkuYNO8v5wu1 GuPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=kQYEw9/u9e2OuyKxduAFGw4CJdWDsxOU5yeJvnsWBfQ=; b=YyaAfL2IVt+ecNMH4bFsHLdF+WpWqqYJZhstVqscIw0bbzIQ+5sQy9xnfGgcPkpa/E 27DSvNB3sEdSjmJFfY3esgjPK+dHmpEHr5K8OFDayir6AicKrN8x9LTNJOhCgUoQCDEt TInslrrNtY7iuwVTpu0jLKaJZXyA2NQxXWjUTKs2LWWck3rJGSMmncqaPaD+XFPtjh+C JkcRAe95wklUzAJEhhhBImlZw1pfqL5PqIapk/aCosQzrL5VSXo5gEbSjfHRrHuBSumx Lpvd/IkSTOuDTO3MtyZTiUiH93+PsUw0pR2btKny+/ctVLv+z90NV3dHvIXbAOvhEoZH RHVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 b66si12456914pfa.104.2019.04.26.09.47.14; Fri, 26 Apr 2019 09:47:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726390AbfDZQpN (ORCPT + 99 others); Fri, 26 Apr 2019 12:45:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:53506 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726049AbfDZQpN (ORCPT ); Fri, 26 Apr 2019 12:45:13 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 02AA5ACB1; Fri, 26 Apr 2019 16:45:11 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 3B8B5E0143; Fri, 26 Apr 2019 18:45:11 +0200 (CEST) Date: Fri, 26 Apr 2019 18:45:11 +0200 From: Michal Kubecek To: netdev@vger.kernel.org Cc: Johannes Berg , David Ahern , "David S. Miller" , Jiri Pirko , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "netfilter-devel@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next 0/3] make nla_nest_start() add NLA_F_NESTED flag Message-ID: <20190426164511.GJ26549@unicorn.suse.cz> References: <1dcb87486a96785e3b9e6f337392aa904d977a0d.camel@sipsolutions.net> <20190426111954.GG26549@unicorn.suse.cz> <20190426115629.GH26549@unicorn.suse.cz> <18db9ac8b398b215e3523dd5b79c7f86e21864ce.camel@sipsolutions.net> <47f6daf9-2d14-1566-8ed1-fb5d4dd57bf8@gmail.com> <9d9f2e4465ce80593b3a5d08e9948304bdcefbf4.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9d9f2e4465ce80593b3a5d08e9948304bdcefbf4.camel@sipsolutions.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 26, 2019 at 06:02:38PM +0200, Johannes Berg wrote: > On Fri, 2019-04-26 at 09:00 -0600, David Ahern wrote: > > > > What is a valid use case for an attribute sometimes being a nest and > > sometimes not? That seems really weird to me (ie., wrong). They should > > be 2 separate attributes even if the backend processing is the same. > > Yeah, well, in the mentioned case - NL80211_ATTR_VENDOR_DATA - we > basically have something that each driver (sometimes each operation that > uses it) decides what it means, and most drivers like proper netlink > attributes so have nested stuff there. Sometimes not, though in Prague > we decided we should make that documented by requiring a nested policy > and (perhaps, TBD) using something like an ERR_PTR() for "I really want > this to be binary". > > I think as far as this particular attribute is concerned the ship has > sailed, but in the future I'd probably advocate having two attributes. Or put the binary into the nest which would also make it easier to add more data or switch to structured information later. Michal