All of lore.kernel.org
 help / color / mirror / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: Bart Van Assche <bvanassche@acm.org>,
	linux-rdma@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>
Cc: linux-kernel@vger.kernel.org, Doug Ledford <dledford@redhat.com>
Subject: Re: [PATCH] RDMA/core: Set sgtable nents when using ib_dma_virt_map_sg()
Date: Wed, 13 Oct 2021 12:35:19 -0600	[thread overview]
Message-ID: <d32f9bc4-78a8-45ab-04e6-69aa6f1952e5@deltatee.com> (raw)
In-Reply-To: <5eec6b1b-726e-b26d-bd82-f03fd5462b8f@acm.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 <bvanassche@acm.org>
>> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
>> Tested-by: Bart Van Assche <bvanassche@acm.org>
> 
> 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

  reply	other threads:[~2021-10-13 18:35 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 [this message]
2021-10-13 19:45 ` Jason Gunthorpe

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=d32f9bc4-78a8-45ab-04e6-69aa6f1952e5@deltatee.com \
    --to=logang@deltatee.com \
    --cc=bvanassche@acm.org \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.