[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ea0f90cd-6263-6a9e-9c88-ed8a8017317e@acm.org>
Date: Mon, 17 Jun 2019 13:51:02 -0700
From: Bart Van Assche <bvanassche@....org>
To: Christoph Hellwig <hch@....de>,
"Martin K . Petersen" <martin.petersen@...cle.com>
Cc: Sagi Grimberg <sagi@...mberg.me>, Max Gurtovoy <maxg@...lanox.com>,
linux-rdma@...r.kernel.org, linux-scsi@...r.kernel.org,
megaraidlinux.pdl@...adcom.com, MPT-FusionLinux.pdl@...adcom.com,
linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/8] scsi: add a host / host template field for the virt
boundary
On 6/17/19 5:19 AM, Christoph Hellwig wrote:
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 65d0a10c76ad..d333bb6b1c59 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1775,7 +1775,8 @@ void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q)
> dma_set_seg_boundary(dev, shost->dma_boundary);
>
> blk_queue_max_segment_size(q, shost->max_segment_size);
> - dma_set_max_seg_size(dev, shost->max_segment_size);
> + blk_queue_virt_boundary(q, shost->virt_boundary_mask);
> + dma_set_max_seg_size(dev, queue_max_segment_size(q));
Although this looks fine to me for LLDs that own a PCIe device, I doubt
this is correct for SCSI LLDs that share a PCIe device with other ULP
drivers. From the RDMA core:
/* Setup default max segment size for all IB devices */
dma_set_max_seg_size(device->dma_device, SZ_2G);
Will instantiating a SCSI host (iSER or SRP) for an RDMA adapter cause
the maximum segment size to be modified for all ULP drivers associated
with that HCA?
Thanks,
Bart.
Powered by blists - more mailing lists