1. 12 10月, 2018 6 次提交
  2. 11 10月, 2018 1 次提交
  3. 05 10月, 2018 2 次提交
  4. 24 9月, 2018 1 次提交
    • P
      mlxsw: Make MLXSW_SP1_FWREV_MINOR a hard requirement · 12ba7e10
      Petr Machata 提交于
      Up until now, mlxsw tolerated firmware versions that weren't exactly
      matching the required version, if the branch number matched. That
      allowed the users to test various firmware versions as long as they were
      on the right branch.
      
      On the other hand, it made it impossible for mlxsw to put a hard lower
      bound on a version that fixes all problems known to date. If a user had
      a somewhat older FW version installed, mlxsw would start up just fine,
      possibly performing non-optimally as it would use features that trigger
      problematic behavior.
      
      Therefore tweak the check to accept any FW version that is:
      
      - on the same branch as the preferred version, and
      - the same as or newer than the preferred version.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12ba7e10
  5. 20 9月, 2018 11 次提交
  6. 05 9月, 2018 1 次提交
    • P
      mlxsw: spectrum_buffers: Set up a dedicated pool for BUM traffic · 3a3539cd
      Petr Machata 提交于
      MC-aware mode was recently enabled by mlxsw on Spectrum switches in
      commit 7b819530 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw
      ports"). Unfortunately, testing has shown that the fix is incomplete and
      in the presented form actually makes the problem even worse, because any
      amount of MC traffic causes UC disruption.
      
      The reason for this is that currently, mlxsw configures the MC-specific
      TCs (8..15) to map to pool 0. It also configures a maximum buffer size
      of 0, but for MC traffic that maximum is disregarded and not part of the
      quota. Therefore MC traffic is always admitted to the egress buffer.
      
      Fix the configuration by directing the MC TCs into pool 15, which is
      dedicated to MC traffic and recognized as such by the silicon.
      
      Fixes: 7b819530 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3a3539cd
  7. 26 8月, 2018 1 次提交
    • I
      mlxsw: spectrum_switchdev: Do not leak RIFs when removing bridge · 602b74ed
      Ido Schimmel 提交于
      When a bridge device is removed, the VLANs are flushed from each
      configured port. This causes the ports to decrement the reference count
      on the associated FIDs (filtering identifier). If the reference count of
      a FID is 1 and it has a RIF (router interface), then this RIF is
      destroyed.
      
      However, if no port is member in the VLAN for which a RIF exists, then
      the RIF will continue to exist after the removal of the bridge. To
      reproduce:
      
      # ip link add name br0 type bridge vlan_filtering 1
      # ip link set dev swp1 master br0
      # ip link add link br0 name br0.10 type vlan id 10
      # ip address add 192.0.2.0/24 dev br0.10
      # ip link del dev br0
      
      The RIF associated with br0.10 continues to exist.
      
      Fix this by iterating over all the bridge device uppers when it is
      destroyed and take care of destroying their RIFs.
      
      Fixes: 99f44bb3 ("mlxsw: spectrum: Enable L3 interfaces on top of bridge devices")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      602b74ed
  8. 22 8月, 2018 1 次提交
  9. 11 8月, 2018 2 次提交
  10. 10 8月, 2018 7 次提交
  11. 06 8月, 2018 3 次提交
  12. 04 8月, 2018 4 次提交
    • N
      mlxsw: core_acl_flex_actions: Remove redundant mirror resource destruction · caebd1b3
      Nir Dotan 提交于
      In previous patch mlxsw_afa_resource_del() was added to avoid a duplicate
      resource detruction scenario.
      For mirror actions, such duplicate destruction leads to a crash as in:
      
       # tc qdisc add dev swp49 ingress
       # tc filter add dev swp49 parent ffff: \
         protocol ip chain 100 pref 10 \
         flower skip_sw dst_ip 192.168.101.1 action drop
       # tc filter add dev swp49 parent ffff: \
         protocol ip pref 10 \
         flower skip_sw dst_ip 192.168.101.1 action goto chain 100 \
         action mirred egress mirror dev swp4
      
      Therefore add a call to mlxsw_afa_resource_del() in
      mlxsw_afa_mirror_destroy() in order to clear that resource
      from rule's resources.
      
      Fixes: d0d13c18 ("mlxsw: spectrum_acl: Add support for mirror action")
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      caebd1b3
    • N
      mlxsw: core_acl_flex_actions: Remove redundant counter destruction · 7cc61694
      Nir Dotan 提交于
      Each tc flower rule uses a hidden count action. As counter resource may
      not be available due to limited HW resources, update _counter_create()
      and _counter_destroy() pair to follow previously introduced symmetric
      error condition handling, add a call to mlxsw_afa_resource_del() as part
      of the counter resource destruction.
      
      Fixes: c18c1e18 ("mlxsw: core: Make counter index allocated inside the action append")
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Reviewed-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7cc61694
    • N
      mlxsw: core_acl_flex_actions: Remove redundant resource destruction · dda0a3a3
      Nir Dotan 提交于
      Some ACL actions require the allocation of a separate resource
      prior to applying the action itself. When facing an error condition
      during the setup phase of the action, resource should be destroyed.
      For such actions the destruction was done twice which is dangerous
      and lead to a potential crash.
      The destruction took place first upon error on action setup phase
      and then as the rule was destroyed.
      
      The following sequence generated a crash:
      
       # tc qdisc add dev swp49 ingress
       # tc filter add dev swp49 parent ffff: \
         protocol ip chain 100 pref 10 \
         flower skip_sw dst_ip 192.168.101.1 action drop
       # tc filter add dev swp49 parent ffff: \
         protocol ip pref 10 \
         flower skip_sw dst_ip 192.168.101.1 action goto chain 100 \
         action mirred egress mirror dev swp4
      
      Therefore add mlxsw_afa_resource_del() as a complement of
      mlxsw_afa_resource_add() to add symmetry to resource_list membership
      handling. Call this from mlxsw_afa_fwd_entry_ref_destroy() to make the
      _fwd_entry_ref_create() and _fwd_entry_ref_destroy() pair of calls a
      NOP.
      
      Fixes: 140ce421 ("mlxsw: core: Convert fwd_entry_ref list to be generic per-block resource list")
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dda0a3a3
    • N
      mlxsw: core_acl_flex_actions: Return error for conflicting actions · 3757b255
      Nir Dotan 提交于
      Spectrum switch ACL action set is built in groups of three actions
      which may point to additional actions. A group holds a single record
      which can be set as goto record for pointing at a following group
      or can be set to mark the termination of the lookup. This is perfectly
      adequate for handling a series of actions to be executed on a packet.
      While the SW model allows configuration of conflicting actions
      where it is clear that some actions will never execute, the mlxsw
      driver must block such configurations as it creates a conflict
      over the single terminate/goto record value.
      
      For a conflicting actions configuration such as:
      
       # tc filter add dev swp49 parent ffff: \
         protocol ip pref 10 \
         flower skip_sw dst_ip 192.168.101.1 \
         action goto chain 100 \
         action mirred egress mirror dev swp4
      
      Where it is clear that the last action will never execute, the
      mlxsw driver was issuing a warning instead of returning an error.
      Therefore replace that warning with an error for this specific
      case.
      
      Fixes: 4cda7d8d ("mlxsw: core: Introduce flexible actions support")
      Signed-off-by: NNir Dotan <nird@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3757b255