RDMA/srp: Increase max_segment_size
authorBart Van Assche <bvanassche@acm.org>
Tue, 22 Jan 2019 18:25:20 +0000 (10:25 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 30 Jan 2019 22:04:16 +0000 (15:04 -0700)
commit0b5cb3300ae59ed7e93b465dfa2384a6a4df8eb4
treeba66ceac2b52f23fd3e9665d165dd31af9220a68
parentdb421a54996c602503204345171c662e65f20527
RDMA/srp: Increase max_segment_size

The default behavior of the SCSI core is to set the block layer request
queue parameter max_segment_size to 64 KB. That means that elements of
scatterlists are limited to 64 KB. Since RDMA adapters support larger
sizes, increase max_segment_size for the SRP initiator.

Notes:
- The SCSI max_segment_size parameter was introduced in kernel v5.0. See
  also commit 50c2e9107f17 ("scsi: introduce a max_segment_size
  host_template parameters").
- Some other block drivers already set max_segment_size to UINT_MAX,
  e.g. nbd and rbd.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/srp/ib_srp.c
include/rdma/ib_verbs.h