]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'net-dsa-mv88e6xxx-avoid-some-redundant-VTU-operations'
authorDavid S. Miller <davem@davemloft.net>
Thu, 1 Aug 2019 20:43:09 +0000 (16:43 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Aug 2019 20:43:09 +0000 (16:43 -0400)
commit6c076a76242b79b0addd9d5f53cb28d1b1e36610
tree999b497b6dbe89b138c9d63ec6fba230a78a2ff4
parentd47386cd0acfac4e669cc4f57b7edf8a83ee33ba
parentc9602ae2c11d71777eb121e67f06e0705bffa2ca
Merge branch 'net-dsa-mv88e6xxx-avoid-some-redundant-VTU-operations'

Vivien Didelot says:

====================
net: dsa: mv88e6xxx: avoid some redundant VTU operations

The mv88e6xxx driver currently uses a mv88e6xxx_vtu_get wrapper to get a
single entry and uses a boolean to eventually initialize a fresh one.

However the fresh entry is only needed in one place and mv88e6xxx_vtu_getnext
is simple enough to call it directly. Doing so makes the code easier to read,
especially for the return code expected by switchdev to honor software VLANs.

In addition to not loading the VTU again when an entry is already correctly
programmed, this also allows to avoid programming the broadcast entries
again when updating a port's membership, from e.g. tagged to untagged.

This patch series removes the mv88e6xxx_vtu_get wrapper in favor of direct
calls to mv88e6xxx_vtu_getnext, and also renames the _mv88e6xxx_port_vlan_add
and _mv88e6xxx_port_vlan_del helpers using an old underscore prefix convention.

In case the port's membership is already correctly programmed in hardware,
the following debug message may be printed:

    [  745.989884] mv88e6085 2188000.ethernet-1:00: p4: already a member of VLAN 42
====================

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