15 Jul, 2020

4 commits


03 Jul, 2020

1 commit


02 Jun, 2020

2 commits

  • A node that has the MRA role, it can behave as MRM or MRC.

    Initially it starts as MRM and sends MRP_Test frames on both ring ports.
    If it detects that there are MRP_Test send by another MRM, then it
    checks if these frames have a lower priority than itself. In this case
    it would send MRP_Nack frames to notify the other node that it needs to
    stop sending MRP_Test frames.
    If it receives a MRP_Nack frame then it stops sending MRP_Test frames
    and starts to behave as a MRC but it would continue to monitor the
    MRP_Test frames send by MRM. If at a point the MRM stops to send
    MRP_Test frames it would get the MRM role and start to send MRP_Test
    frames.

    Signed-off-by: Horatiu Vultur
    Signed-off-by: David S. Miller

    Horatiu Vultur
     
  • Each MRP instance has a priority, a lower value means a higher priority.
    The priority of MRP instance is stored in MRP_Test frame in this way
    all the MRP nodes in the ring can see other nodes priority.

    Signed-off-by: Horatiu Vultur
    Signed-off-by: David S. Miller

    Horatiu Vultur
     

28 May, 2020

1 commit

  • This patch reworks the MRP netlink interface. Before, each attribute
    represented a binary structure which made it hard to be extended.
    Therefore update the MRP netlink interface such that each existing
    attribute to be a nested attribute which contains the fields of the
    binary structures.
    In this way the MRP netlink interface can be extended without breaking
    the backwards compatibility. It is also using strict checking for
    attributes under the MRP top attribute.

    Signed-off-by: Horatiu Vultur
    Acked-by: Nikolay Aleksandrov
    Signed-off-by: David S. Miller

    Horatiu Vultur
     

26 May, 2020

1 commit

  • The issue was reported by syzbot. When the function br_mrp_parse was
    called with a valid net_bridge_port, the net_bridge was an invalid
    pointer. Therefore the check br->stp_enabled could pass/fail
    depending where it was pointing in memory.
    The fix consists of setting the net_bridge pointer if the port is a
    valid pointer.

    Reported-by: syzbot+9c6f0f1f8e32223df9a4@syzkaller.appspotmail.com
    Fixes: 6536993371fa ("bridge: mrp: Integrate MRP into the bridge")
    Signed-off-by: Horatiu Vultur
    Acked-by: Nikolay Aleksandrov
    Signed-off-by: David S. Miller

    Horatiu Vultur
     

08 May, 2020

1 commit

  • The NL_SET_ERR_MSG_MOD macro is used to report a string describing an
    error message to userspace via the netlink extended ACK structure. It
    should not have a trailing newline.

    Add a cocci script which catches cases where the newline marker is
    present. Using this script, fix the handful of cases which accidentally
    included a trailing new line.

    I couldn't figure out a way to get a patch mode working, so this script
    only implements context, report, and org.

    Signed-off-by: Jacob Keller
    Cc: Jakub Kicinski
    Cc: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: David S. Miller

    Jacob Keller
     

28 Apr, 2020

2 commits

  • Implement netlink interface to configure MRP. The implementation
    will do sanity checks over the attributes and then eventually call the MRP
    interface.

    Signed-off-by: Horatiu Vultur
    Signed-off-by: David S. Miller

    Horatiu Vultur
     
  • Implement the MRP API.

    In case the HW can't generate MRP Test frames then the SW will try to generate
    the frames. In case that also the SW will fail in generating the frames then a
    error is return to the userspace. The userspace is responsible to generate all
    the other MRP frames regardless if the test frames are generated by HW or SW.

    The forwarding/termination of MRP frames is happening in the kernel and is done
    by the MRP instance. The userspace application doesn't do the forwarding.

    Signed-off-by: Horatiu Vultur
    Signed-off-by: David S. Miller

    Horatiu Vultur