[openib-general] DMA mapping abuses in MAD layer
Sean Hefty
mshefty at ichips.intel.com
Thu Oct 13 16:17:45 PDT 2005
Sean Hefty wrote:
> Does anyone else have any other ideas on how to fix this issue?
The current MAD interface requires the user to have code similar to this:
send_buf->sge.addr = dma_map_single(mad_agent->device->dma_device,
buf, buf_size, DMA_TO_DEVICE);
pci_unmap_addr_set(send_buf, mapping, send_buf->sge.addr);
This is consistent with how an ib_send_wr would be formatted for other QPs.
Another possibility, however, is to let the user do:
send_buf->sge.addr = (unsigned long) buf;
And then have the MAD layer perform the mapping/unmapping immediately before and
after posting to the QP. This keeps the syntax of the current interface, but
still requires user changes.
Any preference to pursuing this change or modifying ib_post_send_mad to take an
ib_mad_send_buf?
- Sean
More information about the general
mailing list