1. 24 11月, 2018 2 次提交
    • P
      switchdev: Replace port obj add/del SDO with a notification · d17d9f5e
      Petr Machata 提交于
      Drop switchdev_ops.switchdev_port_obj_add and _del. Drop the uses of
      this field from all clients, which were migrated to use switchdev
      notification in the previous patches.
      
      Add a new function switchdev_port_obj_notify() that sends the switchdev
      notifications SWITCHDEV_PORT_OBJ_ADD and _DEL.
      
      Update switchdev_port_obj_del_now() to dispatch to this new function.
      Drop __switchdev_port_obj_add() and update switchdev_port_obj_add()
      likewise.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d17d9f5e
    • P
      mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL · 52a227b3
      Petr Machata 提交于
      Following patches will change the way of distributing port object
      changes from a switchdev operation to a switchdev notifier. The
      switchdev code currently recursively descends through layers of lower
      devices, eventually calling the op on a front-panel port device. The
      notifier will instead be sent referencing the bridge port device, which
      may be a stacking device that's one of front-panel ports uppers, or a
      completely unrelated device.
      
      To handle SWITCHDEV_PORT_OBJ_ADD and _DEL, subscribe to the blocking
      notifier chain. Dispatch to mlxsw_sp_port_obj_add() resp. _del() to
      maintain the behavior that the switchdev operation based code currently
      has. Defer to switchdev_handle_port_obj_add() / _del() to handle the
      recursive descend, because mlxsw supports a number of upper types.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      52a227b3
  2. 22 11月, 2018 7 次提交
  3. 21 11月, 2018 1 次提交
    • V
      mlxsw: core: Extend cooling device with cooling levels · a421ce08
      Vadim Pasternak 提交于
      Extend cooling device with cooling levels vector to allow more
      flexibility of PWM setting.
      
      Thermal zone algorithm operates with the numerical states for PWM
      setting. Each state is the index, defined in range from 0 to 10 and it's
      mapped to the relevant duty cycle value, which is written to PWM
      controller. With the current definition fan speed is set to 0% for state
      0, 10% for state 1, and so on up to 100% for the maximum state 10.
      
      Some systems have limitation for the PWM speed minimum. For such systems
      PWM setting speed to 0% will just disable the ability to increase speed
      anymore and such device will be stall on zero speed.  Cooling levels
      allow to configure state vector according to the particular system
      requirements. For example, if PWM speed is not allowed to be below 30%,
      cooling levels could be configured as 30%, 30%, 30%, 30%, 40%, 50% and
      so on.
      Signed-off-by: NVadim Pasternak <vadimp@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>
      a421ce08
  4. 19 11月, 2018 1 次提交
  5. 16 11月, 2018 7 次提交
  6. 04 11月, 2018 1 次提交
  7. 01 11月, 2018 2 次提交
    • P
      mlxsw: spectrum: Set minimum shaper on MC TCs · 0fe64023
      Petr Machata 提交于
      An MC-aware mode was introduced in commit 7b819530 ("mlxsw:
      spectrum: Configure MC-aware mode on mlxsw ports"). In MC-aware mode,
      BUM traffic gets a special treatment by being assigned to a separate set
      of traffic classes 8..15. Pairs of TCs 0 and 8, 1 and 9, etc., are then
      configured to strictly prioritize the lower-numbered ones. The intention
      is to prevent BUM traffic from flooding the switch and push out all UC
      traffic, which would otherwise happen, and instead give UC traffic
      precedence.
      
      However strictly prioritizing UC traffic has the effect that UC overload
      pushes out all BUM traffic, such as legitimate ARP queries. These
      packets are kept in queues for a while, but under sustained UC overload,
      their lifetime eventually expires and these packets are dropped. That is
      detrimental to network performance as well.
      
      Therefore configure the MC TCs (8..15) with minimum shaper of 200Mbps (a
      minimum permitted value) to allow a trickle of necessary control traffic
      to get through.
      
      Fixes: 7b819530 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fe64023
    • P
      mlxsw: reg: QEEC: Add minimum shaper fields · 8b931821
      Petr Machata 提交于
      Add QEEC.mise (minimum shaper enable) and QEEC.min_shaper_rate to enable
      configuration of minimum shaper.
      
      Increase the QEEC length to 0x20 as well: that's the length that the
      register has had for a long time now, but with the configurations that
      mlxsw typically exercises, the firmware tolerated 0x1C-sized packets.
      With mise=true however, FW rejects packets unless they have the full
      required length.
      
      Fixes: b9b7cee4 ("mlxsw: reg: Add QoS ETS Element Configuration register")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b931821
  8. 30 10月, 2018 2 次提交
  9. 18 10月, 2018 12 次提交
  10. 12 10月, 2018 5 次提交