Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp1812378ima; Sat, 2 Feb 2019 07:58:35 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia9NpodTk/YtQKKIpvBql6Tj5I/gPS6ZlXMa+oSKWFpn1BOxsTyjk8P4r36Lkf+UoDOr+oz X-Received: by 2002:a17:902:32b:: with SMTP id 40mr2925654pld.327.1549123115775; Sat, 02 Feb 2019 07:58:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549123115; cv=none; d=google.com; s=arc-20160816; b=0UJOvwluATp8LJ/qR8r21hyI9NK34qPKNdJMyrTNBnyzdJ/+jiwJ7EDXYSg6GF+0Du VCCbQqZURpdR/Zu+uKZ89EHlTPtB+DeHxVWuzpdtxYJq9GE0Khvjdg80/6usMXxdRIxv 0SMvNimdcCsV+mB4GhsKuxPm/veUoIISma8+koUZ/3wRtS/r/IQUEZiSyX1u2tETMRr0 YzBNJeRMzK7XYrwnq9XGNUDPZOSbD1C5VwDx24kOdL7r7OG7U4dWfDucl/g4lHzWPQhg p/5iDZL+h5HcbTvX0WDffKPxdZVAbCHFTBS7lea+UrbZ8EuKlaraqnP/WExoSPiLzIOv nDqQ== 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:dkim-signature; bh=SNR7K3ca91hxNke7Mc6m88At/9fi9nnjgPZ6cpHIlKU=; b=LaJk5Z17rocEC6jrW90fmQhVlgMKEv8bvXwRVIKy8ps+Fh1jPze9NmfKa8xXp4BBhV 6kcCxFgI6e/PQWv1smU1bbaD637mb4HsotTa/KfVPAXxEM0QSzXyuyXKjXmoxProFJNv 3tnv1hGFScRP0jM3CsYqU0TzpAguIr0pHTnwq96BiJe2HtuGj5B/l9oLXZZlKGZa/43P coTpK8sLcaajm4ZI6AlPpQ7aLPbBbryw0pKFLcRE+7uSm/g3nZijRhe0R12eyM7i1SKS eviPbSIZV54CS1oLDx9z4wMsOjRbhcVegwBOPqdWFNUtgRho/exPmeLNdbO0YtY1LHR5 9Rcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b="uw/3rf51"; 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 p66si10598087pfp.144.2019.02.02.07.58.19; Sat, 02 Feb 2019 07:58:35 -0800 (PST) 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; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b="uw/3rf51"; 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 S1728051AbfBBP5j (ORCPT + 99 others); Sat, 2 Feb 2019 10:57:39 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55518 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727790AbfBBP5i (ORCPT ); Sat, 2 Feb 2019 10:57:38 -0500 Received: by mail-wm1-f66.google.com with SMTP id y139so8970922wmc.5 for ; Sat, 02 Feb 2019 07:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=SNR7K3ca91hxNke7Mc6m88At/9fi9nnjgPZ6cpHIlKU=; b=uw/3rf51ZVDR08cViEt5HKJu3ORmX3eHj4/RYvLjhtp4/tWI2H1umb1tdvIM41mOYg 7PZa5MAlukOGLAEs997lWpmiCtYQW1KXFXi59OWShUx+Fr7SgvkdYxAAOLUI7kFnBA/a 7ku1QcR389zvk7f1Q7Sw7oIf0dbbsZ6yHe6j3g3H4EDclEcZYZfZ1Z8choIBMZbnTLep Kep47pJ7jVY6/oAVnDeUeBiowDJCNLgctsjkAO76ZaB5XC+iX72bC3iveOKhMp0+9KFl 5pb+900C5dKO23p5hGhRPwuhj3txfjXyL+Im52utCXFAFB6lhwYWek2G4QXav/eWeMmI n1NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=SNR7K3ca91hxNke7Mc6m88At/9fi9nnjgPZ6cpHIlKU=; b=rzJjAO62vPV3vEalrNR/HXHLGVPuh6y/zeNl4tXw4SUhF4OgG/1LElcpQ+ZFGD6zBG TWWRFUG1/SSALm3wdbx9PcGaGJQhra+KVnjSxVX+bUrr6Eidp9TAAesD+PiTaRqubDKv IBEYkNNxz0WWpXcFgXCcOls8c2ux0FoSWvuZEJpIAJXtcII6QFgGR4unWLftdb1+EU02 EdYvp27aZxQUra4MmtcCTi6FQJdhDoNmXoQU6IRU7YeBdCI+pNSW/FnyEe3IZjSb1udW WxsLKidgyTCmSh1CvOREHKiN44rptqrv90rggSMokv6PXajWeLCkfv15UNdHfRuE2UVe MnIg== X-Gm-Message-State: AHQUAuYzSbpZoVOeWKgAueydFXhu1ETkgMLHznTAlbmOLkHVUwoLsAI4 eca8WslE/Squhj/ZhTplvjp2Dw== X-Received: by 2002:a1c:cf0d:: with SMTP id f13mr5319941wmg.70.1549123056723; Sat, 02 Feb 2019 07:57:36 -0800 (PST) Received: from localhost (jirka.pirko.cz. [84.16.102.26]) by smtp.gmail.com with ESMTPSA id o4sm8593743wrq.66.2019.02.02.07.57.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Feb 2019 07:57:35 -0800 (PST) Date: Sat, 2 Feb 2019 16:48:32 +0100 From: Jiri Pirko To: Florian Fainelli Cc: netdev@vger.kernel.org, Michael Chan , "David S. Miller" , Derek Chickles , Satanand Burla , Felix Manlunas , Saeed Mahameed , Leon Romanovsky , Jiri Pirko , Ido Schimmel , Alexandre Belloni , Microchip Linux Driver Support , Jakub Kicinski , Ioana Radulescu , Ioana Ciornei , Greg Kroah-Hartman , Ivan Vecera , Andrew Lunn , Vivien Didelot , Dirk van der Merwe , "Francois H. Theron" , Simon Horman , Quentin Monnet , Daniel Borkmann , Eric Dumazet , John Hurley , Edwin Peer , open list , "open list:MELLANOX MLX5 core VPI driver" , "open list:NETRONOME ETHERNET DRIVERS" , "open list:STAGING SUBSYSTEM" Subject: Re: [RFC net-next 01/13] switchdev: Add SWITCHDEV_PORT_ATTR_SET, SWITCHDEV_PORT_ATTR_GET Message-ID: <20190202154832.GC2778@nanopsycho> References: <20190201220657.30170-1-f.fainelli@gmail.com> <20190201220657.30170-2-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190201220657.30170-2-f.fainelli@gmail.com> 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 Fri, Feb 01, 2019 at 11:06:45PM CET, f.fainelli@gmail.com wrote: >In preparation for allowing switchdev enabled drivers to veto specific >attribute settings from within the context of the caller, introduce a >new switchdev notifier type for port attributes. > >Suggested-by: Ido Schimmel >Signed-off-by: Florian Fainelli >--- > include/net/switchdev.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/include/net/switchdev.h b/include/net/switchdev.h >index 63843ae5dc81..e62fb2693e00 100644 >--- a/include/net/switchdev.h >+++ b/include/net/switchdev.h >@@ -145,6 +145,9 @@ enum switchdev_notifier_type { > SWITCHDEV_VXLAN_FDB_ADD_TO_DEVICE, > SWITCHDEV_VXLAN_FDB_DEL_TO_DEVICE, > SWITCHDEV_VXLAN_FDB_OFFLOADED, >+ >+ SWITCHDEV_PORT_ATTR_SET, /* Blocking. */ >+ SWITCHDEV_PORT_ATTR_GET, /* Blocking. */ Not an UAPI, so you can put this right next to PORT_OBJ_* if needed. > }; > > struct switchdev_notifier_info { >@@ -167,6 +170,13 @@ struct switchdev_notifier_port_obj_info { > bool handled; > }; > >+struct switchdev_notifier_port_attr_info { >+ struct switchdev_notifier_info info; /* must be first */ >+ struct switchdev_attr *attr; >+ struct switchdev_trans *trans; >+ bool handled; >+}; >+ > static inline struct net_device * > switchdev_notifier_info_to_dev(const struct switchdev_notifier_info *info) > { >-- >2.17.1 >