Re: [PATCH net-next v3 1/8] net: switchdev: Add PORT_PRE_BRIDGE_FLAGS

2019-02-21 Thread Jiri Pirko
Thu, Feb 21, 2019 at 01:58:19AM CET, f.faine...@gmail.com wrote:
>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 

Acked-by: Jiri Pirko 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH net-next v3 1/8] net: switchdev: Add PORT_PRE_BRIDGE_FLAGS

2019-02-21 Thread Ido Schimmel
On Wed, Feb 20, 2019 at 04:58:19PM -0800, Florian Fainelli wrote:
> 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 

Reviewed-by: Ido Schimmel 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH net-next v3 1/8] net: switchdev: Add PORT_PRE_BRIDGE_FLAGS

2019-02-20 Thread Florian Fainelli
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

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel