[rds-devel] dma_sync [was: Has anyone tried RDS on IA64 Linux?]
Or Gerlitz
ogerlitz at voltaire.com
Thu May 1 07:16:07 PDT 2008
Olaf Kirch wrote:
> RDS headers are in DMA consistent memory, so there's no explicit
> dma_sync required. Correct?
not that I understand why DMA consistent memory is used for data
buffers, but since this is the case, I think you are right on this
observation.
> Given that logic, we would really need to sync explicitly when
> we receive a RDS packet that does not use the last fragment of the
> mapped page, correct? Proposed patch below...
sounds correct, see one comment on your patch below
Or.
> net/rds/ib_recv.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> Index: ofa_kernel-1.3/net/rds/ib_recv.c
> ===================================================================
> --- ofa_kernel-1.3.orig/net/rds/ib_recv.c
> +++ ofa_kernel-1.3/net/rds/ib_recv.c
> @@ -75,6 +75,10 @@ static void rds_ib_recv_unmap_page(struc
> ib_dma_unmap_page(ic->i_cm_id->device,
> recv->r_sge[0].addr - recv->r_frag->f_offset,
> PAGE_SIZE, DMA_FROM_DEVICE);
> + else
> + ib_dma_sync_single_for_device(ic->i_cm_id->device,
> + recv->r_sge[0].addr - recv->r_frag->f_offset,
> + PAGE_SIZE, DMA_FROM_DEVICE);
>
isn't RDS_FRAG_SIZE needed here and not PAGE_SIZE?
> recv->r_sge[0].addr = 0;
> }
More information about the rds-devel
mailing list