Skip to content

Commit 5696c8a

Browse files
wkzkuba-moo
authored andcommitted
net: dsa: Don't offload port attributes on standalone ports
In a situation where a standalone port is indirectly attached to a bridge (e.g. via a LAG) which is not offloaded, do not offload any port attributes either. The port should behave as a standard NIC. Previously, on mv88e6xxx, this meant that in the following setup: br0 / team0 / \ swp0 swp1 If vlan filtering was enabled on br0, swp0's and swp1's QMode was set to "secure". This caused all untagged packets to be dropped, as their default VID (0) was not loaded into the VTU. Signed-off-by: Tobias Waldekranz <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 32d4c56 commit 5696c8a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/dsa/slave.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ static int dsa_slave_port_attr_set(struct net_device *dev,
273273
struct dsa_port *dp = dsa_slave_to_port(dev);
274274
int ret;
275275

276+
if (attr->orig_dev != dev)
277+
return -EOPNOTSUPP;
278+
276279
switch (attr->id) {
277280
case SWITCHDEV_ATTR_ID_PORT_STP_STATE:
278281
ret = dsa_port_set_state(dp, attr->u.stp_state);

0 commit comments

Comments
 (0)