Skip to content
  1. Apr 09, 2019
    • Leon Romanovsky's avatar
      RDMA/cm: Move debug counters to be under relevant IB device · c87e65cf
      Leon Romanovsky authored
      The sysfs layout is created by CM incorrectly presented RDMA devices with
      InfiniBand link layer. Layout of such devices represents device tree of
      connections. By moving CM statistics to be under relevant port of IB
      device, we will fix the following issues:
      
       * Symlink name - It used device name instead of specific identifier.
       * Target location - It was supposed to point to PCI-ID/infiniband_cm/
         instead of PCI-ID/infiniband/
       * Target name - It created extra device file under already existing
         device folder, e.g. mlx5_0/mlx5_0
       * Crash during boot with RDMA persistent naming patches.
      
       sysfs: cannot create duplicate filename '/class/infiniband_cm/mlx5_0'
       CPU: 29 PID: 433 Comm: modprobe Not tainted 5.0.0-rc5+ #178
       Call Trace:
        dump_stack+0xcc/0x180
        sysfs_warn_dup.cold.3+0x17/0x2d
        sysfs_do_create_link_sd.isra.2+0xd0/0xf0
        device_add+0x7cb/0x1450
        device_create_groups_vargs+0x1ae/0x220
        device_create+0x93/0xc0
        cm_add_one+0x38f/0xf60 [ib_cm]
        add_client_context+0x167/0x210 [ib_core]
        enable_device_and_get+0x230/0x3f0 [ib_core]
        ib_register_device+0x823/0xbf0 [ib_core]
        __mlx5_ib_add+0x45/0x150 [mlx5_ib]
        mlx5_ib_add+0x1b3/0x5e0 [mlx5_ib]
        mlx5_add_device+0x130/0x3a0 [mlx5_core]
        mlx5_register_interface+0x1a9/0x270 [mlx5_core]
        do_one_initcall+0x14f/0x5de
        do_init_module+0x247/0x7c0
        load_module+0x4c2f/0x60d0
        entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      After this change:
      [leonro@server ~]$ ls -al /sys/class/infiniband/ibp0s12f0/ports/1/
      drwxr-xr-x  2 root root    0 Mar 11 11:17 cm_rx_duplicates
      drwxr-xr-x  2 root root    0 Mar 11 11:17 cm_rx_msgs
      drwxr-xr-x  2 root root    0 Mar 11 11:17 cm_tx_msgs
      drwxr-xr-x  2 root root    0 Mar 11 11:17 cm_tx_retries
      
      Fixes: 110cf374
      
       ("infiniband: make cm_device use a struct device and not a kobject.")
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      c87e65cf
    • Colin Ian King's avatar
      opa_vnic: fix check on record->event, incorrect operator used · 4d2e11d4
      Colin Ian King authored
      The check on record->event is always true because the wrong operator
      is being used, used && instead of ||
      
      Addresses-Coverity: ("Constant expression result")
      Fixes: fae7a699
      
       ("opa_vnic: Convert vport_idr to XArray")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Acked-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Reviewed-by: default avatarMukesh Ojha <mojha@codeaurora.org>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      4d2e11d4
    • Shiraz Saleem's avatar
      RDMA/umem: Combine contiguous PAGE_SIZE regions in SGEs · d10bcf94
      Shiraz Saleem authored
      
      
      Combine contiguous regions of PAGE_SIZE pages into single scatter list
      entry while building the scatter table for a umem. This minimizes the
      number of the entries in the scatter list and reduces the DMA mapping
      overhead, particularly with the IOMMU.
      
      Set default max_seg_size in core for IB devices to 2G and do not combine
      if we exceed this limit.
      
      Also, purge npages in struct ib_umem as we now DMA map the umem SGL with
      sg_nents and npage computation is not needed. Drivers should now be using
      ib_umem_num_pages(), so fix the last stragglers.
      
      Move npages tracking to ib_umem_odp as ODP drivers still need it.
      
      Suggested-by: default avatarJason Gunthorpe <jgg@ziepe.ca>
      Reviewed-by: default avatarMichael J. Ruhl <michael.j.ruhl@intel.com>
      Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
      Acked-by: default avatarAdit Ranadive <aditr@vmware.com>
      Signed-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
      Tested-by: default avatarGal Pressman <galpress@amazon.com>
      Tested-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      d10bcf94
  2. Apr 04, 2019
  3. Apr 02, 2019
  4. Mar 30, 2019
  5. Mar 29, 2019