• Petr Machata's avatar
    switchdev: Add a blocking notifier chain · a93e3b17
    Petr Machata authored
    In general one can't assume that a switchdev notifier is called in a
    non-atomic context, and correspondingly, the switchdev notifier chain is
    an atomic one.
    
    However, port object addition and deletion messages are delivered from a
    process context. Even the MDB addition messages, whose delivery is
    scheduled from atomic context, are queued and the delivery itself takes
    place in blocking context. For VLAN messages in particular, keeping the
    blocking nature is important for error reporting.
    
    Therefore introduce a blocking notifier chain and related service
    functions to distribute the notifications for which a blocking context
    can be assumed.
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a93e3b17
switchdev.c 16.4 KB