• Horatiu Vultur's avatar
    switchdev: mrp: Extend ring_role_mrp and in_role_mrp · c513efa2
    Horatiu Vultur authored
    Add the member sw_backup to the structures switchdev_obj_ring_role_mrp
    and switchdev_obj_in_role_mrp. In this way the SW can call the driver in
    2 ways, once when sw_backup is set to false, meaning that the driver
    should implement this completely in HW. And if that is not supported the
    SW will call again but with sw_backup set to true, meaning that the
    HW should help or allow the SW to run the protocol.
    
    For example when role is MRM, if the HW can't detect when it stops
    receiving MRP Test frames but it can trap these frames to CPU, then it
    needs to return -EOPNOTSUPP when sw_backup is false and return 0 when
    sw_backup is true.
    Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c513efa2
switchdev.h 9.94 KB