Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1770763imj; Sun, 10 Feb 2019 09:55:30 -0800 (PST) X-Google-Smtp-Source: AHgI3IamMV9r/5M92AToXbfjoJ1QfbNS6Ftz+HpQ9/1UPATfKHPtnHIesY4MAgv/8EvwMUmNj6Kk X-Received: by 2002:a17:902:b908:: with SMTP id bf8mr33556769plb.56.1549821330351; Sun, 10 Feb 2019 09:55:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549821330; cv=none; d=google.com; s=arc-20160816; b=mMexlJGCwozosIwVaDDEsVZzhpYxlO5A5a0inua0nbO+FdBCGkVGQuXetGwY3oS+dB ne/eEjRcVQ5stIqyRIVZTSUP3EDZav7w+5eG0HlYgABz0S/d0vClMog78DUUSingk3tE 4/hJDojNgVL21NT5pc26fzhKX62CXl1574sUgzOik+BgC/uHvwmM7dw5EYa7FSCmfspm d7JQPgPRKdsYYJRJfX3LLrrIbtIt5Rm5zGLbQyPmatROfs63bJchFRZ8zOvrB9iVzYqf mlfyIf9m2S1LZvhFrWK3STINxwxUAVdgWccbkpVytJJTAJYHGEXh4vNdQBDXPiXH9BcP tOvQ== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=81DjCgz+iyCtT5UWtxC0sunQeOYy1ppR2RSyv4AVzCg=; b=ychkAbZ+zZTS7qWCBdV0R/1gbdRwfRdNvO0Wi++Y0lVACLvmtG5GGjjb4ybKoVkxQC NPmWq4tuN0YNYHJzO0GIIbcPwdjNEF14StXOrmo7lmkOA3syJrSpLXtvK7VXB+VflAVe N2JtgriidLME4hPY5aJh07VlOnyTpd4aIUAbqdwJDey1PEw6qXFO33gsb5g7aPNrDR6d 1bEWBUtPuRwUWIlNmUY77sbbCQWi91DcqHj6Ha5owt86sV8bt1/Woep889e3kbYl2qmX wyrdyCzVNn1ggBok1UHCHTLf0AchbvBb28RQU43QGmHf6ZCHaSVs7cTJOcy7hkoBkjxL ElCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CNJJyBLB; 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; 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 x128si8324739pfb.128.2019.02.10.09.55.14; Sun, 10 Feb 2019 09:55:30 -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=@gmail.com header.s=20161025 header.b=CNJJyBLB; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727099AbfBJRxk (ORCPT + 99 others); Sun, 10 Feb 2019 12:53:40 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:36452 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726858AbfBJRxd (ORCPT ); Sun, 10 Feb 2019 12:53:33 -0500 Received: by mail-ot1-f67.google.com with SMTP id k98so13934243otk.3; Sun, 10 Feb 2019 09:53:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=81DjCgz+iyCtT5UWtxC0sunQeOYy1ppR2RSyv4AVzCg=; b=CNJJyBLB2tLVddFJ2LsHHczCUzrZYJe/u6ZVOeym6EOWO1QRjP5hyihNVBivQ1uhSR 8knwLaI67D+lt3XKeg5r/JTvmLzUPf/u9RFutmQbgYG4YU3QqO1vNA752Oh0GAy1Ye+v eiuSrpkdK66kPRe4DfZYKrnWjthWxulQ4/hehAQZpQgKBaFgHXoA30cd2ohrJ8GxhOYo TzM0gAjPOwO/CROxdjsxhsJ1fimeWoQunp0Flkbl3kdSYDfhzVsZkiQ1uJbVm2t6HpIs gikhmHG5EIRAhiBpkAoFGtptYr/sXsSxlL+6RjRUSYKD+lUNW4srNIECQIND8JNFSoNo Uu4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=81DjCgz+iyCtT5UWtxC0sunQeOYy1ppR2RSyv4AVzCg=; b=dBoRJIgK59DXL7baaITU/jwhgdnaFY7VvgQ5ubVG+emoYGu1Nmwtq4QG8kQ+87T8xR /VS+o5NJnP5FvVkRIDJcOzzDhbOCr4ep+4KHoHywsY7Tay5Sng3WSHSL/6B0h1DY9hIp T5bevipdZgy1EEwJHWoaxNv0p5TAT0weFlCncD4P8RNhwUA/vIz+z4wcACkUTJZp6N8Q U/BEVE6vqRaNVm17bfimFnhnHVm+RP+FxM+J1ntXf6jmRPA5CWjlhNoYC/bpD8Crgzf1 PTNncaCcItjfqspFPGwED1CiTzv8vNHmMYnJM3f3It7qyHSwrve+makHVaVYX6lSFR5j BqVA== X-Gm-Message-State: AHQUAuZdogtFcL45JujMXicvivaHcHIu9S9dgNLdsHd+gx8NkloJscpp os9VhqhXeIEbvH+uAQIYAyxWOxeH X-Received: by 2002:a9d:6a:: with SMTP id 97mr8181051ota.313.1549821211584; Sun, 10 Feb 2019 09:53:31 -0800 (PST) Received: from localhost.localdomain (ip68-228-73-187.oc.oc.cox.net. [68.228.73.187]) by smtp.gmail.com with ESMTPSA id n9sm3156425otq.14.2019.02.10.09.53.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Feb 2019 09:53:30 -0800 (PST) From: Florian Fainelli To: netdev@vger.kernel.org Cc: Florian Fainelli , idosch@mellanox.com, linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, bridge@lists.linux-foundation.org, jiri@mellanox.com, andrew@lunn.ch, vivien.didelot@gmail.com Subject: [PATCH net-next v2 09/16] switchdev: Add SWITCHDEV_PORT_ATTR_SET Date: Sun, 10 Feb 2019 09:50:58 -0800 Message-Id: <20190210175105.31629-10-f.fainelli@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190210175105.31629-1-f.fainelli@gmail.com> References: <20190210175105.31629-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Jiri Pirko Signed-off-by: Florian Fainelli --- include/net/switchdev.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 96cd3e795f7f..7bc6a004d32a 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -135,6 +135,7 @@ enum switchdev_notifier_type { SWITCHDEV_PORT_OBJ_ADD, /* Blocking. */ SWITCHDEV_PORT_OBJ_DEL, /* Blocking. */ + SWITCHDEV_PORT_ATTR_SET, /* Blocking. */ SWITCHDEV_VXLAN_FDB_ADD_TO_BRIDGE, SWITCHDEV_VXLAN_FDB_DEL_TO_BRIDGE, @@ -163,6 +164,13 @@ struct switchdev_notifier_port_obj_info { bool handled; }; +struct switchdev_notifier_port_attr_info { + struct switchdev_notifier_info info; /* must be first */ + const 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.19.1