diff options
author | Steve Wise <swise@opengridcomputing.com> | 2018-06-18 18:05:26 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-06-18 22:17:28 +0300 |
commit | 33023fb85a42b53bf778bc025f9667b582282be4 (patch) | |
tree | 66d55701f7cc41636dcfc4353e38b4262791b47f /net/rds/ib.c | |
parent | b90575ce7b84483d46ebedd5c164e5f274f7ce5a (diff) | |
download | linux-33023fb85a42b53bf778bc025f9667b582282be4.tar.xz |
IB/core: add max_send_sge and max_recv_sge attributes
This patch replaces the ib_device_attr.max_sge with max_send_sge and
max_recv_sge. It allows ulps to take advantage of devices that have very
different send and recv sge depths. For example cxgb4 has a max_recv_sge
of 4, yet a max_send_sge of 16. Splitting out these attributes allows
much more efficient use of the SQ for cxgb4 with ulps that use the RDMA_RW
API. Consider a large RDMA WRITE that has 16 scattergather entries.
With max_sge of 4, the ulp would send 4 WRITE WRs, but with max_sge of
16, it can be done with 1 WRITE WR.
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'net/rds/ib.c')
-rw-r--r-- | net/rds/ib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/ib.c b/net/rds/ib.c index b6ad38e48f62..683b55d4e2b0 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -143,7 +143,7 @@ static void rds_ib_add_one(struct ib_device *device) INIT_WORK(&rds_ibdev->free_work, rds_ib_dev_free); rds_ibdev->max_wrs = device->attrs.max_qp_wr; - rds_ibdev->max_sge = min(device->attrs.max_sge, RDS_IB_MAX_SGE); + rds_ibdev->max_sge = min(device->attrs.max_send_sge, RDS_IB_MAX_SGE); has_fr = (device->attrs.device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS); |