linux/drivers/net
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
..
appletalk
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-01-08 13:28:00 -08:00
dsa net: dsa: remove the transactional logic from VLAN objects 2021-01-11 16:00:57 -08:00
ethernet net: switchdev: remove the transaction structure from port attributes 2021-01-11 16:00:57 -08:00
fddi
fjes
hamradio
hippi
hyperv Networking fixes for 5.11-rc1. 2020-12-17 13:45:24 -08:00
ieee802154
ipa net: ipa: support COMPILE_TEST 2021-01-09 13:51:37 -08:00
ipvlan net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
mdio
netdevsim net: remove ndo_udp_tunnel_* callbacks 2021-01-07 12:53:29 -08:00
pcs
phy net: phy: replace mutex_is_locked with lockdep_assert_held in phylib 2021-01-07 14:53:07 -08:00
plip
ppp ppp: clean up endianness conversions 2021-01-08 19:26:23 -08:00
slip
team net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-01-08 13:28:00 -08:00
vmxnet3
wan Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-01-08 13:28:00 -08:00
wireguard selinux/stable-5.11 PR 20201214 2020-12-16 11:01:04 -08:00
wireless wil6210: select CONFIG_CRC32 2021-01-05 15:50:36 -08:00
xen-netback net: group skb_shinfo zerocopy related bits together. 2021-01-07 16:08:37 -08:00
bareudp.c net: bareudp: add missing error handling for bareudp_link_config() 2021-01-06 15:56:44 -08:00
dummy.c
eql.c
geneve.c udp_tunnel: remove REGISTER/UNREGISTER handling from tunnel drivers 2021-01-07 12:53:29 -08:00
gtp.c
ifb.c
Kconfig net: fix spelling mistake "wil" -> "will" in Kconfig 2020-12-05 15:17:19 -08:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c macvlan: remove redundant null check on data 2021-01-05 16:52:02 -08:00
macvtap.c
Makefile
mdio.c
mhi_net.c net: mhi: Add raw IP mode support 2021-01-05 15:37:29 -08:00
mii.c
net_failover.c
netconsole.c
nlmon.c net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c tap/tun: add skb_zcopy_init() helper for initialization. 2021-01-07 16:08:37 -08:00
thunderbolt.c USB / Thunderbolt patches for 5.11-rc1 2020-12-15 13:54:56 -08:00
tun.c tap/tun: add skb_zcopy_init() helper for initialization. 2021-01-07 16:08:37 -08:00
veth.c Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-12-04 07:48:12 -08:00
virtio_net.c Networking fixes for 5.11-rc3, including fixes from netfilter, wireless 2021-01-05 12:38:56 -08:00
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-11 22:29:38 -08:00
vsockmon.c net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
vxlan.c udp_tunnel: remove REGISTER/UNREGISTER handling from tunnel drivers 2021-01-07 12:53:29 -08:00
xen-netfront.c xsk: Propagate napi_id to XDP socket Rx path 2020-12-01 00:09:25 +01:00