]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
IB/iser: bound protection_sg size by data_sg size
authorMax Gurtovoy <maxg@mellanox.com>
Tue, 24 Sep 2019 21:03:47 +0000 (00:03 +0300)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Jan 2020 14:14:55 +0000 (08:14 -0600)
commitd905d3659277fe879137d1bf9a37cb97e6b55611
treeb8a90772bb1480d5c868b20fed66fae1e842c043
parent56dc648f28c3540b07f9ba66c72e5961155362d3
IB/iser: bound protection_sg size by data_sg size

BugLink: https://bugs.launchpad.net/bugs/1858428
[ Upstream commit 7718cf03c3ce4b6ebd90107643ccd01c952a1fce ]

In case we don't set the sg_prot_tablesize, the scsi layer assign the
default size (65535 entries). We should limit this size since we should
take into consideration the underlaying device capability. This cap is
considered when calculating the sg_tablesize. Otherwise, for example,
we can get that /sys/block/sdb/queue/max_segments is 128 and
/sys/block/sdb/queue/max_integrity_segments is 65535.

Link: https://lore.kernel.org/r/1569359027-10987-1-git-send-email-maxg@mellanox.com
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/infiniband/ulp/iser/iscsi_iser.c