• C
    xprtrdma: Replace DMA_BIDIRECTIONAL · 99ef4db3
    Chuck Lever 提交于
    The use of DMA_BIDIRECTIONAL is discouraged by DMA-API.txt.
    Fortunately, xprtrdma now knows which direction I/O is going as
    soon as it allocates each regbuf.
    
    The RPC Call and Reply buffers are no longer the same regbuf. They
    can each be labeled correctly now. The RPC Reply buffer is never
    part of either a Send or Receive WR, but it can be part of Reply
    chunk, which is mapped and registered via ->ro_map . So it is not
    DMA mapped when it is allocated (DMA_NONE), to avoid a double-
    mapping.
    
    Since Receive buffers are no longer DMA_BIDIRECTIONAL and their
    contents are never modified by the host CPU, DMA-API-HOWTO.txt
    suggests that a DMA sync before posting each buffer should be
    unnecessary. (See my_card_interrupt_handler).
    Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
    99ef4db3
xprt_rdma.h 16.9 KB