1. 05 Apr, 2018 12 commits
    • Mikhail Malygin's avatar
      IB/rxe: Fix for oops in rxe_register_device on ppc64le arch · efc365e7
      Mikhail Malygin authored
      On ppc64le arch rxe_add command causes oops in kernel log:
      
      [   92.495140] Oops: Kernel access of bad area, sig: 11 [#1]
      [   92.499710] SMP NR_CPUS=2048 NUMA pSeries
      [   92.499792] Modules linked in: ipt_MASQUERADE(E) nf_nat_masquerade_ipv4(E) nf_conntrack_netlink(E) nfnetlink(E) xfrm_user(E) iptable
      _nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) nf_nat_ipv4(E) xt_addrtype(E) iptable_filter(E) ip_tables(E) xt_conntrack(E) x_tables(E)
       nf_nat(E) nf_conntrack(E) br_netfilter(E) bridge(E) stp(E) llc(E) overlay(E) af_packet(E) rpcrdma(E) ib_isert(E) iscsi_target_mod(E) i
      b_iser(E) libiscsi(E) ib_srpt(E) target_core_mod(E) ib_srp(E) ib_ipoib(E) rdma_ucm(E) ib_ucm(E) ib_uverbs(E) ib_umad(E) bochs_drm(E) tt
      m(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) drm(E) agpgart(E) virtio_rng(E) virtio_console(E) rtc_
      generic(E) dm_ec(OEN) ttln_rdma(OEN) rdma_cm(E) configfs(E) iw_cm(E) ib_cm(E) rdma_rxe(E) ip6_udp_tunnel(E) udp_tunnel(E) ib_core(E) ql
      a2xxx(E)
      [   92.499832]  scsi_transport_fc(E) nvme_fc(E) nvme_fabrics(E) nvme_core(E) ipmi_watchdog(E) ipmi_ssif(E) ipmi_poweroff(E) ipmi_powernv(EX) ipmi_devintf(E) ipmi_msghandler(E) dummy(E) ext4(E) crc16(E) jbd2(E) mbcache(E) dm_service_time(E) scsi_transport_iscsi(E) sd_mod(E) sr_mod(E) cdrom(E) hid_generic(E) usbhid(E) virtio_blk(E) virtio_scsi(E) virtio_net(E) ibmvscsi(EX) scsi_transport_srp(E) xhci_pci(E) xhci_hcd(E) usbcore(E) usb_common(E) virtio_pci(E) virtio_ring(E) virtio(E) sunrpc(E) dm_mirror(E) dm_region_hash(E) dm_log(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E) autofs4(E)
      [   92.499834] Supported: No, Unsupported modules are loaded
      [   92.499839] CPU: 3 PID: 5576 Comm: sh Tainted: G           OE   NX 4.4.120-ttln.17-default #1
      [   92.499841] task: c0000000afe8a490 ti: c0000000beba8000 task.ti: c0000000beba8000
      [   92.499842] NIP: c00000000008ba3c LR: c000000000027644 CTR: c00000000008ba10
      [   92.499844] REGS: c0000000bebab750 TRAP: 0300   Tainted: G           OE   NX  (4.4.120-ttln.17-default)
      [   92.499850] MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE>  CR: 28424428  XER: 20000000
      [   92.499871] CFAR: 0000000000002424 DAR: 0000000000000208 DSISR: 40000000 SOFTE: 1
                     GPR00: c000000000027644 c0000000bebab9d0 c000000000f09700 0000000000000000
                     GPR04: d0000000043d7192 0000000000000002 000000000000001a fffffffffffffffe
                     GPR08: 000000000000009c c00000000008ba10 d0000000043e5848 d0000000043d3828
                     GPR12: c00000000008ba10 c000000007a02400 0000000010062e38 0000010020388860
                     GPR16: 0000000000000000 0000000000000000 00000100203885f0 00000000100f6c98
                     GPR20: c0000000b3f1fcc0 c0000000b3f1fc48 c0000000b3f1fbd0 c0000000b3f1fb58
                     GPR24: c0000000b3f1fae0 c0000000b3f1fa68 00000000000005dc c0000000b3f1f9f0
                     GPR28: d0000000043e5848 c0000000b3f1f900 c0000000b3f1f320 c0000000b3f1f000
      [   92.499881] NIP [c00000000008ba3c] dma_get_required_mask_pSeriesLP+0x2c/0x1a0
      [   92.499885] LR [c000000000027644] dma_get_required_mask+0x44/0xac
      [   92.499886] Call Trace:
      [   92.499891] [c0000000bebab9d0] [c0000000bebaba30] 0xc0000000bebaba30 (unreliable)
      [   92.499894] [c0000000bebaba10] [c000000000027644] dma_get_required_mask+0x44/0xac
      [   92.499904] [c0000000bebaba30] [d0000000043cb4b4] rxe_register_device+0xc4/0x430 [rdma_rxe]
      [   92.499910] [c0000000bebabab0] [d0000000043c06c8] rxe_add+0x448/0x4e0 [rdma_rxe]
      [   92.499915] [c0000000bebabb30] [d0000000043d28dc] rxe_net_add+0x4c/0xf0 [rdma_rxe]
      [   92.499921] [c0000000bebabb60] [d0000000043d305c] rxe_param_set_add+0x6c/0x1ac [rdma_rxe]
      [   92.499924] [c0000000bebabbf0] [c0000000000e78c0] param_attr_store+0xa0/0x180
      [   92.499927] [c0000000bebabc70] [c0000000000e6448] module_attr_store+0x48/0x70
      [   92.499932] [c0000000bebabc90] [c000000000391f60] sysfs_kf_write+0x70/0xb0
      [   92.499935] [c0000000bebabcb0] [c000000000390f1c] kernfs_fop_write+0x18c/0x1e0
      [   92.499939] [c0000000bebabd00] [c0000000002e22ac] __vfs_write+0x4c/0x1d0
      [   92.499942] [c0000000bebabd90] [c0000000002e2f94] vfs_write+0xc4/0x200
      [   92.499945] [c0000000bebabde0] [c0000000002e488c] SyS_write+0x6c/0x110
      [   92.499948] [c0000000bebabe30] [c000000000009384] system_call+0x38/0xe4
      [   92.499949] Instruction dump:
      [   92.499954] 4e800020 3c4c00e8 3842dcf0 7c0802a6 f8010010 60000000 7c0802a6 fba1ffe8
      [   92.499958] fbc1fff0 fbe1fff8 f8010010 f821ffc1 <e9230208> 7c7e1b78 2fa90000 419e0078
      [   92.499962] ---[ end trace bed077e15eb420cf ]---
      
      It fails in dma_get_required_mask, that has ppc-specific implementation,
      and fail if provided device argument is NULL
      Signed-off-by: default avatarMikhail Malygin <mikhail@malygin.me>
      Reviewed-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      efc365e7
    • Ariel Levkovich's avatar
      IB/mlx5: Device memory mr registration support · 6c29f57e
      Ariel Levkovich authored
      Adding mlx5_ib driver implementation for reg_dm_mr callback
      which allows registering device memory (DM) as an MR for
      local and remote access.
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      6c29f57e
    • Ariel Levkovich's avatar
      net/mlx5: Mkey creation command adjustments · cdbd0d2b
      Ariel Levkovich authored
      This change updates the mlx5 interface to create mkey
      on the device.
      
      The updates in the command mailbox include increasing the
      access mode type field to 5 bits in order to support additional
      types such as MLX5_MKC_ACCESS_MODE_MEMIC which represents device
      memory access type and will be used when registering MR on allocated
      device memory.
      
      All the places that use the old access mode format are adjusted as
      well.
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      cdbd0d2b
    • Ariel Levkovich's avatar
      IB/mlx5: Device memory support in mlx5_ib · 24da0016
      Ariel Levkovich authored
      This patch adds the mlx5_ib driver implementation for the device
      memory allocation API.
      It implements the ib_device callbacks for allocation and deallocation
      operations as well as a new mmap command support which allows mapping
      an allocated device memory to a VMA.
      
      The change also adds reporting of device memory maximum size and
      alignment parameters reported in device capabilities.
      
      The allocation/deallocation operations are using new firmware
      commands to allocate MEMIC memory on the device.
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      24da0016
    • Ariel Levkovich's avatar
      net/mlx5: Query device memory capabilities · e72bd817
      Ariel Levkovich authored
      This patch adds querying of device memory capabilities by the mlx5_core
      driver during initialization.
      
      Device memory capabilities is a new capability type and structure
      which contains the necessary data that is needed for future device
      memory allocation.
      
      The presence of this new capabilities struct is indicated in the
      general capabilities struct which is queried first by the driver.
      If the presence bit is set, the driver will also query the new
      capabilities struct and save it in the device context.
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      e72bd817
    • Ariel Levkovich's avatar
      IB/uverbs: Add device memory registration ioctl support · be934cca
      Ariel Levkovich authored
      Adding new ioctl method for the MR object - REG_DM_MR.
      
      This command can be used by users to register an allocated
      device memory buffer as an MR and receive lkey and rkey
      to be used within work requests.
      
      It is added as a new method under the MR object and using a new
      ib_device callback - reg_dm_mr.
      The command creates a standard ib_mr object which represents the
      registered memory.
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      be934cca
    • Ariel Levkovich's avatar
      IB/uverbs: Add alloc/free dm uverbs ioctl support · bee76d7a
      Ariel Levkovich authored
      This change adds uverbs support for allocation/freeing
      of device memory commands.
      
      A new uverbs object is defined of type idr to represent
      and track the new resource type allocation per context.
      
      The API requires provider driver to implement 2 new ib_device
      callbacks - one for allocation and one for deallocation which
      return and accept (respectively) the ib_dm object which represents
      the allocated memory on the device.
      
      The support is added via the ioctl command infrastructure
      only.
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      bee76d7a
    • Ariel Levkovich's avatar
      IB/uverbs: Add device memory capabilities reporting · 1d8eeb9f
      Ariel Levkovich authored
      This change allows vendors to report device memory capability
      max_dm_size - to user via uverbs command.
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      1d8eeb9f
    • Ariel Levkovich's avatar
      IB/uverbs: Expose device memory capabilities to user · d41c1208
      Ariel Levkovich authored
      Adding a new capability field under ib_uverbs_ex_query_device_resp -
      max_dm_size - which reflects the maximum amount of device memory
      that is available for allocation on a device in bytes.
      Signed-off-by: default avatarAriel Levkovich <lariel@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      d41c1208
    • Kalderon, Michal's avatar
      RDMA/qedr: Fix wmb usage in qedr · 09c4854f
      Kalderon, Michal authored
      This patch comes as a result of Sinan Kaya's work and the decision that
      writel() must be a strong enough barrier for DMA.
      
      wmb usages in qedr driver have either been removed where they were there
      only to order DMA accesses, and replaced with smp_wmb and comments for the
      places that the barrier was there for SMP reasons.
      
      Fixes: 561e5d48 ("RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs")
      Signed-off-by: default avatarMichal Kalderon <Michal.Kalderon@cavium.com>
      Signed-off-by: default avatarAriel Elior <Ariel.Elior@cavium.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      09c4854f
    • Parav Pandit's avatar
      IB/rxe: Removed GID add/del dummy routines · 39e00b6c
      Parav Pandit authored
      rxe driver's add_gid() and del_gid() callbacks are doing simple
      checks which are already done by the ib core before invoking these
      callback routines.
      Therefore, code is simplified to skip implementing add_gid() and
      del_gid() callback functions.
      They are only invoked by ib_core if they are implemented.
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      39e00b6c
    • Jason Gunthorpe's avatar
      RDMA/qedr: Zero stack memory before copying to user space · 57939021
      Jason Gunthorpe authored
      The fact this struct was not init'd like all the others was missed when
      the padding reserved field was added.
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Fixes: 71e80a47 ("RDMA/qedr: Fix uABI structure layouts for 32/64 compat")
      Acked-by: default avatarMichal Kalderon <Michal.Kalderon@cavium.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      57939021
  2. 04 Apr, 2018 23 commits
  3. 03 Apr, 2018 5 commits