28 Sep, 2016

1 commit


27 Aug, 2016

1 commit

  • switchdev_port_fwd_mark_set() is used to set the 'offload_fwd_mark' of
    port netdevs so that packets being flooded by the device won't be
    flooded twice.

    It works by assigning a unique identifier (the ifindex of the first
    bridge port) to bridge ports sharing the same parent ID. This prevents
    packets from being flooded twice by the same switch, but will flood
    packets through bridge ports belonging to a different switch.

    This method is problematic when stacked devices are taken into account,
    such as VLANs. In such cases, a physical port netdev can have upper
    devices being members in two different bridges, thus requiring two
    different 'offload_fwd_mark's to be configured on the port netdev, which
    is impossible.

    The main problem is that packet and netdev marking is performed at the
    physical netdev level, whereas flooding occurs between bridge ports,
    which are not necessarily port netdevs.

    Instead, packet and netdev marking should really be done in the bridge
    driver with the switch driver only telling it which packets it already
    forwarded. The bridge driver will mark such packets using the mark
    assigned to the ingress bridge port and will prevent the packet from
    being forwarded through any bridge port sharing the same mark (i.e.
    having the same parent ID).

    Remove the current switchdev 'offload_fwd_mark' implementation and
    instead implement the proposed method. In addition, make rocker - the
    sole user of the mark - use the proposed method.

    Signed-off-by: Ido Schimmel
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Ido Schimmel
     

06 Apr, 2016

1 commit

  • Since there can be multiple switch ASICs on the same system we should
    use the switch ID in order to differentiate between them and set the
    switch name (e.g. swX) accordingly.

    Also, replace the order of the "Switch ID" and "Port Netdev Naming"
    sections following the above change.

    Signed-off-by: Ido Schimmel
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Ido Schimmel
     

25 Mar, 2016

1 commit


11 Jan, 2016

1 commit


30 Oct, 2015

2 commits

  • In certain use cases it is not always desirable for the switch device to
    flood traffic to CPU port. Instead, only certain packet types (e.g.
    STP, LACP) should be trapped to it.

    Signed-off-by: Ido Schimmel
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Ido Schimmel
     
  • Allow devices supporting this feature to control the flooding of unknown
    unicast traffic, by making switchdev infrastructure propagate this setting
    to the switch driver.

    Signed-off-by: Ido Schimmel
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Ido Schimmel
     

03 Oct, 2015

2 commits


25 Sep, 2015

1 commit

  • Now, the memory allocation in prepare/commit state is done separatelly
    in each driver (rocker). Introduce the similar mechanism in generic
    switchdev code, in form of queue. That can be used not only for memory
    allocations, but also for different items. Abort item destruction
    is handled as well.

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

24 Sep, 2015

1 commit


14 Aug, 2015

1 commit

  • Rocker driver tracks arp_tbl neighs to resolve IPv4 route nexthops. The
    driver uses NETEVENT_NEIGH_UPDATE for neigh adds and updates, but there is
    no event when the neigh is removed from the device (such as when the device
    goes admin down). This patches hooks ndo_neigh_destroy so the driver can
    know when a neigh is removed from the device. In response, the driver will
    purge the neigh entry from its internal tbl.

    I didn't find an in-tree users of ndo_neigh_destroy, so I'm not sure if
    this ndo is vestigial or if there are out-of-tree users. In any case, it
    does what I need here. An alternative design would be to generate
    NETEVENT_NEIGH_UPDATE event when neigh is being destroyed, setting state to
    NUD_NONE so driver knows neigh entry is dead.

    Signed-off-by: Scott Feldman
    Signed-off-by: David S. Miller

    Scott Feldman
     

21 Jul, 2015

1 commit


16 Jun, 2015

1 commit

  • We need to delete from offload the device externally learnded fdbs when any
    one of these events happen:

    1) Bridge ages out fdb. (When bridge is doing ageing vs. device doing
    ageing. If device is doing ageing, it would send SWITCHDEV_FDB_DEL
    directly).

    2) STP state change flushes fdbs on port.

    3) User uses sysfs interface to flush fdbs from bridge or bridge port:

    echo 1 >/sys/class/net/BR_DEV/bridge/flush
    echo 1 >/sys/class/net/BR_PORT/brport/flush

    4) Offload driver send event SWITCHDEV_FDB_DEL to delete fdb entry.

    For rocker, we can now get called to delete fdb entry in wait and nowait
    contexts, so set NOWAIT flag when deleting fdb entry.

    Signed-off-by: Scott Feldman
    Signed-off-by: David S. Miller

    Scott Feldman
     

04 Jun, 2015

4 commits


14 May, 2015

1 commit


13 May, 2015

1 commit

  • Much need updated of switchdev documentation to cover what's been
    implmented to-date. There are some XXX comments in the text for
    unimplemented or broken items. I'd like to keep these in there (poor-man's
    TODO list) and update the document once each issue is resolved.

    Signed-off-by: Scott Feldman
    Acked-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Scott Feldman
     

03 Dec, 2014

1 commit

  • The goal of this is to provide a possibility to support various switch
    chips. Drivers should implement relevant ndos to do so. Now there is
    only one ndo defined:
    - for getting physical switch id is in place.

    Note that user can use random port netdevice to access the switch.

    Signed-off-by: Jiri Pirko
    Reviewed-by: Thomas Graf
    Acked-by: Andy Gospodarek
    Signed-off-by: David S. Miller

    Jiri Pirko