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=IHJRj4jEFq6ttIG7knysvmaiyUJgYNGoCoMmFI1eherIlPsaRePnt5vV/UHbU4CqoJ UIFty1Izaiou73nHPXGjQDYYME01snLmUqZxxYV/pOYs6BMSoByJLCsjyAihKIvxrdWZ n2SSeu9pze3pvs3+ti5nyqRcTF0dvuNgwqcThng4OOpr4vyHLMRR+t/McZQtsa6jRAWl TGwnILVRNckBxk7As2SjqGYsWRv8MXPVyPiVO86/4dARMeLRdN19gSu2e3gY5ZR8qvyt jOYpF6idK+0Yi7OJVDTGC2UKaRyHw/wy5/Vd3PwwuGzrOrH7VWeUixVSN6ihfSvWqN2m nHGQ== From: Florian Fainelli Date: Wed, 13 Feb 2019 14:06:31 -0800 Message-Id: <20190213220638.1552-3-f.fainelli@gmail.com> In-Reply-To: <20190213220638.1552-1-f.fainelli@gmail.com> References: <20190213220638.1552-1-f.fainelli@gmail.com> Subject: [Bridge] [PATCH net-next 2/9] 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