• Jason Gunthorpe's avatar
    RDMA/cma: Split apart the multiple uses of the same list heads · 99cfddb8
    Jason Gunthorpe authored
    Two list heads in the rdma_id_private are being used for multiple
    purposes, to save a few bytes of memory. Give the different purposes
    different names and union the memory that is clearly exclusive.
    
    list splits into device_item and listen_any_item. device_item is threaded
    onto the cma_device's list and listen_any goes onto the
    listen_any_list. IDs doing any listen cannot have devices.
    
    listen_list splits into listen_item and listen_list. listen_list is on the
    parent listen any rdma_id_private and listen_item is on child listen that
    is bound to a specific cma_dev.
    
    Which name should be used in which case depends on the state and other
    factors of the rdma_id_private. Remap all the confusing references to make
    sense with the new names, so at least there is some hope of matching the
    necessary preconditions with each access.
    
    Link: https://lore.kernel.org/r/0-v1-a5ead4a0c19d+c3a-cma_list_head_jgg@nvidia.comSigned-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
    99cfddb8
cma_priv.h 3.88 KB