1. 12 1月, 2018 1 次提交
    • E
      {net,ib}/mlx5: Don't disable local loopback multicast traffic when needed · 8978cc92
      Eran Ben Elisha 提交于
      There are systems platform information management interfaces (such as
      HOST2BMC) for which we cannot disable local loopback multicast traffic.
      
      Separate disable_local_lb_mc and disable_local_lb_uc capability bits so
      driver will not disable multicast loopback traffic if not supported.
      (It is expected that Firmware will not set disable_local_lb_mc if
      HOST2BMC is running for example.)
      
      Function mlx5_nic_vport_update_local_lb will do best effort to
      disable/enable UC/MC loopback traffic and return success only in case it
      succeeded to changed all allowed by Firmware.
      
      Adapt mlx5_ib and mlx5e to support the new cap bits.
      
      Fixes: 2c43c5a0 ("net/mlx5e: Enable local loopback in loopback selftest")
      Fixes: c85023e1 ("IB/mlx5: Add raw ethernet local loopback support")
      Fixes: bded747b ("net/mlx5: Add raw ethernet local loopback firmware command")
      Signed-off-by: NEran Ben Elisha <eranbe@mellanox.com>
      Cc: kernel-team@fb.com
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      8978cc92
  2. 20 12月, 2017 1 次提交
    • S
      Revert "mlx5: move affinity hints assignments to generic code" · 231243c8
      Saeed Mahameed 提交于
      Before the offending commit, mlx5 core did the IRQ affinity itself,
      and it seems that the new generic code have some drawbacks and one
      of them is the lack for user ability to modify irq affinity after
      the initial affinity values got assigned.
      
      The issue is still being discussed and a solution in the new generic code
      is required, until then we need to revert this patch.
      
      This fixes the following issue:
      echo <new affinity> > /proc/irq/<x>/smp_affinity
      fails with  -EIO
      
      This reverts commit a435393a.
      Note: kept mlx5_get_vector_affinity in include/linux/mlx5/driver.h since
      it is used in mlx5_ib driver.
      
      Fixes: a435393a ("mlx5: move affinity hints assignments to generic code")
      Cc: Sagi Grimberg <sagi@grimberg.me>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jes Sorensen <jsorensen@fb.com>
      Reported-by: NJes Sorensen <jsorensen@fb.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      231243c8
  3. 10 11月, 2017 1 次提交
    • H
      net/mlx5: Cancel health poll before sending panic teardown command · d2aa060d
      Huy Nguyen 提交于
      After the panic teardown firmware command, health_care detects the error
      in PCI bus and calls the mlx5_pci_err_detected. This health_care flow is
      no longer needed because the panic teardown firmware command will bring
      down the PCI bus communication with the HCA.
      
      The solution is to cancel the health care timer and its pending
      workqueue request before sending panic teardown firmware command.
      
      Kernel trace:
      mlx5_core 0033:01:00.0: Shutdown was called
      mlx5_core 0033:01:00.0: health_care:154:(pid 9304): handling bad device here
      mlx5_core 0033:01:00.0: mlx5_handle_bad_state:114:(pid 9304): NIC state 1
      mlx5_core 0033:01:00.0: mlx5_pci_err_detected was called
      mlx5_core 0033:01:00.0: mlx5_enter_error_state:96:(pid 9304): start
      mlx5_3:mlx5_ib_event:3061:(pid 9304): warning: event on port 0
      mlx5_core 0033:01:00.0: mlx5_enter_error_state:104:(pid 9304): end
      Unable to handle kernel paging request for data at address 0x0000003f
      Faulting instruction address: 0xc0080000434b8c80
      
      Fixes: 8812c24d ('net/mlx5: Add fast unload support in shutdown flow')
      Signed-off-by: NHuy Nguyen <huyn@mellanox.com>
      Reviewed-by: NMoshe Shemesh <moshe@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      d2aa060d
  4. 15 10月, 2017 1 次提交
  5. 31 8月, 2017 2 次提交
  6. 20 8月, 2017 1 次提交
  7. 16 8月, 2017 1 次提交
  8. 09 8月, 2017 2 次提交
  9. 07 8月, 2017 3 次提交
    • E
      net/mlx5: Delay events till ib registration ends · 97834eba
      Erez Shitrit 提交于
      When mlx5_ib registers itself to mlx5_core as an interface, it will
      call mlx5_add_device which will call mlx5_ib interface add callback,
      in case the latter successfully returns, only then mlx5_core will add
      it to the interface list and async events will be forwarded to mlx5_ib.
      Between mlx5_ib interface add callback and mlx5_core adding the mlx5_ib
      interface to its devices list, arriving mlx5_core events can be missed
      by the new mlx5_ib registering interface.
      
      In other words:
      thread 1: mlx5_ib: mlx5_register_interface(dev)
      thread 1: mlx5_core: mlx5_add_device(dev)
      thread 1: mlx5_core: ctx = dev->add => (mlx5_ib)->mlx5_ib_add
      thread 2: mlx5_core_event: **new event arrives, forward to dev_list
      thread 1: mlx5_core: add_ctx_to_dev_list(ctx)
      /* previous event was missed by the new interface.*/
      It is ok to miss events before dev->add (mlx5_ib)->mlx5_ib_add_device
      but not after.
      
      We fix this race by accumulating the events that come between the
      ib_register_device (inside mlx5_add_device->(dev->add)) till the adding
      to the list completes and fire them to the new registering interface
      after that.
      
      Fixes: f1ee87fe ("net/mlx5: Organize device list API in one place")
      Signed-off-by: NErez Shitrit <erezsh@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      97834eba
    • S
      net/mlx5: Add CONFIG_MLX5_ESWITCH Kconfig · e80541ec
      Saeed Mahameed 提交于
      Allow to selectively build the driver with or without sriov eswitch, VF
      representors and TC offloads.
      
      Also remove the need of two ndo ops structures (sriov & basic)
      and keep only one unified ndo ops, compile out VF SRIOV ndos when not
      needed (MLX5_ESWITCH=n), and for VF netdev calling those ndos will result
      in returning -EPERM.
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Reviewed-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Cc: Jes Sorensen <jsorensen@fb.com>
      Cc: kernel-team@fb.com
      e80541ec
    • S
      net/mlx5: Separate between E-Switch and MPFS · eeb66cdb
      Saeed Mahameed 提交于
      Multi-Physical Function Switch (MPFs) is required for when multi-PF
      configuration is enabled to allow passing user configured unicast MAC
      addresses to the requesting PF.
      
      Before this patch eswitch.c used to manage the HW MPFS l2 table,
      E-Switch always (regardless of sriov) enabled vport(0) (NIC PF) vport's
      contexts update on unicast mac address list changes, to populate the PF's
      MPFS L2 table accordingly.
      
      In downstream patch we would like to allow compiling the driver without
      E-Switch functionalities, for that we move MPFS l2 table logic out
      of eswitch.c into its own file, and provide Kconfig flag (MLX5_MPFS) to
      allow compiling out MPFS for those who don't want Multi-PF support.
      
      NIC PF netdevice will now directly update MPFS l2 table via the new MPFS
      API. VF netdevice has no access to MPFS L2 table, so E-Switch will remain
      responsible of updating its MPFS l2 table on behalf of its VFs.
      
      Due to this change we also don't require enabling vport(0) (PF vport)
      unicast mac changes events anymore, for when SRIOV is not enabled.
      Which means E-Switch is now activated only on SRIOV activation, and not
      required otherwise.
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Cc: Jes Sorensen <jsorensen@fb.com>
      Cc: kernel-team@fb.com
      eeb66cdb
  10. 24 7月, 2017 1 次提交
    • H
      IB/mlx5: Add raw ethernet local loopback support · c85023e1
      Huy Nguyen 提交于
      Currently, unicast/multicast loopback raw ethernet
      (non-RDMA) packets are sent back to the vport.
      A unicast loopback packet is the packet with destination
      MAC address the same as the source MAC address.
      For multicast, the destination MAC address is in the
      vport's multicast filter list.
      
      Moreover, the local loopback is not needed if
      there is one or none user space context.
      
      After this patch, the raw ethernet unicast and multicast
      local loopback are disabled by default. When there is more
      than one user space context, the local loopback is enabled.
      
      Note that when local loopback is disabled, raw ethernet
      packets are not looped back to the vport and are forwarded
      to the next routing level (eswitch, or multihost switch,
      or out to the wire depending on the configuration).
      Signed-off-by: NHuy Nguyen <huyn@mellanox.com>
      Reviewed-by: NDaniel Jurgens <danielj@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      c85023e1
  11. 27 6月, 2017 6 次提交
  12. 22 6月, 2017 1 次提交
  13. 16 6月, 2017 4 次提交
  14. 11 6月, 2017 1 次提交
  15. 31 5月, 2017 1 次提交
  16. 23 5月, 2017 1 次提交
  17. 14 5月, 2017 2 次提交
  18. 23 4月, 2017 2 次提交
  19. 07 4月, 2017 1 次提交
  20. 23 3月, 2017 1 次提交
  21. 11 3月, 2017 1 次提交
  22. 07 2月, 2017 1 次提交
    • D
      net/mlx5: Configure cache line size for start and end padding · f32f5bd2
      Daniel Jurgens 提交于
      There is a hardware feature that will pad the start or end of a DMA to
      be cache line aligned to avoid RMWs on the last cache line. The default
      cache line size setting for this feature is 64B. This change configures
      the hardware to use 128B alignment on systems with 128B cache lines.
      
      In addition we lower bound MPWRQ stride by HCA cacheline in mlx5e,
      MPWRQ stride should be at least the HCA cacheline, the current default
      is 64B and in case HCA_CAP.cach_line_128byte capability is set, MPWRQ RX
      stride will automatically be aligned to 128B.
      Signed-off-by: NDaniel Jurgens <danielj@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      f32f5bd2
  23. 30 1月, 2017 1 次提交
  24. 20 1月, 2017 2 次提交
  25. 11 1月, 2017 1 次提交