• yonatanc's avatar
    IB/rxe: Cache dst in QP instead of getting it for each send · 4ed6ad1e
    yonatanc authored
    In RC QP there is no need to resolve the outgoing interface
    for each packet, as this does not change during QP life cycle.
    
    Instead cache the interface on the socket and use that one.
    This improves performance by 12% by sparing redundant
    calls to rxe_find_route.
    
    ib_send_bw -d rxe0  -x 1 -n 9000 -e  -s $((1024 * 1024 )) -l 100
    
    ----------------------------------------------------------------------------------------
    |        | bytes   | iterations | BW peak[MB/sec] | BW average[MB/sec] | MsgRate[Mpps] |
    ----------------------------------------------------------------------------------------
    | before | 1048576 | 9000       | inf             | 551.21             | 0.000551      |
    | after  | 1048576 | 9000       | inf             | 615.54             | 0.000616      |
    ----------------------------------------------------------------------------------------
    
    Fixes: 8700e3e7 ("Soft RoCE driver")
    Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
    Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    4ed6ad1e
rxe_net.c 16.6 KB