Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp708910pxv; Thu, 15 Jul 2021 14:05:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTuWk/Y2OtatQduMDmc6m4jg8tel4GWs3j/xHAbEUHsrBdmA23d8I6Vb5DMasTyJp/zTuW X-Received: by 2002:a17:906:2cc5:: with SMTP id r5mr7531443ejr.454.1626383135797; Thu, 15 Jul 2021 14:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383135; cv=none; d=google.com; s=arc-20160816; b=gVpDynYHSHKk7lhaFGi70SpnZgjb8w89eUfbJzIAR6RyXWkVsUIOgR2VxsC5O8v9wR S9mi5lesR4Bdbl6RZl24p9xWjjlhlRg8B8ATAt8bcsNfoZBaUBcZs4WY8JEeTnyptc76 cShlSaCP5APwHsA80TKPLZYVHmx17Yih02zEuLLDiyYW4K7Jon17nR+eG0A4hgSXMam2 xnE9PAYJAfa7JpY/ULmq4NnCq2djcsmfrgQNTFuQiVaCPM4lzT7cO4fp9HHFdsAzJ0em frqYX+0AclgLODmNVdw96so7HPyc6atEq5BbgBulkLeiRn60PBb6y6gxW+6EXye9Qzos unAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ywCuAIHXD70DXNSJJwrIU+nLniAniVAGKWQxcMUWuVM=; b=pHkL7kSyNHBnfHcGj07WFGGHVnmV2pR4gE/B45lhX5lNTKo/6LAYElmaEsLDlryi6S xZ4sbkaRjWN5BsUFG5CsaSnc30aQi8tzVlfEUHVN9LiMpUhRIfVzzbOXCF920l3r4ULU PVsosKHSNsX4t5woH+iItyNIIkKvxin8iMKgOovmGEdamjJzKoNipvmYSNk/tekbsXYy tJLNPNs+izqY4D4ku1uqVPqh3PSSBPCSL8/TMjnV4SkXA3fv+OkEkUpBw5Xiac/NDQBE f817/jHptYGt33WyVOI0+Xldd4IDgmjNjEXvGxqUJ6uZUKQOGsces2XVroJ9W43Hu+k1 cgLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IpvVvgZq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si9278135edx.270.2021.07.15.14.05.12; Thu, 15 Jul 2021 14:05:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IpvVvgZq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244363AbhGOTQT (ORCPT + 99 others); Thu, 15 Jul 2021 15:16:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:39500 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242931AbhGOTC2 (ORCPT ); Thu, 15 Jul 2021 15:02:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4387A613D3; Thu, 15 Jul 2021 18:58:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375536; bh=OLYz9Fhx4UCce3belqp6thG8WF8rjYVJA9ABbB28Ka4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IpvVvgZqhrX4HzSP3hfMTjBgtmWyIs3RQpomcFHFkIt3au7RrBbYi8/nzVWEc9qXp RA5EIhr7liw3ES+sylzKnfxhRB03Tx2QpkWuxA7yUljbFPgHK6w/nPkt4nTsSLE2l/ wy9ulesRZ9uvbO2m2QTsselskZDg9GGI3OzlIm0c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alaa Hleihel , Israel Rukshin , Max Gurtovoy , Sagi Grimberg , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.12 130/242] IB/isert: Align target max I/O size to initiator size Date: Thu, 15 Jul 2021 20:38:12 +0200 Message-Id: <20210715182615.917276119@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Max Gurtovoy [ Upstream commit 109d19a5eb3ddbdb87c43bfd4bcf644f4569da64 ] Since the Linux iser initiator default max I/O size set to 512KB and since there is no handshake procedure for this size in iser protocol, set the default max IO size of the target to 512KB as well. For changing the default values, there is a module parameter for both drivers. Link: https://lore.kernel.org/r/20210524085215.29005-1-mgurtovoy@nvidia.com Reviewed-by: Alaa Hleihel Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Acked-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/ulp/isert/ib_isert.c | 4 ++-- drivers/infiniband/ulp/isert/ib_isert.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 18266f07c58d..de3fc05fd2e8 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -35,10 +35,10 @@ static const struct kernel_param_ops sg_tablesize_ops = { .get = param_get_int, }; -static int isert_sg_tablesize = ISCSI_ISER_DEF_SG_TABLESIZE; +static int isert_sg_tablesize = ISCSI_ISER_MIN_SG_TABLESIZE; module_param_cb(sg_tablesize, &sg_tablesize_ops, &isert_sg_tablesize, 0644); MODULE_PARM_DESC(sg_tablesize, - "Number of gather/scatter entries in a single scsi command, should >= 128 (default: 256, max: 4096)"); + "Number of gather/scatter entries in a single scsi command, should >= 128 (default: 128, max: 4096)"); static DEFINE_MUTEX(device_list_mutex); static LIST_HEAD(device_list); diff --git a/drivers/infiniband/ulp/isert/ib_isert.h b/drivers/infiniband/ulp/isert/ib_isert.h index 6c5af13db4e0..ca8cfebe26ca 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.h +++ b/drivers/infiniband/ulp/isert/ib_isert.h @@ -65,9 +65,6 @@ */ #define ISER_RX_SIZE (ISCSI_DEF_MAX_RECV_SEG_LEN + 1024) -/* Default I/O size is 1MB */ -#define ISCSI_ISER_DEF_SG_TABLESIZE 256 - /* Minimum I/O size is 512KB */ #define ISCSI_ISER_MIN_SG_TABLESIZE 128 -- 2.30.2