• Ira Weiny's avatar
    IB/mad: Convert allocations from kmem_cache to kzalloc · c9082e51
    Ira Weiny authored
    This patch implements allocating alternate receive MAD buffers within the MAD
    stack.  Support for OPA to send/recv variable sized MADs is implemented later.
    
        1) Convert MAD allocations from kmem_cache to kzalloc
    
           kzalloc is more flexible to support devices with different sized MADs
           and research and testing showed that the current use of kmem_cache does
           not provide performance benefits over kzalloc.
    
        2) Change struct ib_mad_private to use a flex array for the mad data
        3) Allocate ib_mad_private based on the size specified by devices in
           rdma_max_mad_size.
        4) Carry the allocated size in ib_mad_private to be used when processing
           ib_mad_private objects.
        5) Alter DMA mappings based on the mad_size of ib_mad_private.
        6) Replace the use of sizeof and static defines as appropriate
        7) Add appropriate casts for the MAD data when calling processing
           functions.
    Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    c9082e51
agent.h 2.11 KB