1. 19 7月, 2017 2 次提交
  2. 18 7月, 2017 3 次提交
  3. 15 6月, 2017 1 次提交
  4. 09 6月, 2017 5 次提交
  5. 08 6月, 2017 1 次提交
  6. 07 6月, 2017 1 次提交
  7. 05 6月, 2017 1 次提交
  8. 02 6月, 2017 1 次提交
  9. 27 5月, 2017 8 次提交
    • I
      mlxsw: spectrum: Implement common FID core · a1107487
      Ido Schimmel 提交于
      The device supports three types of FIDs. 802.1Q and 802.1D FIDs for
      VLAN-aware and VLAN-unaware bridges (respectively) and rFIDs to
      transport packets to the router block.
      
      The different users (e.g., bridge, router, ACLs) of the FIDs
      infrastructure need not know about the internal FIDs implementation and
      can therefore interact with it using a restricted set of exported
      functions.
      
      By encapsulating the entire FID logic and hiding it from the rest of the
      driver we get a code base that it much simpler and easier to work with
      and extend.
      
      For example, in the current Spectrum ASIC only 802.1D FIDs can be
      assigned a VNI, but future ASICs will also support 802.1Q FIDs. With
      this patch in place, support for future ASICs can be easily added by
      implementing a new FID operations according to their capabilities.
      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>
      a1107487
    • I
      mlxsw: spectrum: Replace vPorts with Port-VLAN · c57529e1
      Ido Schimmel 提交于
      As explained in the cover letter, since the introduction of the bridge
      offload in the mlxsw driver, information related to the offloaded bridge
      and bridge ports was stored in the individual port struct,
      mlxsw_sp_port.
      
      This lead to a bloated struct storing both physical properties of the
      port (e.g., autoneg status) as well as logical properties of an upper
      bridge port (e.g., learning, mrouter indication). While this might work
      well for simple devices, it proved to be hard to extend when stacked
      devices were taken into account and more advanced use-cases (e.g., IGMP
      snooping) considered.
      
      This patch removes the excess information from the above struct and
      instead stores it in more appropriate structs that represent the bridge
      port, the bridge itself and a VLAN configured on the bridge port.
      
      The membership of a port in a bridge is denoted using the Port-VLAN
      struct, which points to the bridge port and also member in the bridge
      VLAN group of the VLAN it represents. This allows us to completely
      remove the vPort abstraction and consolidate many of the code paths
      relating to VLAN-aware and unaware bridges.
      
      Note that the FID / vFID code is currently duplicated, but this will
      soon go away when the common FID core will be introduced.
      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>
      c57529e1
    • I
      mlxsw: spectrum: Don't create FIDs upon creation of VLAN uppers · ed9ddd3a
      Ido Schimmel 提交于
      Up until now we used to create FIDs upon the creation of VLAN uppers on
      top of the VLAN-aware bridge. This was done so that in case a router
      interface (RIF) was configured on top of the bridge, the FID would
      already be there.
      
      Instead, simplify the code and only create the FID upon RIF creation.
      
      This is an intermediary step towards the introduction of the common FID
      core, in which this code would be completely removed.
      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>
      ed9ddd3a
    • I
      mlxsw: spectrum: Don't lose bridge port device during enslavement · f0cebd81
      Ido Schimmel 提交于
      Currently, when port netdevs (or their uppers) are enslaved to a bridge,
      we simply propagate the CHANGEUPPER event all the way down and lose the
      context of the actual netdevice used as the bridge port.
      
      This leads to a lot of information hanging off the ports (and vPorts),
      which doesn't logically belong there, such as mrouter indication and
      unknown unicast flood state.
      
      Following patches are going to put the mlxsw_sp_port struct on diet and
      instead introduce a bridge port struct, where the above mentioned
      information belongs. But in order to do that, we need to be able to
      determine the bridge port netdevice, so propagate it down.
      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>
      f0cebd81
    • I
      mlxsw: spectrum_router: Replace vPorts with Port-VLAN · 7cbecf24
      Ido Schimmel 提交于
      We're going to get rid of vPorts completely later in the patchset, but
      the router code is self-contained, so it's a good candidate to start the
      transition with.
      
      Convert all the functions that expects to operate on a vPort to operate
      on a Port-VLAN instead.
      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>
      7cbecf24
    • 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
  10. 26 5月, 2017 2 次提交
  11. 18 5月, 2017 5 次提交
  12. 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
  13. 21 4月, 2017 5 次提交
  14. 29 3月, 2017 1 次提交
  15. 25 3月, 2017 3 次提交