Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3727367pxb; Wed, 13 Oct 2021 11:40:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE5DR0DhwLvc0zoArc2ScaBRaYcWUlQ502jBX9pC4uCSG36wu5P2apzJOKp2uZZ29YGvDZ X-Received: by 2002:a17:907:1c89:: with SMTP id nb9mr1021828ejc.441.1634150423382; Wed, 13 Oct 2021 11:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634150423; cv=none; d=google.com; s=arc-20160816; b=AV/Cgq5S/DnrsO6EnUNk2frXJMzbWRzwGOabMp6vt5KK0RWLYzV5otmPJObKfdm6UT hqHg5pZYsyXTi9+IaMVmHKvWdWdhRlHqO8LpBlf7pT8BTYLEhD5DQjZIK7KCjKJMqlQx kf7S92QIIi67ElYMN+YTOWNZTQVGIQBMQ05zCNBDn7p7wlbQKA48Kzp5WmFR/l4XJQpa fGVuQm3AXm6YiFEVVdbm6T4wEbUK2Lk8Ivb/8+96TkGi+Zx91pibl1heONxSS6yhbSr6 z4yKlD2OpusWF/cnqArbdVAd7rY3jUqFGbA0UQ/6RCFYuQxbE2YzEvHmSxz2RvnNvgQC kEtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:dkim-signature; bh=HeNDgHWk/8ZTSHjpjWzNLsUIY0eWVZy3+9yFS87Uc4c=; b=ZnbGzq8BvG2PfkMLFySB8mxJebAxrQHNk3uTcXsaFrJzfot//cdj5R7cjsL5IR0c+L cBI8Mmo+yTjpmygbMjG9RS1StrNetCMCpjIRAMd5jv5KeHtAKpYRaJ28CpX+mpr5Izjg S6uxyO/P2Rm0c+gyiOV61jeYgZ7G7uUtTEwHGPkho2oPLvdMjeYDG/QUR4QEoEahdyAJ VdunV28VC5QYKQ1Jthx7TI9Hr3Yx6eU+IZE73p9cRqKGPM7VJCwT3Z8CTQXYX/fK5Fl/ ZBbOEKH0Ie4oNg3VHVMw6FUoVxUjz3oUMaHdG+4MDP03cbN6OoM0k6HLs+osr7lkBtxB aJLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=ky5zsJ7h; 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=deltatee.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb8si447972ejc.355.2021.10.13.11.39.58; Wed, 13 Oct 2021 11:40:23 -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=@deltatee.com header.s=20200525 header.b=ky5zsJ7h; 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=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238477AbhJMSh1 (ORCPT + 99 others); Wed, 13 Oct 2021 14:37:27 -0400 Received: from ale.deltatee.com ([204.191.154.188]:46918 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238512AbhJMSh0 (ORCPT ); Wed, 13 Oct 2021 14:37:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:content-disposition; bh=HeNDgHWk/8ZTSHjpjWzNLsUIY0eWVZy3+9yFS87Uc4c=; b=ky5zsJ7h+Ld5fKmnS3LGc4Byxh lhUhXulLLFEn2PBmzNv3daGsQhH2Ng6OSmjY52MzQClmgJteFWzjPY3kFehZq+oZSRJOoiGro8Sim R+zm9WYNG2VR5ElCvp1UenmkPNBaje7nHXrxaXKolRQik6WEQTVaxnMjXyYPsRndx2dpxXaekZ+KU mxS8dkCovzAWrDfAR8DxqR2s6gXVdB4pzxTd6zLaOWg01M5TywK4X/QM1o2b4xoaryEjFy71BCB9b AtWY6cCq7+bD8oDo5SME9GECrWSTymCMDcJfmppDmJCLu4nzJFj9bjh2rzBD1mZUnGCObuhoSFk7d sEBoefqA==; Received: from s0106a84e3fe8c3f3.cg.shawcable.net ([24.64.144.200] helo=[192.168.0.10]) by ale.deltatee.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1maj60-0002uF-2Q; Wed, 13 Oct 2021 12:35:20 -0600 To: Bart Van Assche , linux-rdma@vger.kernel.org, Jason Gunthorpe Cc: linux-kernel@vger.kernel.org, Doug Ledford References: <20211013165942.89806-1-logang@deltatee.com> <5eec6b1b-726e-b26d-bd82-f03fd5462b8f@acm.org> From: Logan Gunthorpe Message-ID: Date: Wed, 13 Oct 2021 12:35:19 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <5eec6b1b-726e-b26d-bd82-f03fd5462b8f@acm.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 24.64.144.200 X-SA-Exim-Rcpt-To: dledford@redhat.com, linux-kernel@vger.kernel.org, jgg@ziepe.ca, linux-rdma@vger.kernel.org, bvanassche@acm.org X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH] RDMA/core: Set sgtable nents when using ib_dma_virt_map_sg() X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-10-13 12:33 p.m., Bart Van Assche wrote: > On 10/13/21 9:59 AM, Logan Gunthorpe wrote: >> ib_dma_map_sgtable_attrs() should be mapping the sgls and setting nents >> but the ib_uses_virt_dma() path falls back to ib_dma_virt_map_sg() >> which will not set the nents in the sgtable. >> >> Check the return value (per the map_sg calling convention) and set >> sgt->nents appropriately on success. >> >> Link: >> https://lore.kernel.org/all/996fa723-18ef-d35b-c565-c9cb9dc2d5e1@acm.org/T/#u >> >> Reported-by: Bart Van Assche >> Signed-off-by: Logan Gunthorpe >> Tested-by: Bart Van Assche > > Does this patch need a "Fixes:" tag? Right, yeah: Fixes: 79fbd3e1241c ("RDMA: Use the sg_table directly and remove the opencoded version from umem") Logan