• Petr Machata's avatar
    net: switchdev: Add a helper to replay objects on a bridge port · f2e2857b
    Petr Machata authored
    When a front panel joins a bridge via another netdevice (typically a LAG),
    the driver needs to learn about the objects configured on the bridge port.
    When the bridge port is offloaded by the driver for the first time, this
    can be achieved by passing a notifier to switchdev_bridge_port_offload().
    The notifier is then invoked for the individual objects (such as VLANs)
    configured on the bridge, and can look for the interesting ones.
    
    Calling switchdev_bridge_port_offload() when the second port joins the
    bridge lower is unnecessary, but the replay is still needed. To that end,
    add a new function, switchdev_bridge_port_replay(), which does only the
    replay part of the _offload() function in exactly the same way as that
    function.
    
    Cc: Jiri Pirko <jiri@resnulli.us>
    Cc: Ivan Vecera <ivecera@redhat.com>
    Cc: Roopa Prabhu <roopa@nvidia.com>
    Cc: Nikolay Aleksandrov <razor@blackwall.org>
    Cc: bridge@lists.linux-foundation.org
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f2e2857b
switchdev.c 25.6 KB