Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2974296ybi; Mon, 17 Jun 2019 13:51:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvodvKLEKNvKIbZ0+nMe2c36JCNyWo5zwHgW0SoSkDsTR9+ZamTuGYwGHXWzFVM5RNb3SG X-Received: by 2002:a62:1ec3:: with SMTP id e186mr116870158pfe.197.1560804689001; Mon, 17 Jun 2019 13:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560804688; cv=none; d=google.com; s=arc-20160816; b=rRNooS/jAH5cln4BdNVNiRgOnU5iW8MXMclnoQEtU2eEI+yOpA/je1p5CVBTmAqwhy ot7aVVo6hy/8RPvF0ripsSz2Kd9ZZrI/Yp/1Oyo8MME3tPLfaGMsJnCryWm+0Ko+zKnP ghT45pBt2rf07TFLKObp2ZiJyMnbOe7sfbkgvxL27g43VvtsF5K1dZsXQan/BN7QWr7v ez6zybXlEu0DdwlX4n3WF0UDpzJX3yEB1D3af27UvD+wVRJAvD6L+AbcvVvQXoEauPfN +qMJ0CsWHZ4kjl3RxT3/WRtpJ02QeynuecOMmVsmuMw7LMx0CFJkBEO/hpADmRQN+cvJ dk2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=HLt4Zs39F8lYdKe/G8SBQLXzRRzi8LIVUs93jft3djA=; b=yvIYsySkZq9FpzXuG+QhQLqAUQrwRdGMorxwsCy8KJSxPVykD2D1Fut+MEaeNxykY0 jNSLTPfS32Tsm/eOe6zg3mY9JhWl9sgrOlWaaGOhUFq8q5WU65pzyaQFtzmTdtIFzX4E dNx6/5eB+vBoI8veOAwEvs0g/T+n1AvlVsaqJFHp3fvomdf+D+usny+OC+fsZ3Vt8Ni8 Fr3KCOqt7ZntzkpgPDIDkTprTERh7ZFf7eWWy5aYtesmgOV+dQF8HYoPdJlBXVdggdg1 U835SJSNhQDYwkV61ugZpOv4Sjfph/4FyYm79joMe3DzzH1O0i6BuVZ0HvW9sQrsrhIR hNcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si12842771pgr.12.2019.06.17.13.51.13; Mon, 17 Jun 2019 13:51:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726555AbfFQUvG (ORCPT + 99 others); Mon, 17 Jun 2019 16:51:06 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:45446 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725497AbfFQUvF (ORCPT ); Mon, 17 Jun 2019 16:51:05 -0400 Received: by mail-pl1-f193.google.com with SMTP id bi6so4626491plb.12; Mon, 17 Jun 2019 13:51:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HLt4Zs39F8lYdKe/G8SBQLXzRRzi8LIVUs93jft3djA=; b=rp8NaVPiwZXvwCFwIm0d/wfkdQThdHujF+xou+5jQBnU5lO9T8ulJQxLDXLv98VAQE 9yYqLy+9VIRRqm+Sxw7SD6oHxzjzC05ftH4zFAM5Sot2cbrQFz0ZACzLaYxGDqrTnDU1 fRVSTyUvaUmz6QBTh4wMgK2Bud0q5y9wjeO67FYrw6T3slUYOnGn4Cjwv0yHEBQ6Kwtt 3sX7MMK4N3hMES0nogwciaYevGcj60hvRgVIq8XovTo9iHtebIrkKQU0jrjx2xDXiSHU EVKsdIZGdHgtfCOTe91je1c1fbEY/BSOyOktJMRvud1fo8Bj0+aN2kEBivv1u1L8ULf6 Z4kQ== X-Gm-Message-State: APjAAAU3GDuJN0xvv2UbjqCdp1XvFqks47SZAuvi9GHM5QfVjUit7geE /wtFLM5Ys8owkrjfHvNsZX9Es5XK3JM= X-Received: by 2002:a17:902:4481:: with SMTP id l1mr111969435pld.121.1560804664671; Mon, 17 Jun 2019 13:51:04 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:202:4308:52a3:24b6:2c60]) by smtp.gmail.com with ESMTPSA id f88sm226851pjg.5.2019.06.17.13.51.03 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 13:51:03 -0700 (PDT) Subject: Re: [PATCH 1/8] scsi: add a host / host template field for the virt boundary To: Christoph Hellwig , "Martin K . Petersen" Cc: Sagi Grimberg , Max Gurtovoy , linux-rdma@vger.kernel.org, linux-scsi@vger.kernel.org, megaraidlinux.pdl@broadcom.com, MPT-FusionLinux.pdl@broadcom.com, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190617122000.22181-1-hch@lst.de> <20190617122000.22181-2-hch@lst.de> From: Bart Van Assche Message-ID: Date: Mon, 17 Jun 2019 13:51:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190617122000.22181-2-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.