mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 20:21:30 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
@@ -3,30 +3,30 @@
|
||||
ABT_DETAILS="x86_64"
|
||||
ABT_JOBS=5
|
||||
ABT_KERNELS=" \
|
||||
5.6.12 \
|
||||
5.6.14 \
|
||||
5.5.19-nc \
|
||||
5.4.40-nc \
|
||||
5.4.42-nc \
|
||||
5.3.18-nc \
|
||||
5.2.21-nc \
|
||||
5.1.21-nc \
|
||||
5.0.21-nc \
|
||||
4.20.17-nc \
|
||||
4.19.122-nc \
|
||||
4.19.124-nc \
|
||||
4.18.20-nc \
|
||||
4.17.19-nc \
|
||||
4.16.18-nc \
|
||||
4.15.18-nc \
|
||||
4.14.180-nc \
|
||||
4.14.181-nc \
|
||||
4.13.16-nc \
|
||||
4.12.14-nc \
|
||||
4.11.12-nc \
|
||||
4.10.17-nc \
|
||||
4.9.223-nc \
|
||||
4.9.224-nc \
|
||||
4.8.17-nc \
|
||||
4.7.10-nc \
|
||||
4.6.7-nc \
|
||||
4.5.7-nc \
|
||||
4.4.223-nc \
|
||||
4.4.224-nc \
|
||||
4.3.6-nc \
|
||||
4.2.8-nc \
|
||||
4.1.52-nc \
|
||||
@@ -34,7 +34,7 @@ ABT_KERNELS=" \
|
||||
3.19.8-nc \
|
||||
3.18.140-nc \
|
||||
3.17.8-nc \
|
||||
3.16.83-nc \
|
||||
3.16.84-nc \
|
||||
3.15.10-nc \
|
||||
3.14.79-nc \
|
||||
3.13.11-nc \
|
||||
|
||||
@@ -39,14 +39,6 @@ Building and installing the SRP target driver is possible as follows:
|
||||
|
||||
The ib_srpt kernel module supports the following parameters:
|
||||
|
||||
* max_sge_delta (unsigned): Number to subtract from max_sge. Some but not
|
||||
all HCA's allow to use up to max_sge S/G-list elements in RDMA
|
||||
communication. The default value of this parameter is 3 and works with all
|
||||
HCA's. If you know that the HCA's that are used by the ib_srpt driver allow
|
||||
to use S/G-lists that are longer than max_sge - 3 then you can decrease this
|
||||
parameter. Note: setting this parameter too low will cause SRP every login
|
||||
to fail and will cause a message similar to the following to be logged on
|
||||
the target system: "ib_srpt: RDMA t ... for idx ... failed with status 12".
|
||||
* rdma_cm_port (number)
|
||||
A 16-bit number that specifies the port number to be registered via the
|
||||
RDMA/CM. Must be specified to make communication over RoCE or iWARP
|
||||
|
||||
@@ -166,7 +166,7 @@ MODULE_PARM_DESC(srpt_service_guid,
|
||||
|
||||
static unsigned int max_sge_delta = 0;
|
||||
module_param(max_sge_delta, uint, 0444);
|
||||
MODULE_PARM_DESC(max_sge_delta, "Number to subtract from max_sge.");
|
||||
MODULE_PARM_DESC(max_sge_delta, "Number to subtract from max_sge (obsolete).");
|
||||
|
||||
/*
|
||||
* Note: changing any of the two constants below into SCST_CONTEXT_DIRECT is
|
||||
@@ -2340,49 +2340,6 @@ retry:
|
||||
#else
|
||||
ch->max_send_sge = sdev->dev_attr.max_sge;
|
||||
#endif
|
||||
if (max_sge_delta == 0) {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
|
||||
/*
|
||||
* See also commit b9560a419bfd ("RDMA: Move driver_id into
|
||||
* struct ib_device_ops") # v5.3.
|
||||
*/
|
||||
switch (sdev->device->ops.driver_id) {
|
||||
case RDMA_DRIVER_MLX4:
|
||||
/*
|
||||
* The smallest max_sge_delta value that works with
|
||||
* ConnectX-3 firmware version 2.42.5000.
|
||||
*/
|
||||
max_sge_delta = 2;
|
||||
break;
|
||||
case RDMA_DRIVER_MTHCA:
|
||||
/*
|
||||
* From the OFED release notes: In mem-free devices, RC
|
||||
* QPs can be created with a maximum of (max_sge - 1)
|
||||
* entries only. See also
|
||||
* https://git.openfabrics.org/?p=compat-rdma/docs.git;a=blob;f=release_notes/mthca_release_notes.txt;h=40f3c4ea77a07fe5ded888b8417530471e89d87b;hb=1ebd1b1dd5b413be595a835bbcb644d2c8897f98.
|
||||
*/
|
||||
max_sge_delta = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#else
|
||||
if (strncmp(dev_name(&sdev->device->dev), "mlx4_", 5) == 0)
|
||||
max_sge_delta = 2;
|
||||
else if (strncmp(dev_name(&sdev->device->dev), "mthca", 5) == 0)
|
||||
max_sge_delta = 1;
|
||||
#endif
|
||||
pr_debug("max_sge_delta = %d\n", max_sge_delta);
|
||||
}
|
||||
/*
|
||||
* For max_sge values > 2 * max_sge_delta, subtract max_sge_delta. For
|
||||
* max_sge values < max_sge_delta, use max_sge. For intermediate
|
||||
* max_sge values, use max_sge_delta.
|
||||
*/
|
||||
ch->max_send_sge -=
|
||||
min_t(unsigned, max_sge_delta,
|
||||
max_t(int, 0,
|
||||
ch->max_send_sge - max_sge_delta));
|
||||
qp_init->cap.max_send_sge = ch->max_send_sge;
|
||||
qp_init->cap.max_recv_sge = 1;
|
||||
if (sdev->use_srq) {
|
||||
@@ -3278,7 +3235,8 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
|
||||
struct srpt_send_ioctx *ioctx,
|
||||
struct scst_cmd *cmd)
|
||||
{
|
||||
struct ib_device *dev __maybe_unused;
|
||||
struct srpt_device *sdev = ch->sport->sdev;
|
||||
struct ib_device *dev __maybe_unused = sdev->device;
|
||||
struct scatterlist *sg, *cur_sg;
|
||||
int sg_cnt;
|
||||
scst_data_direction dir;
|
||||
@@ -3294,10 +3252,6 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
|
||||
int i, j, k;
|
||||
int max_sge, nsge;
|
||||
|
||||
BUG_ON(!ch);
|
||||
BUG_ON(!ioctx);
|
||||
BUG_ON(!cmd);
|
||||
dev = ch->sport->sdev->device;
|
||||
max_sge = ch->max_send_sge;
|
||||
dir = scst_cmd_get_data_direction(cmd);
|
||||
BUG_ON(dir == SCST_DATA_NONE);
|
||||
@@ -3309,6 +3263,7 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
|
||||
if (dir == SCST_DATA_WRITE) {
|
||||
scst_cmd_get_write_fields(cmd, &sg, &sg_cnt);
|
||||
WARN_ON(!sg);
|
||||
max_sge = min(max_sge, ch->sport->sdev->dev_attr.max_sge_rd);
|
||||
} else {
|
||||
sg = scst_cmd_get_sg(cmd);
|
||||
sg_cnt = scst_cmd_get_sg_cnt(cmd);
|
||||
@@ -3316,7 +3271,7 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
|
||||
}
|
||||
ioctx->sg = sg;
|
||||
ioctx->sg_cnt = sg_cnt;
|
||||
count = ib_dma_map_sg(ch->sport->sdev->device, sg, sg_cnt,
|
||||
count = ib_dma_map_sg(sdev->device, sg, sg_cnt,
|
||||
scst_to_tgt_dma_dir(dir));
|
||||
if (unlikely(!count))
|
||||
return -EBUSY;
|
||||
@@ -3419,7 +3374,7 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
|
||||
|
||||
while (rsize > 0 && tsize > 0) {
|
||||
sge->addr = dma_addr;
|
||||
sge->lkey = ch->sport->sdev->lkey;
|
||||
sge->lkey = sdev->lkey;
|
||||
|
||||
if (rsize >= dma_len) {
|
||||
sge->length =
|
||||
|
||||
Reference in New Issue
Block a user