linux/Documentation
Vladimir Oltean b117e1e8a8 net: dsa: delete dsa_legacy_fdb_add and dsa_legacy_fdb_del
We want to add reference counting for FDB entries in cross-chip
topologies, and in order for that to have any chance of working and not
be unbalanced (leading to entries which are never deleted), we need to
ensure that higher layers are sane, because if they aren't, it's garbage
in, garbage out.

For example, if we add a bridge FDB entry twice, the bridge properly
errors out:

$ bridge fdb add dev swp0 00:01:02:03:04:07 master static
$ bridge fdb add dev swp0 00:01:02:03:04:07 master static
RTNETLINK answers: File exists

However, the same thing cannot be said about the bridge bypass
operations:

$ bridge fdb add dev swp0 00:01:02:03:04:07
$ bridge fdb add dev swp0 00:01:02:03:04:07
$ bridge fdb add dev swp0 00:01:02:03:04:07
$ bridge fdb add dev swp0 00:01:02:03:04:07
$ echo $?
0

But one 'bridge fdb del' is enough to remove the entry, no matter how
many times it was added.

The bridge bypass operations are impossible to maintain in these
circumstances and lack of support for reference counting the cross-chip
notifiers is holding us back from making further progress, so just drop
support for them. The only way left for users to install static bridge
FDB entries is the proper one, using the "master static" flags.

With this change, rtnl_fdb_add() falls back to calling
ndo_dflt_fdb_add() which uses the duplicate-exclusive variant of
dev_uc_add(): dev_uc_add_excl(). Because DSA does not (yet) declare
IFF_UNICAST_FLT, this results in us going to promiscuous mode:

$ bridge fdb add dev swp0 00:01:02:03:04:05
[   28.206743] device swp0 entered promiscuous mode
$ bridge fdb add dev swp0 00:01:02:03:04:05
RTNETLINK answers: File exists

So even if it does not completely fail, there is at least some indication
that it is behaving differently from before, and closer to user space
expectations, I would argue (the lack of a "local|static" specifier
defaults to "local", or "host-only", so dev_uc_add() is a reasonable
default implementation). If the generic implementation of .ndo_fdb_add
provided by Vlad Yasevich is a proof of anything, it only proves that
the implementation provided by DSA was always wrong, by not looking at
"ndm->ndm_state & NUD_NOARP" (the "static" flag which means that the FDB
entry points outwards) and "ndm->ndm_state & NUD_PERMANENT" (the "local"
flag which means that the FDB entry points towards the host). It all
used to mean the same thing to DSA.

Update the documentation so that the users are not confused about what's
going on.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-29 10:46:23 -07:00
..
ABI net: ipa: introduce sysfs code 2021-06-11 14:13:18 -07:00
accounting
admin-guide Networking fixes for 5.13-rc4, including fixes from bpf, netfilter, 2021-05-26 17:44:49 -10:00
arm It's been a relatively busy cycle in docsland, though more than usually 2021-04-26 13:22:43 -07:00
arm64 Assorted arm64 fixes and clean-ups, the most important: 2021-05-07 12:11:05 -07:00
block Documentation: drop optional BOMs 2021-05-10 15:17:34 -06:00
bpf bpf: Add documentation for libbpf including API autogen 2021-06-18 23:06:06 +02:00
cdrom docs: cdrom-standard.rst: get rid of uneeded UTF-8 chars 2021-05-11 11:00:17 -06:00
core-api A few late-arriving documentation fixes, including some oprofile cleanup, a 2021-05-06 08:33:54 -07:00
cpu-freq
crypto
dev-tools scripts/gdb: add lx_current support for arm64 2021-05-07 00:26:33 -07:00
devicetree dt-bindings: net: bluetooth: Add device tree bindings for QTI chip wcn6750 2021-06-26 07:12:30 +02:00
doc-guide
driver-api usb: Restore the usb_header label 2021-05-21 14:41:37 +02:00
fault-injection
fb Documentation: Add leading slash to some paths 2021-03-31 13:49:19 -06:00
features powerpc updates for 5.13 2021-04-30 12:22:28 -07:00
filesystems erofs: update documentation about data compression 2021-05-11 16:47:15 +08:00
firmware_class
firmware-guide Documentation: ACPI: DSD: describe additional MAC configuration 2021-06-22 09:54:54 -07:00
fpga
gpu drm-misc-next for 5.13: 2021-04-07 17:32:12 +10:00
hid Documentation: Add leading slash to some paths 2021-03-31 13:49:19 -06:00
hwmon docs: hwmon: tmp103.rst: fix bad usage of UTF-8 chars 2021-05-11 11:00:18 -06:00
i2c
ia64
ide
iio
infiniband
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2021-05-06 23:37:55 -07:00
isdn
kbuild Kconfig updates for v5.13 2021-04-29 14:32:00 -07:00
kernel-hacking
leds Documentation: Add leading slash to some paths 2021-03-31 13:49:19 -06:00
litmus-tests
livepatch
locking
m68k
maintainer
mhi
mips
misc-devices dw-xdata-pcie: Update outdated info and improve text format 2021-04-14 19:47:28 +02:00
netlabel
networking net: dsa: delete dsa_legacy_fdb_add and dsa_legacy_fdb_del 2021-06-29 10:46:23 -07:00
nios2
nvdimm
openrisc
parisc
PCI
pcmcia
power power supply and reset changes for the v5.13 series 2021-04-28 15:43:58 -07:00
powerpc powerpc/64s/syscall: Use pt_regs.trap to distinguish syscall ABI difference between sc and scv syscalls 2021-05-21 00:58:03 +10:00
process Documentation: drop optional BOMs 2021-05-10 15:17:34 -06:00
RCU doc: Give XDP as example of non-obvious RCU reader/updater pairing 2021-06-24 19:41:14 +02:00
riscv Documentation: riscv: Add documentation that describes the VM layout 2021-04-26 08:25:05 -07:00
s390 s390/pci: expose UID uniqueness guarantee 2021-04-05 11:30:57 +02:00
scheduler sched,doc: sched_debug_verbose cmdline should be sched_verbose 2021-05-06 15:33:26 +02:00
scsi for-5.13/block-2021-04-27 2021-04-28 14:27:12 -07:00
security Documentation: drop optional BOMs 2021-05-10 15:17:34 -06:00
sh
sound
sparc
sphinx
sphinx-static
spi spi: Updates for v5.13 2021-04-26 16:32:11 -07:00
staging
target
timers Documentation: drop optional BOMs 2021-05-10 15:17:34 -06:00
trace Documentation: trace: Add documentation for TRBE 2021-04-06 16:05:38 -06:00
translations docs/zh_CN: Remove obsolete translation file 2021-05-10 15:14:31 -06:00
usb USB fixes for 5.13-rc2 2021-05-16 09:55:05 -07:00
userspace-api Documentation: seccomp: Fix user notification documentation 2021-05-28 09:54:12 -07:00
virt Bugfixes, including a TLB flush fix that affects processors 2021-06-09 13:09:57 -07:00
vm mm/slub: clarify verification reporting 2021-06-16 09:24:42 -07:00
w1
watchdog
x86 x86/msr: Rename MSR_K8_SYSCFG to MSR_AMD64_SYSCFG 2021-05-10 07:51:38 +02:00
xtensa
.gitignore
arch.rst
asm-annotations.rst
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
COPYING-logo
docutils.conf
dontdiff kbuild: generate Module.symvers only when vmlinux exists 2021-04-25 05:17:02 +09:00
index.rst
Kconfig
logo.gif
Makefile
memory-barriers.txt
SubmittingPatches
watch_queue.rst