Re: [PATCH net-next v3 06/13] net: dsa: Add support for querying supported bridge flags

2017-08-07 Thread Florian Fainelli
On 08/06/2017 06:15 AM, Arkadi Sharshevsky wrote:
> The DSA drivers do not support bridge flags offload. Yet, this attribute
> should be added in order for the bridge to fail when one tries set a
> flag on the port, as explained in commit dc0ecabd6231 ("net: switchdev:
> Add support for querying supported bridge flags by hardware").
> 
> Signed-off-by: Arkadi Sharshevsky 
> Reviewed-by: Vivien Didelot 

Reviewed-by: Florian Fainelli 
-- 
Florian


[PATCH net-next v3 06/13] net: dsa: Add support for querying supported bridge flags

2017-08-06 Thread Arkadi Sharshevsky
The DSA drivers do not support bridge flags offload. Yet, this attribute
should be added in order for the bridge to fail when one tries set a
flag on the port, as explained in commit dc0ecabd6231 ("net: switchdev:
Add support for querying supported bridge flags by hardware").

Signed-off-by: Arkadi Sharshevsky 
Reviewed-by: Vivien Didelot 
---
 net/dsa/slave.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 2cf1c94..9205fda 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -324,6 +324,9 @@ static int dsa_slave_port_attr_get(struct net_device *dev,
attr->u.ppid.id_len = sizeof(ds->index);
memcpy(&attr->u.ppid.id, &ds->index, attr->u.ppid.id_len);
break;
+   case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT:
+   attr->u.brport_flags_support = 0;
+   break;
default:
return -EOPNOTSUPP;
}
-- 
2.4.11