From patchwork Wed May 10 08:59:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinyoung Choi X-Patchwork-Id: 91973 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3471332vqo; Wed, 10 May 2023 02:04:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4MAeq/Y7Z6S7AbSIyJtMl7rcPnw+nidKPB8LvgEJmJHdVAF6Z4zM1/TWkqZy5JME0WtBJr X-Received: by 2002:a17:90a:8a8c:b0:24e:5344:9c9d with SMTP id x12-20020a17090a8a8c00b0024e53449c9dmr16291371pjn.38.1683709490079; Wed, 10 May 2023 02:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683709490; cv=none; d=google.com; s=arc-20160816; b=KT460qsKKaur55tiDNUy+kWGDNtX+j6dYbsYkK/qptFHkui2j+HAfDnVYxGkCLoDVx qsDHo/jFgeQFEZX15W7Mxqlm8M2RZD7BrtbS0t4rJPVrnexoQynaqCiAeQ773IV+rNww J/i295EK4yh+SIuJBU7l/QgAMSlevPZVYXyT6WM2T0JwjRL5GCpSfCyFbEdTBCDxPUdw BoYpqy8PbyqBG/kzETRqB61kJYSCEbK4tJOsm0rF4AlFNDHGQoj3795c+IwI0c6VBj6D kGzw7yfPt+wXEak8FsCgF1XCpCfqACb+pclxEb8pDyfgLdhvie6TQ6fKh8pt114Qpqfj zWPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:date:message-id:in-reply-to:to:from :sender:reply-to:subject:mime-version:dkim-signature:dkim-filter; bh=ZM+sCSOwfR6BMhP2ycEflPofWbLGNzFKU7U4qcknaW8=; b=Yqqfr3K3KIPaAQKyQbn1HemGf25ahknhXi+WIsDmVtRgcqaPIzBA1z54H0TO+BTA6H Xie3NM6/Lh4Cas+JoorbBMh5/N8yzvY9yY17vVE4mMM1AR2qcIrmsvPx8fseLLuNjLr8 GUQt85oW8uzAwaHr8z0mHL+9n0c9oT2+dZKX8CviNXqbEY28n/jrcOLCqckdOpS/RCpF Nl/Dn5N6PChoIACNZOe/VLGDVQvXtY0wbafJgtOqVKWqP8RCfLixUv5hz3iU5oscI/r4 pKg/dnO878M3NSjPGWxWZHqqFgj4F1LM73S52ZaVXlHoGaGxj7mWFtNfCcNo+7YwUjXG lhFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=uTMLtsP7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id in16-20020a17090b439000b0024e13530c0dsi21349807pjb.38.2023.05.10.02.04.37; Wed, 10 May 2023 02:04:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=uTMLtsP7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236928AbjEJI70 (ORCPT + 99 others); Wed, 10 May 2023 04:59:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236887AbjEJI7N (ORCPT ); Wed, 10 May 2023 04:59:13 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83F13525F for ; Wed, 10 May 2023 01:59:09 -0700 (PDT) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20230510085907epoutp04a6bbb272ee1a38d40f18824fbe6ab393~dvIyfYGJz0387403874epoutp04D for ; Wed, 10 May 2023 08:59:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20230510085907epoutp04a6bbb272ee1a38d40f18824fbe6ab393~dvIyfYGJz0387403874epoutp04D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1683709147; bh=ZM+sCSOwfR6BMhP2ycEflPofWbLGNzFKU7U4qcknaW8=; h=Subject:Reply-To:From:To:In-Reply-To:Date:References:From; b=uTMLtsP7OuMD8Qe1NqrYiLngFx3YXm+Z3OZdrpf4Dl5zxkHY4oADzvAE2qTTCJt/B LDlMc1cyDYqLs9QeSZPJn73kCtfnG+9SexheXSfl/WXeY2xoHj4us8IF2eKRMuMKUs wc2v6DMhX7Ho2TzqB9JX8TxDafVroUeFuz3MvCOo= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20230510085907epcas2p38c4de637761704a263ba3a299ff61bf1~dvIx6k1yA2639126391epcas2p3f; Wed, 10 May 2023 08:59:07 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.91]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4QGTV24ZlMz4x9Pw; Wed, 10 May 2023 08:59:06 +0000 (GMT) X-AuditID: b6c32a48-6d3fa70000005998-ee-645b5cda02e7 Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id 7E.0E.22936.ADC5B546; Wed, 10 May 2023 17:59:06 +0900 (KST) Mime-Version: 1.0 Subject: [PATCH v2 11/14] nvme: rdma: change how to find the number of integrity of request Reply-To: j-young.choi@samsung.com Sender: Jinyoung CHOI From: Jinyoung CHOI To: Jinyoung CHOI , "axboe@kernel.dk" , "kbusch@kernel.org" , "hch@lst.de" , "sagi@grimberg.me" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "johannes.thumshirn@wdc.com" , "kch@nvidia.com" , "willy@infradead.org" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684@epcms2p1> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20230510085905epcms2p19082f99cbf2c80135d9239e998be7928@epcms2p1> Date: Wed, 10 May 2023 17:59:05 +0900 X-CMS-MailID: 20230510085905epcms2p19082f99cbf2c80135d9239e998be7928 X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJJsWRmVeSWpSXmKPExsWy7bCmqe6tmOgUg/eTVCxW3+1ns3h5SNNi 5eqjTBa9/VvZLBbd2MZk8bfrHpPFpEPXGC2eXp3FZLH3lrbF5V1z2CyWH//HZLHu9XsWi98/ 5rA58Hqcv7eRxWPzCi2Py2dLPTat6mTzmLDoAKPH7psNbB69ze/YPD4+vcXi0bdlFaPH501y Hu0HupkCuKOybTJSE1NSixRS85LzUzLz0m2VvIPjneNNzQwMdQ0tLcyVFPISc1NtlVx8AnTd MnOAzldSKEvMKQUKBSQWFyvp29kU5ZeWpCpk5BeX2CqlFqTkFJgX6BUn5haX5qXr5aWWWBka GBiZAhUmZGfs+rSZsWAPe0X3zjmMDYyr2LoYOTgkBEwkjj8t7WLk4hAS2MEose3fEiaQOK+A oMTfHcJdjJwcwgKxEm/fnmACsYUElCTOrZnFCFIiLGAgcavXHCTMJqAn8XPJDDaQMSICO1kk vt8/ygiSkBDglZjR/pQFwpaW2L58K1gvp4CfROtjS4iwhsSPZb3MELaoxM3Vb9lh7PfH5kON EZFovXcWqkZQ4sHP3VBxSYlDh75CfZIvseFAIES4RuLt8gNQJfoS1zo2gl3AK+Ar0fVnARuI zSKgKnFywytWiBoXiefbP4KtZRaQl9j+dg4zyEhmAU2J9bv0IaYrSxy5xQJRwSfRcfgvO8x/ DRt/Y2XvmPeECaJVTWJRkxFEWEbi6+H57BMYlWYhAnkWkrWzENYuYGRexSiWWlCcm55abFRg Ao/W5PzcTYzgNKzlsYNx9tsPeocYmTgYDzFKcDArifB6h0alCPGmJFZWpRblxxeV5qQWH2I0 BXp4IrOUaHI+MBPklcQbmlgamJiZGZobmRqYK4nzfuxQThESSE8sSc1OTS1ILYLpY+LglGpg 6jnwfeaXrbuUtr39J/AgZUdTjM2spKTt6dWl3akHHxm+atiw4fzLzPPC3zdOVz/zeObkc5cX +MlVPStgyJcQyXNLlq6MOBtRfmlX35Yl3y00fJdxySRNCrA9tFRMWUF6UkNc+q+vz1gitn4v +hNj0cVSuFmy5OanABm3PPYKNeWNK0weT08ySkqeKC8Wvltcvaq+zWDuSzkjV92vt40WZXXu K+18p+tzuVnT9N+1DT9OeC6Vsg/hcuUtWSzm/XNuod87/Q/6ak7PVyXctNPX6mMq5T0mbXB4 pj3L1jvMBnd6HjVsjcl4Ljl96SLlX9L8Ao+1A8VKdv2O6/9kuPFCrFPq9mI2pSepwbzffGKV WIozEg21mIuKEwGStHPFTAQAAA== DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684 References: <20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684@epcms2p1> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765497361923861796?= X-GMAIL-MSGID: =?utf-8?q?1765497361923861796?= Since the request has the number of integrity segments, change to use the relevant api. Cc: Christoph Hellwig Cc: Martin K. Petersen Signed-off-by: Jinyoung Choi --- drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 0eb79696fb73..237d81ad54af 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1507,7 +1507,7 @@ static int nvme_rdma_dma_map_req(struct ib_device *ibdev, struct request *rq, req->metadata_sgl->sg_table.sgl = (struct scatterlist *)(req->metadata_sgl + 1); ret = sg_alloc_table_chained(&req->metadata_sgl->sg_table, - blk_rq_count_integrity_sg(rq->q, rq->bio), + blk_rq_nr_integrity_segments(rq), req->metadata_sgl->sg_table.sgl, NVME_INLINE_METADATA_SG_CNT); if (unlikely(ret)) {