]> git.baikalelectronics.ru Git - kernel.git/commit
net: bridge: offload all port flags at once in br_setport
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 12 Feb 2021 15:15:52 +0000 (17:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Feb 2021 01:08:04 +0000 (17:08 -0800)
commit304ae3bf1c1abe66faece2040a5525392ea49f68
tree36fcb2f40791a387624d1c18564ad92c4392ba7d
parent4c08c586ff29bda47e3db14da096331d84933f48
net: bridge: offload all port flags at once in br_setport

If for example this command:

ip link set swp0 type bridge_slave flood off mcast_flood off learning off

succeeded at configuring BR_FLOOD and BR_MCAST_FLOOD but not at
BR_LEARNING, there would be no attempt to revert the partial state in
any way. Arguably, if the user changes more than one flag through the
same netlink command, this one _should_ be all or nothing, which means
it should be passed through switchdev as all or nothing.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink.c
net/bridge/br_switchdev.c