diff options
author | Vladimir Oltean <olteanv@gmail.com> | 2019-08-25 22:46:29 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-28 06:46:26 +0300 |
commit | 9b236d2a69da41da4aef3531cc3a034bf9dfc26d (patch) | |
tree | b10547c560e9d999a3772b9ebc1171f6ae88c658 /README | |
parent | 1ddc5d9484191ea6f66dcb9bcf6c99e0bbc081dd (diff) | |
download | linux-9b236d2a69da41da4aef3531cc3a034bf9dfc26d.tar.xz |
net: dsa: Advertise the VLAN offload netdev ability only if switch supports it
When adding a VLAN sub-interface on a DSA slave port, the 8021q core
checks NETIF_F_HW_VLAN_CTAG_FILTER and, if the netdev is capable of
filtering, calls .ndo_vlan_rx_add_vid or .ndo_vlan_rx_kill_vid to
configure the VLAN offloading.
DSA sets this up counter-intuitively: it always advertises this netdev
feature, but the underlying driver may not actually support VLAN table
manipulation. In that case, the DSA core is forced to ignore the error,
because not being able to offload the VLAN is still fine - and should
result in the creation of a non-accelerated VLAN sub-interface.
Change this so that the netdev feature is only advertised for switch
drivers that support VLAN manipulation, instead of checking for
-EOPNOTSUPP at runtime.
Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions