linux/drivers/net/dsa/mv88e6xxx
Vladimir Oltean 1958d5815c net: dsa: remove the transactional logic from VLAN objects
It should be the driver's business to logically separate its VLAN
offloading into a preparation and a commit phase, and some drivers don't
need / can't do this.

So remove the transactional shim from DSA and let drivers propagate
errors directly from the .port_vlan_add callback.

It would appear that the code has worse error handling now than it had
before. DSA is the only in-kernel user of switchdev that offloads one
switchdev object to more than one port: for every VLAN object offloaded
to a user port, that VLAN is also offloaded to the CPU port. So the
"prepare for user port -> check for errors -> prepare for CPU port ->
check for errors -> commit for user port -> commit for CPU port"
sequence appears to make more sense than the one we are using now:
"offload to user port -> check for errors -> offload to CPU port ->
check for errors", but it is really a compromise. In the new way, we can
catch errors from the commit phase that we previously had to ignore.
But we have our hands tied and cannot do any rollback now: if we add a
VLAN on the CPU port and it fails, we can't do the rollback by simply
deleting it from the user port, because the switchdev API is not so nice
with us: it could have simply been there already, even with the same
flags. So we don't even attempt to rollback anything on addition error,
just leave whatever VLANs managed to get offloaded right where they are.
This should not be a problem at all in practice.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-11 16:00:57 -08:00
..
chip.c net: dsa: remove the transactional logic from VLAN objects 2021-01-11 16:00:57 -08:00
chip.h net: dsa: mv88e6xxx: Don't force link when using in-band-status 2020-11-25 17:58:06 -08:00
devlink.c Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-12 16:54:48 -08:00
devlink.h net: dsa: mv88e6xxx: Implement devlink info get callback 2020-09-18 18:18:30 -07:00
global1_atu.c net: mv88e6xxx: convert comma to semicolon 2020-12-09 16:23:08 -08:00
global1_vtu.c Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-19 19:08:46 -08:00
global1.c net: dsa: mv88e6xxx: Wait for EEPROM done after HW reset 2020-11-18 11:24:44 -08:00
global1.h Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-19 19:08:46 -08:00
global2_avb.c
global2_scratch.c net: dsa: mv88e6xxx: scratch: Fixup kerneldoc 2020-07-05 15:43:01 -07:00
global2.c net: dsa: mv88e6xxx: Remove set but unused variable 2020-07-05 15:43:01 -07:00
global2.h net: dsa: mv8e6xxx: Fix stub function parameters 2019-11-06 21:42:53 -08:00
hwtstamp.c net: dsa: mv88e6xxx: Use generic helper function 2020-08-19 16:07:49 -07:00
hwtstamp.h
Kconfig net: Make PTP-specific drivers depend on PTP_1588_CLOCK 2020-05-01 15:27:51 -07:00
Makefile net: dsa: mv88e6xxx: Move devlink code into its own file 2020-09-18 18:17:45 -07:00
phy.c
phy.h
port_hidden.c
port.c net: dsa: mv88e6xxx: Don't force link when using in-band-status 2020-11-25 17:58:06 -08:00
port.h net: dsa: mv88e6xxx: Don't force link when using in-band-status 2020-11-25 17:58:06 -08:00
ptp.c mv88e6xxx: Reject requests to enable time stamping on both edges. 2019-11-15 12:48:32 -08:00
ptp.h
serdes.c net: dsa: mv88e6xxx: Handle error in serdes_get_regs 2020-11-25 17:58:06 -08:00
serdes.h net: dsa: mv88e6xxx: Add serdes interrupt support for MV88E6097 2020-11-25 17:58:06 -08:00
smi.c
smi.h