Skip to content
  • Yuval Shaia's avatar
    b196d4f1
    hw/rdma: Skip data-path mr_id translation · b196d4f1
    Yuval Shaia authored
    
    
    With the change made in commit 68b89aee ("Utilize ibv_reg_mr_iova for
    memory registration") the MR emulation is no longer needed in order to
    translate the guest addresses into host addresses.
    With that, the next obvious step is to skip entirely the processing in
    data-path.
    To accomplish this, return the backend's lkey to driver so we will not
    need to do the emulated mr_id to backend mr_id translation in data-path.
    
    The function build_host_sge_array is still called in data-path but only
    for backward computability with statistics collection.
    
    While there, as a cosmetic change to make the code cleaner - make one
    copy of the function rdma_backend_create_mr and leave the redundant
    guest_start argument in the legacy code.
    
    Signed-off-by: default avatarYuval Shaia <yuval.shaia.ml@gmail.com>
    Reviewed-by: default avatarMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Message-Id: <20200320143429.9490-3-yuval.shaia.ml@gmail.com>
    Signed-off-by: default avatarMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
    b196d4f1
    hw/rdma: Skip data-path mr_id translation
    Yuval Shaia authored
    
    
    With the change made in commit 68b89aee ("Utilize ibv_reg_mr_iova for
    memory registration") the MR emulation is no longer needed in order to
    translate the guest addresses into host addresses.
    With that, the next obvious step is to skip entirely the processing in
    data-path.
    To accomplish this, return the backend's lkey to driver so we will not
    need to do the emulated mr_id to backend mr_id translation in data-path.
    
    The function build_host_sge_array is still called in data-path but only
    for backward computability with statistics collection.
    
    While there, as a cosmetic change to make the code cleaner - make one
    copy of the function rdma_backend_create_mr and leave the redundant
    guest_start argument in the legacy code.
    
    Signed-off-by: default avatarYuval Shaia <yuval.shaia.ml@gmail.com>
    Reviewed-by: default avatarMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Message-Id: <20200320143429.9490-3-yuval.shaia.ml@gmail.com>
    Signed-off-by: default avatarMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
Loading