From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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; bh=Y8cTug1MK//k9Db5o5+0BQipNr3buFiSVSYrdmVTLt0=; b=eF+5qWDN7kVWTIqY7Wm2yb4JW+NNHnca8Tl6RbzAdWBMFFFnfkUsk8cGJo/Rm9qfJx tnnNQMBwkdH8OvkYK4hlfdGr0ylWAP3bWGG/lDIA3DDuLqNzGQ1wk+rf7AwK+hFHpOZL p0nVPP6X70eGnkWVPrtxjotKGgS49lMf2WfHACuK3trl2bpJ4W7m+Ee5gvlm2Y+WcpqT 6TK7l6kwQXJr1igkG1rkaZEIa4LfoxPtSOC1iMspIIiQzUvRgqcWnpPgrtGh9KSZ8Lnb bzbGtCIcpO3VaRdEc7/JYrJsbXeH9GlkOaj+UXCem2ZP/Vcu4Gd0GRfPayZ3t+OjS8kS gxHg== From: Florian Fainelli Date: Wed, 20 Feb 2019 16:58:19 -0800 Message-Id: <20190221005826.26317-2-f.fainelli@gmail.com> In-Reply-To: <20190221005826.26317-1-f.fainelli@gmail.com> References: <20190221005826.26317-1-f.fainelli@gmail.com> Subject: [Bridge] [PATCH net-next v3 1/8] net: switchdev: Add PORT_PRE_BRIDGE_FLAGS List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: netdev@vger.kernel.org Cc: "open list:STAGING SUBSYSTEM" , andrew@lunn.ch, Florian Fainelli , "moderated list:ETHERNET BRIDGE" , open list , vivien.didelot@gmail.com, Ido Schimmel , jiri@mellanox.com, "David S. Miller" In preparation for removing switchdev_port_attr_get(), introduce PORT_PRE_BRIDGE_FLAGS which will be called through switchdev_port_attr_set(), in the caller's context (possibly atomic) and which must be checked by the switchdev driver in order to return whether the operation is supported or not. This is entirely analoguous to how the BRIDGE_FLAGS_SUPPORT works, except it goes through a set() instead of get(). Signed-off-by: Florian Fainelli --- include/net/switchdev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net/switchdev.h b/include/net/switchdev.h index 5e87b54c5dc5..de72b0a3867f 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -46,6 +46,7 @@ enum switchdev_attr_id { SWITCHDEV_ATTR_ID_PORT_STP_STATE, SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, + SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS, SWITCHDEV_ATTR_ID_PORT_MROUTER, SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME, SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING, @@ -61,7 +62,7 @@ struct switchdev_attr { void (*complete)(struct net_device *dev, int err, void *priv); union { u8 stp_state; /* PORT_STP_STATE */ - unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */ + unsigned long brport_flags; /* PORT_{PRE}_BRIDGE_FLAGS */ unsigned long brport_flags_support; /* PORT_BRIDGE_FLAGS_SUPPORT */ bool mrouter; /* PORT_MROUTER */ clock_t ageing_time; /* BRIDGE_AGEING_TIME */ -- 2.17.1