Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp808910yba; Fri, 26 Apr 2019 09:05:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUsL+3MP+8//OtXgdcF9u/F6BLnBeQnb5Q+RG3sdg2AcCYvixloeH6J04kvbhfFWXRJJid X-Received: by 2002:a17:902:44c:: with SMTP id 70mr36310901ple.31.1556294737552; Fri, 26 Apr 2019 09:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556294737; cv=none; d=google.com; s=arc-20160816; b=Q0COjWtD7ycyQL5xJtVMCO6bnddw4j4cb0mDvj+2DCUE7WB/44ycy5I6zE9PXc6Xbg l1rYUW+JjYDphr7BfRUMcEH55zOaHKA6TlMd+OuH2pq9nopvYgOIlw1pNnRc74svV1S5 zXpODwWLXWy5IvdG8Bt1FJhBPBCPWe09HbdncH9QzBQcJLaf70j/DxHfh5XfwwGPCMxu bDEdtnsv8CX5IkQsVbkLWLXnRoIVaDLn0rCP/G8b/UjsfbGWxAjSzFTAFgr/8M3Y4i/O H+cQ1BzfRg+WoouV4YhGq+/a41yt/JtaSHUFKFKLfEnfQicVGDkzHYm82YEiYSyof9MT JKhw== 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 :references:in-reply-to:date:cc:to:from:subject:message-id; bh=EqOtDRApeYOqru3m46beANjobPQOlZc/lojzNS9ULl8=; b=Mrl95BIyWfft0F5/UViBcoSyqZSIqsp6HWUD/G6BC8Um5pssDcSqp2ppBW8VAu/YHM uo8zUdWGfQSOXhOyXaYJpmTEDPitc29UyEResLFWUowryWdUnztnk/LVqJwxK6l2jvZb 9ZNOskt32hTXDhG6xu1WV+SHpXp59IPDeGgElCutAQJnDa3a33umaSqdf6p06iwOQF11 7cBzpUpl5hpNnbl6lGmnu/JSUYExLu8wQSyKNFau/ZNlxb/H1hdKliOeZ9tsib3MX+sU MeMn91EzjLYP1swEV/gyj555UeUu8ohPeoeq6/4AtIK9VDgzbCoIUIcK/gysVAA4tZ4W YDkQ== 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 89si25719875pld.265.2019.04.26.09.05.21; Fri, 26 Apr 2019 09:05:37 -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 S1726503AbfDZQCu (ORCPT + 99 others); Fri, 26 Apr 2019 12:02:50 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:36794 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726172AbfDZQCr (ORCPT ); Fri, 26 Apr 2019 12:02:47 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hK3J9-000329-FD; Fri, 26 Apr 2019 18:02:39 +0200 Message-ID: <9d9f2e4465ce80593b3a5d08e9948304bdcefbf4.camel@sipsolutions.net> Subject: Re: [PATCH net-next 0/3] make nla_nest_start() add NLA_F_NESTED flag From: Johannes Berg To: David Ahern , Michal Kubecek , netdev@vger.kernel.org Cc: "David S. Miller" , Jiri Pirko , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "netfilter-devel@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Fri, 26 Apr 2019 18:02:38 +0200 In-Reply-To: <47f6daf9-2d14-1566-8ed1-fb5d4dd57bf8@gmail.com> (sfid-20190426_170019_042586_CEF2CE11) 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> (sfid-20190426_170019_042586_CEF2CE11) Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-2.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. johannes