1. 24 May, 2018 12 commits
    • oulijun's avatar
      RDMA/hns: Rename the idx field of db · cc3391cb
      oulijun authored
      The lower 15 bit of paramter of db structure means different
      meanings when db type is sq, rq and srq.
      Signed-off-by: default avatarLijun Ou <oulijun@huawei.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      cc3391cb
    • Mike Marciniszyn's avatar
      IB/qib: Fix DMA api warning with debug kernel · 0252f733
      Mike Marciniszyn authored
      The following error occurs in a debug build when running MPI PSM:
      
      [  307.415911] WARNING: CPU: 4 PID: 23867 at lib/dma-debug.c:1158
      check_unmap+0x4ee/0xa20
      [  307.455661] ib_qib 0000:05:00.0: DMA-API: device driver failed to check map
      error[device address=0x00000000df82b000] [size=4096 bytes] [mapped as page]
      [  307.517494] Modules linked in:
      [  307.531584]  ib_isert iscsi_target_mod ib_srpt target_core_mod rpcrdma
      sunrpc ib_srp scsi_transport_srp scsi_tgt ib_iser libiscsi ib_ipoib
      scsi_transport_iscsi rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm
      ib_qib intel_powerclamp coretemp rdmavt intel_rapl iosf_mbi kvm_intel kvm
      irqbypass crc32_pclmul ghash_clmulni_intel ipmi_ssif ib_core aesni_intel sg
      ipmi_si lrw gf128mul dca glue_helper ipmi_devintf iTCO_wdt gpio_ich hpwdt
      iTCO_vendor_support ablk_helper hpilo acpi_power_meter cryptd ipmi_msghandler
      ie31200_edac shpchp pcc_cpufreq lpc_ich pcspkr ip_tables xfs libcrc32c sd_mod
      crc_t10dif crct10dif_generic mgag200 i2c_algo_bit drm_kms_helper syscopyarea
      sysfillrect sysimgblt fb_sys_fops ttm ahci crct10dif_pclmul crct10dif_common
      drm crc32c_intel libahci tg3 libata serio_raw ptp i2c_core
      [  307.846113]  pps_core dm_mirror dm_region_hash dm_log dm_mod
      [  307.866505] CPU: 4 PID: 23867 Comm: mpitests-IMB-MP Kdump: loaded Not
      tainted 3.10.0-862.el7.x86_64.debug #1
      [  307.911178] Hardware name: HP ProLiant DL320e Gen8, BIOS J05 11/09/2013
      [  307.944206] Call Trace:
      [  307.956973]  [<ffffffffbd9e915b>] dump_stack+0x19/0x1b
      [  307.982201]  [<ffffffffbd2a2f58>] __warn+0xd8/0x100
      [  308.005999]  [<ffffffffbd2a2fdf>] warn_slowpath_fmt+0x5f/0x80
      [  308.034260]  [<ffffffffbd5f667e>] check_unmap+0x4ee/0xa20
      [  308.060801]  [<ffffffffbd41acaa>] ? page_add_file_rmap+0x2a/0x1d0
      [  308.090689]  [<ffffffffbd5f6c4d>] debug_dma_unmap_page+0x9d/0xb0
      [  308.120155]  [<ffffffffbd4082e0>] ? might_fault+0xa0/0xb0
      [  308.146656]  [<ffffffffc07761a5>] qib_tid_free.isra.14+0x215/0x2a0 [ib_qib]
      [  308.180739]  [<ffffffffc0776bf4>] qib_write+0x894/0x1280 [ib_qib]
      [  308.210733]  [<ffffffffbd540b00>] ? __inode_security_revalidate+0x70/0x80
      [  308.244837]  [<ffffffffbd53c2b7>] ? security_file_permission+0x27/0xb0
      [  308.266025] qib_ib0.8006: multicast join failed for
      ff12:401b:8006:0000:0000:0000:ffff:ffff, status -22
      [  308.323421]  [<ffffffffbd46f5d3>] vfs_write+0xc3/0x1f0
      [  308.347077]  [<ffffffffbd492a5c>] ? fget_light+0xfc/0x510
      [  308.372533]  [<ffffffffbd47045a>] SyS_write+0x8a/0x100
      [  308.396456]  [<ffffffffbd9ff355>] system_call_fastpath+0x1c/0x21
      
      The code calls a qib_map_page() which has never correctly tested for a
      mapping error.
      
      Fix by testing for pci_dma_mapping_error() in all cases and properly
      handling the failure in the caller.
      
      Additionally, streamline qib_map_page() arguments to satisfy just
      the single caller.
      
      Cc: <stable@vger.kernel.org>
      Reviewed-by: default avatarAlex Estrin <alex.estrin@intel.com>
      Tested-by: default avatarDon Dutile <ddutile@redhat.com>
      Reviewed-by: default avatarDon Dutile <ddutile@redhat.com>
      Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      0252f733
    • Alex Estrin's avatar
      IB/isert: Fix for lib/dma_debug check_sync warning · 763b6965
      Alex Estrin authored
      The following error message occurs on a target host in a debug build
      during session login:
      
      [ 3524.411874] WARNING: CPU: 5 PID: 12063 at lib/dma-debug.c:1207 check_sync+0x4ec/0x5b0
      [ 3524.421057] infiniband hfi1_0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x0000000000000000] [size=76 bytes]
      ......snip .....
      
      [ 3524.535846] CPU: 5 PID: 12063 Comm: iscsi_np Kdump: loaded Not tainted 3.10.0-862.el7.x86_64.debug #1
      [ 3524.546764] Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 1.2.6 06/08/2015
      [ 3524.555740] Call Trace:
      [ 3524.559102]  [<ffffffffa5fe915b>] dump_stack+0x19/0x1b
      [ 3524.565477]  [<ffffffffa58a2f58>] __warn+0xd8/0x100
      [ 3524.571557]  [<ffffffffa58a2fdf>] warn_slowpath_fmt+0x5f/0x80
      [ 3524.578610]  [<ffffffffa5bf5b8c>] check_sync+0x4ec/0x5b0
      [ 3524.585177]  [<ffffffffa58efc3f>] ? set_cpus_allowed_ptr+0x5f/0x1c0
      [ 3524.592812]  [<ffffffffa5bf5cd0>] debug_dma_sync_single_for_cpu+0x80/0x90
      [ 3524.601029]  [<ffffffffa586add3>] ? x2apic_send_IPI_mask+0x13/0x20
      [ 3524.608574]  [<ffffffffa585ee1b>] ? native_smp_send_reschedule+0x5b/0x80
      [ 3524.616699]  [<ffffffffa58e9b76>] ? resched_curr+0xf6/0x140
      [ 3524.623567]  [<ffffffffc0879af0>] isert_create_send_desc.isra.26+0xe0/0x110 [ib_isert]
      [ 3524.633060]  [<ffffffffc087af95>] isert_put_login_tx+0x55/0x8b0 [ib_isert]
      [ 3524.641383]  [<ffffffffa58ef114>] ? try_to_wake_up+0x1a4/0x430
      [ 3524.648561]  [<ffffffffc098cfed>] iscsi_target_do_tx_login_io+0xdd/0x230 [iscsi_target_mod]
      [ 3524.658557]  [<ffffffffc098d827>] iscsi_target_do_login+0x1a7/0x600 [iscsi_target_mod]
      [ 3524.668084]  [<ffffffffa59f9bc9>] ? kstrdup+0x49/0x60
      [ 3524.674420]  [<ffffffffc098e976>] iscsi_target_start_negotiation+0x56/0xc0 [iscsi_target_mod]
      [ 3524.684656]  [<ffffffffc098c2ee>] __iscsi_target_login_thread+0x90e/0x1070 [iscsi_target_mod]
      [ 3524.694901]  [<ffffffffc098ca50>] ? __iscsi_target_login_thread+0x1070/0x1070 [iscsi_target_mod]
      [ 3524.705446]  [<ffffffffc098ca50>] ? __iscsi_target_login_thread+0x1070/0x1070 [iscsi_target_mod]
      [ 3524.715976]  [<ffffffffc098ca78>] iscsi_target_login_thread+0x28/0x60 [iscsi_target_mod]
      [ 3524.725739]  [<ffffffffa58d60ff>] kthread+0xef/0x100
      [ 3524.732007]  [<ffffffffa58d6010>] ? insert_kthread_work+0x80/0x80
      [ 3524.739540]  [<ffffffffa5fff1b7>] ret_from_fork_nospec_begin+0x21/0x21
      [ 3524.747558]  [<ffffffffa58d6010>] ? insert_kthread_work+0x80/0x80
      [ 3524.755088] ---[ end trace 23f8bf9238bd1ed8 ]---
      [ 3595.510822] iSCSI/iqn.1994-05.com.redhat:537fa56299: Unsupported SCSI Opcode 0xa3, sending CHECK_CONDITION.
      
      The code calls dma_sync on login_tx_desc->dma_addr prior to initializing it
      with dma-mapped address.
      login_tx_desc is a part of iser_conn structure and is used only once
      during login negotiation, so the issue is fixed by eliminating
      dma_sync call for this buffer using a special case routine.
      
      Cc: <stable@vger.kernel.org>
      Reviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Reviewed-by: default avatarDon Dutile <ddutile@redhat.com>
      Signed-off-by: default avatarAlex Estrin <alex.estrin@intel.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      763b6965
    • Mike Marciniszyn's avatar
      IB/{rdmavt,hfi1}: Change hrtimer add to use pinned version · 3ce459cd
      Mike Marciniszyn authored
      Given we are dealing with nano-second level timers, when the timer
      pops, ensure it happens on the CPU which caused the timer to be set
      in the first place.  This avoids excessive jitter from the desired
      expiration time by avoiding the cost of switching our context to
      another CPU that is cache cold for this given timer.
      Reviewed-by: default avatarKaike Wan <kaike.wan@intel.com>
      Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      3ce459cd
    • Michael J. Ruhl's avatar
      IB/hfi1: Set port number for errorinfo MAD response · 5938d94c
      Michael J. Ruhl authored
      For errorinfo MAD requests, the response has a 0 port number left over
      from a memset. Instead we should always set the port number in the
      response.
      Reviewed-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarMichael J. Ruhl <michael.j.ruhl@intel.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      5938d94c
    • Mike Marciniszyn's avatar
      IB/hfi1: Cleanup of exp_rcv · c8314811
      Mike Marciniszyn authored
      The knowledge of the internal workings of the expect receive
      is too distributed.
      
      Fix by:
      - right size several rcd fields associated with
        expect receive
      - making an init entrance to init all the lists
      - consolidate all the allocations into an array anchored
        in the rcd
      Reviewed-by: default avatarMichael J. Ruhl <michael.j.ruhl@intel.com>
      Reviewed-by: default avatarKaike Wan <kaike.wan@intel.com>
      Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      c8314811
    • Don Hiatt's avatar
      IB/hfi1: Add 16B Management Packet trace support · 43a68c35
      Don Hiatt authored
      Add trace support for 16B Management Packets.
      Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
      Signed-off-by: default avatarDon Hiatt <don.hiatt@intel.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      43a68c35
    • Don Hiatt's avatar
      IB/hfi1: Add support for 16B Management Packets · 81cd3891
      Don Hiatt authored
      16B Management Packets (L4=0x08) replace the BTH and DETH
      of normal MAD packet packets with a header containing the
      the source and destination queue pair numbers; fields that
      were originally retrieved from the BTH/DETH are now populated
      from this header as well as from the 16B LRH (e.g. pkey).
      
      16B Management Packets are used as an optimized management
      format on 16B fabrics.
      
      These management packets have an opcode of IB_OPCODE_UD_SEND_ONLY,
      a fixed 3Byte pad, and a header length of 24Bytes.
      
      The decision as to when we send a management packet is based
      upon either the source or destination queue pair number being
      0 or 1.
      Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
      Signed-off-by: default avatarDon Hiatt <don.hiatt@intel.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      81cd3891
    • Don Hiatt's avatar
      IB/hfi1: Define 16B Management Packets · 4171a693
      Don Hiatt authored
      Add 16B Management Packet definition. This optimized packet
      format replaces the ib_other_headers and BTH with a source
      and destination QP number.
      
      To support these packets we introduce struct opa_16b_mgmt
      into the struct hfi1_16b_header.
      
      This packet format is only used for MAD packets using the
      IB_OPCODE_UD_SEND_ONLY opcode on QP0/1.
      
      The original 16B implementation failed to use 16B management
      packets so now we add their definition.
      Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
      Signed-off-by: default avatarDon Hiatt <don.hiatt@intel.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      4171a693
    • Steve Wise's avatar
      iw_cxgb4: provide detailed driver-specific MR information · 013f64a8
      Steve Wise authored
      Add a table of important fields from the fw_ri_tpte structure to the mr
      resource tracking table.  This is helpful in debugging.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      013f64a8
    • Steve Wise's avatar
      iw_cxgb4: provide detailed driver-specific CQ information · 54e7688e
      Steve Wise authored
      Add a table of important fields from the c4iw_cq* structures to the cq
      resource tracking table.  This is helpful in debugging.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      54e7688e
    • Steve Wise's avatar
      iw_cxgb4: provide detailed provider-specific CM_ID information · 116aeb88
      Steve Wise authored
      Add a table of important fields from the c4iw_ep* structures to the cm_id
      resource tracking table.  This is helpful in debugging.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      116aeb88
  2. 22 May, 2018 3 commits
    • Steve Wise's avatar
      RDMA/CMA: add rdma_iw_cm_id() and rdma_res_to_id() helpers · fbdb0a91
      Steve Wise authored
      Add a helper function for iwarp drivers to be able to map an
      rdma_cm_id to an iw_cm_id.  This is useful for dumping driver specific
      NLDEV/RESTRACK connection state.
      
      Add a helper to return the rdma_cm_id pointer from the rdma_restack
      pointer.  This is needed for rdma drivers to map a res entry back to
      the public rdma_cm_id struct.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      fbdb0a91
    • Steve Wise's avatar
      iw_cxgb4: always set iw_cm_id.provider_data · b06f2efd
      Steve Wise authored
      In active side connections, the provider_data field is not
      getting set.  This will be used in a subsequent patch to dump
      state, so always set it.
      Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      b06f2efd
    • Doug Ledford's avatar
      RDMA/ipoib: Update paths on CLIENT_REREG/SM_CHANGE events · fa9391db
      Doug Ledford authored
      We do a light flush on CLIENT_REREG and SM_CHANGE events.  This goes
      through and marks paths invalid. But we weren't always checking for this
      validity when we needed to, and so we could keep using a path marked
      invalid.  What's more, once we establish a path with a valid ah, we put
      a pointer to the ah in the neigh struct directly, so even if we mark the
      path as invalid, as long as the neigh has a direct pointer to the ah, it
      keeps using the old, outdated ah.
      
      To fix this we do several things.
      
      1) Put the valid flag in the ah instead of the path struct, so when we
      put the ah pointer directly in the neigh struct, we can easily check the
      validity of the ah on send events.
      2) Check the neigh->ah and neigh->ah->valid elements in the needed
      places, and if we have an ah, but it's invalid, then invoke a refresh of
      the ah.
      3) Fix the various places that check for path, but didn't check for
      path->valid (now path->ah && path->ah->valid).
      Reported-by: default avatarEvgenii Smirnov <evgenii.smirnov@profitbricks.com>
      Fixes: ee1e2c82 ("IPoIB: Refresh paths instead of flushing them on SM change events")
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      fa9391db
  3. 17 May, 2018 10 commits
  4. 16 May, 2018 4 commits
  5. 15 May, 2018 8 commits
  6. 09 May, 2018 3 commits