1. 13 Nov, 2017 37 commits
  2. 10 Nov, 2017 3 commits
    • Noa Osherovich's avatar
      IB/mlx5: Add PCI write end padding support · b1383aa6
      Noa Osherovich authored
      Add the PCI write end padding flag to device_cap_flags enum and set it
      during mlx5_ib_query_device so it will be reported to user-space.
      
      During WQ/QP creation, set that capability for WQ/QP if user requested
      it and HW supports it.
      
      PCI write end padding modification is not supported for now. There's no
      such flag for a QP but for a WQ, create and modify use the same flag.
      Return an error if PCI write end padding flag is set during modify_wq.
      Signed-off-by: default avatarNoa Osherovich <noaos@mellanox.com>
      Reviewed-by: default avatarMajd Dibbiny <majd@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      b1383aa6
    • Noa Osherovich's avatar
      IB/core: Add PCI write end padding flags for WQ and QP · e1d2e887
      Noa Osherovich authored
      There are root complexes that are able to optimize their
      performance when incoming data is multiple full cache lines.
      
      PCI write end padding is the device's ability to pad the ending of
      incoming packets (scatter) to full cache line such that the last
      upstream write generated by an incoming packet will be a full cache
      line.
      
      Add a relevant entry to ib_device_cap_flags to report such capability
      of an RDMA device.
      
      Add the QP and WQ create flags:
       * A QP/WQ created with a scatter end padding flag will cause
         HW to pad the last upstream write generated by a packet to cache line.
      
      User should consider several factors before activating this feature:
      - In case of high CPU memory load (which may cause PCI back pressure in
        turn), if a large percent of the writes are partial cache line, this
        feature should be checked as an optional solution.
      - This feature might reduce performance if most packets are between one
        and two cache lines and PCIe throughput has reached its maximum
        capacity. E.g. 65B packet from the network port will lead to 128B
        write on PCIe, which may cause traffic on PCIe to reach high
        throughput.
      Signed-off-by: default avatarNoa Osherovich <noaos@mellanox.com>
      Reviewed-by: default avatarMajd Dibbiny <majd@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      e1d2e887
    • Thomas Bogendoerfer's avatar
      IB/rxe: don't crash, if allocation of crc algorithm failed · 3192c53e
      Thomas Bogendoerfer authored
      Following crash happens, if crc algorithm couldn't be allocated:
      
      [ 1087.989072] rdma_rxe: loaded
      [ 1097.855397] PCLMULQDQ-NI instructions are not detected.
      [ 1097.901220] rdma_rxe: failed to allocate crc algorithmi err:-2
      [ 1097.901248] BUG: unable to handle kernel
      [ 1097.901249] NULL pointer dereference
      [ 1097.901250]  at 0000000000000046
      [...]
      
      Reason is that rxe->tfm is assigned the error return, which will then
      be used for crypto_free_shash() in rxe_cleanup. Fix by using a
      temporary variable and assigning it rxe->tfm after allocation succeeded.
      
      Fixes: cee2688e ("IB/rxe: Offload CRC calculation when possible")
      Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
      Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Acked-by: default avatarMoni Shoua <monis@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      3192c53e