• Tobias Waldekranz's avatar
    net: dsa: Link aggregation support · 058102a6
    Tobias Waldekranz authored
    Monitor the following events and notify the driver when:
    
    - A DSA port joins/leaves a LAG.
    - A LAG, made up of DSA ports, joins/leaves a bridge.
    - A DSA port in a LAG is enabled/disabled (enabled meaning
      "distributing" in 802.3ad LACP terms).
    
    When a LAG joins a bridge, the DSA subsystem will treat that as each
    individual port joining the bridge. The driver may look at the port's
    LAG device pointer to see if it is associated with any LAG, if that is
    required. This is analogue to how switchdev events are replicated out
    to all lower devices when reaching e.g. a LAG.
    
    Drivers can optionally request that DSA maintain a linear mapping from
    a LAG ID to the corresponding netdev by setting ds->num_lag_ids to the
    desired size.
    
    In the event that the hardware is not capable of offloading a
    particular LAG for any reason (the typical case being use of exotic
    modes like broadcast), DSA will take a hands-off approach, allowing
    the LAG to be formed as a pure software construct. This is reported
    back through the extended ACK, but is otherwise transparent to the
    user.
    Signed-off-by: default avatarTobias Waldekranz <tobias@waldekranz.com>
    Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
    Tested-by: default avatarVladimir Oltean <olteanv@gmail.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    058102a6
dsa.h 27.8 KB