public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Doug Ledford <dledford@redhat.com>,
	Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH] RDMA/core: Set sgtable nents when using ib_dma_virt_map_sg()
Date: Wed, 13 Oct 2021 16:45:00 -0300	[thread overview]
Message-ID: <20211013194500.GA3494942@nvidia.com> (raw)
In-Reply-To: <20211013165942.89806-1-logang@deltatee.com>

On Wed, Oct 13, 2021 at 10:59:42AM -0600, 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 <bvanassche@acm.org>
> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
> Tested-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  include/rdma/ib_verbs.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Applied to for-next, thanks

Jason

      parent reply	other threads:[~2021-10-13 19:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 16:59 [PATCH] RDMA/core: Set sgtable nents when using ib_dma_virt_map_sg() Logan Gunthorpe
2021-10-13 18:33 ` Bart Van Assche
2021-10-13 18:35   ` Logan Gunthorpe
2021-10-13 19:45 ` Jason Gunthorpe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211013194500.GA3494942@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=bvanassche@acm.org \
    --cc=dledford@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=logang@deltatee.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox