]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'sja1105-fixes'
authorDavid S. Miller <davem@davemloft.net>
Fri, 19 Jun 2020 03:20:46 +0000 (20:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jun 2020 03:20:46 +0000 (20:20 -0700)
commit912b7d74f7e6f8004cc3d4a0cb26736110b2e234
tree606c4c90925209bcf64ac77e88af250e5db97f18
parent2a4be90f31c56237ceeb0acc5495cd69a6a2485a
parent336684eb06f2749870da177afa8f54203c0681e7
Merge branch 'sja1105-fixes'

Vladimir Oltean says:

====================
Fix VLAN checks for SJA1105 DSA tc-flower filters

This fixes a ridiculous situation where the driver, in VLAN-unaware
mode, would refuse accepting any tc filter:

tc filter replace dev sw1p3 ingress flower skip_sw \
dst_mac 42:be:24:9b:76:20 \
action gate (...)
Error: sja1105: Can only gate based on {DMAC, VID, PCP}.

tc filter replace dev sw1p3 ingress protocol 802.1Q flower skip_sw \
vlan_id 1 vlan_prio 0 dst_mac 42:be:24:9b:76:20 \
action gate (...)
Error: sja1105: Can only gate based on DMAC.

So, without changing the VLAN awareness state, it says it doesn't want
VLAN-aware rules, and it doesn't want VLAN-unaware rules either. One
would say it's in Schrodinger's state...

Now, the situation has been made worse by commit e0bde6fe3025 ("net:
dsa: sja1105: keep the VLAN awareness state in a driver variable"),
which made VLAN awareness a ternary attribute, but after inspecting the
code from before that patch with a truth table, it looks like the
logical bug was there even before.

While attempting to fix this, I also noticed some leftover debugging
code in one of the places that needed to be fixed. It would have
appeared in the context of patch 3/3 anyway, so I decided to create a
patch that removes it.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>