[PATCH] nvmet-rdma: Fix missing dma sync to nvme data structures
Parav Pandit
parav at mellanox.com
Mon Jan 16 09:18:15 PST 2017
> -----Original Message-----
> From: Christoph Hellwig [mailto:hch at lst.de]
> Sent: Monday, January 16, 2017 9:31 AM
> To: Parav Pandit <parav at mellanox.com>
> Cc: hch at lst.de; sagi at grimberg.me; linux-nvme at lists.infradead.org; linux-
> rdma at vger.kernel.org; dledford at redhat.com
> Subject: Re: [PATCH] nvmet-rdma: Fix missing dma sync to nvme data
> structures
>
> > +++ b/drivers/nvme/target/rdma.c
> > @@ -438,6 +438,14 @@ static int nvmet_rdma_post_recv(struct
> > nvmet_rdma_device *ndev, {
> > struct ib_recv_wr *bad_wr;
> >
> > + ib_dma_sync_single_for_device(ndev->device,
> > + cmd->sge[0].addr, sizeof(*cmd->nvme_cmd),
> > + DMA_FROM_DEVICE);
> > +
> > + if (cmd->sge[1].addr)
>
> 0 can be a valid address returned from dma_map_single on some
> architectures.
I see. I will change it to check for the non-zero length instead of non-zero address.
More information about the Linux-nvme
mailing list