• Ido Schimmel's avatar
    mlxsw: spectrum_span: Prepare work item to update mirroring agents · a8e7e6e7
    Ido Schimmel authored
    The driver updates its mirroring agents whenever it receives a
    notification about an event that can affect these. For example, the
    addition of a route might require the driver to change the egress port
    of an ERSPAN session.
    
    Currently, RTNL needs to be held when these agents are updates, so the
    driver either:
    
    1. Calls directly into the mirroring code, in case RTNL is held
    
    2. Schedules a work item that will take RTNL and call into the mirroring
    code
    
    Simplify this by having the mirroring code schedule the work item for
    the update instead of requiring callers to schedule a work item
    themselves.
    
    The conversion of the callers will be done in the next patch to make
    review easier.
    
    This will later allow us to remove RTNL from different parts of the
    driver. It will also allow us to only schedule the work item in case
    there are active mirroring agents, which is information private to the
    mirroring code.
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a8e7e6e7
spectrum_span.c 28 KB