]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - include/rdma/ib_verbs.h
IB/core: Add PCI write end padding flags for WQ and QP
authorNoa Osherovich <noaos@mellanox.com>
Sun, 29 Oct 2017 11:59:44 +0000 (13:59 +0200)
committerDoug Ledford <dledford@redhat.com>
Fri, 10 Nov 2017 18:50:27 +0000 (13:50 -0500)
commite1d2e88733695038754d3303b180f8005a02b6f1
tree73b091de9c676399d9a004286c2a07f2bac01d7e
parent3192c53e5affe767472176197b83c9bc0b1e459d
IB/core: Add PCI write end padding flags for WQ and QP

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: Noa Osherovich <noaos@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/uverbs_cmd.c
include/rdma/ib_verbs.h