1. 27 5月, 2017 3 次提交
    • I
      mlxsw: spectrum: Change signature of FID leave function · ce95e154
      Ido Schimmel 提交于
      When a vPort is destroyed, it leaves the FID it's currently mapped to
      (if any) and drops the reference. The FID's leave function expects to
      get the vPort as its argument, but this will have to change when the
      vPort model is retired.
      
      Change the function signature to expect a Port-VLAN struct instead and
      patch the call sites accordingly.
      
      The code introduced in this patch will be removed later in the patchset,
      but this intermediary step is required in order to ease the code review.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce95e154
    • I
      mlxsw: spectrum: Introduce Port-VLAN structure · 31a08a52
      Ido Schimmel 提交于
      This is the first step in the transition from the vPort model to a
      unified Port-VLAN structure. The new structure is defined and created /
      destroyed upon invocation of the 8021q ndos, but it's not actually used
      throughout the code.
      
      Subsequent patches will initialize it correctly and also create /
      destroy it upon switchdev's VLAN object.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31a08a52
    • I
      mlxsw: spectrum: Set port's mode according to FID mappings · 4aafc368
      Ido Schimmel 提交于
      We currently transition the port to "Virtual mode" upon the creation of
      its first VLAN upper, as we need to classify incoming packets to a FID
      using {Port, VID} and not only the VID.
      
      However, it's more appropriate to transition the port to this mode when
      the {Port, VID} are actually mapped to a FID. Either during the
      enslavement of the VLAN upper to a VLAN-unaware bridge or the
      configuration of a router port.
      
      Do this change now in preparation for the introduction of the FID core,
      where this operation will be encapsulated.
      
      To prevent regressions, this patch also explicitly configures an OVS
      slave to "Virtual mode". Otherwise, a packet that didn't hit an ACL rule
      could be classified to an existing FID based on a global VID-to-FID
      mapping, thus not incurring a FID mis-classification, which would
      otherwise trap the packet to the CPU to be processed by the OVS daemon.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4aafc368
  2. 26 5月, 2017 2 次提交
  3. 18 5月, 2017 5 次提交
  4. 01 5月, 2017 1 次提交
    • I
      mlxsw: spectrum_router: Simplify VRF enslavement · b1e45526
      Ido Schimmel 提交于
      When a netdev is enslaved to a VRF master, its router interface (RIF)
      needs to be destroyed (if exists) and a new one created using the
      corresponding virtual router (VR).
      
      >From the driver's perspective, the above is equivalent to an inetaddr
      event sent for this netdev. Therefore, when a port netdev (or its
      uppers) are enslaved to a VRF master, call the same function that
      would've been called had a NETDEV_UP was sent for this netdev in the
      inetaddr notification chain.
      
      This patch also fixes a bug when a LAG netdev with an existing RIF is
      enslaved to a VRF. Before this patch, each LAG port would drop the
      reference on the RIF, but would re-join the same one (in the wrong VR)
      soon after. With this patch, the corresponding RIF is first destroyed
      and a new one is created using the correct VR.
      
      Fixes: 7179eb5a ("mlxsw: spectrum_router: Add support for VRFs")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b1e45526
  5. 21 4月, 2017 5 次提交
  6. 29 3月, 2017 1 次提交
  7. 25 3月, 2017 3 次提交
  8. 22 3月, 2017 2 次提交
  9. 17 3月, 2017 2 次提交
  10. 13 3月, 2017 3 次提交
  11. 11 3月, 2017 5 次提交
  12. 09 3月, 2017 1 次提交
  13. 15 2月, 2017 1 次提交
  14. 11 2月, 2017 2 次提交
  15. 09 2月, 2017 1 次提交
    • I
      mlxsw: spectrum_router: Flush resources when RIF is deleted · 9665b745
      Ido Schimmel 提交于
      When the last IP address is removed from a netdev, its RIF is deleted.
      However, if user didn't first remove neighbours and nexthops using this
      interface, then they would still be present in the device's tables.
      
      Therefore, whenever a RIF is deleted, make sure all the neighbours and
      nexthops (adjacency entries) using it are removed from the relevant
      tables as well.
      
      The action associated with any route using this RIF would be refreshed,
      most likely to trap. If the kernel decides to remove the route (f.e.,
      because all the nexthops are now DEAD), then an event would be sent,
      causing the route to be removed from the device.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9665b745
  16. 07 2月, 2017 1 次提交
    • I
      mlxsw: spectrum_router: Simplify neighbour reflection · 5c8802f1
      Ido Schimmel 提交于
      Up until now we had two interfaces for neighbour related configuration:
      ndo_neigh_{construct,destroy} and NEIGH_UPDATE netevents. The ndos were
      used to add and remove neighbours from the driver's cache, whereas the
      netevent was used to reflect the neighbours into the device's tables.
      
      However, if the NUD state of a neighbour isn't NUD_VALID or if the
      neighbour is dead, then there's really no reason for us to keep it
      inside our cache. The only exception to this rule are neighbours that
      are also used for nexthops, which we periodically refresh to get them
      resolved.
      
      We can therefore eliminate the ndo entry point into the driver and
      simplify the code, making it similar to the FIB reflection, which is
      based solely on events. This also helps us avoid a locking issue, in
      which the RIF cache was traversed without proper locking during
      insertion into the neigh entry cache.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c8802f1
  17. 04 2月, 2017 2 次提交