diff options
author | Kamal Heib <kamalheib1@gmail.com> | 2019-01-29 12:08:50 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-02-04 15:57:49 -0700 |
commit | 668aa15b5bf87f156ec805cb7348c785c56b82ab (patch) | |
tree | 1d70fe5922d8da7a127a92358b4f499862ab8389 /drivers/infiniband/sw/rxe/rxe_av.c | |
parent | fa40718804a1c164b62c95ca626f26308be44257 (diff) | |
download | linux-668aa15b5bf87f156ec805cb7348c785c56b82ab.tar.gz linux-668aa15b5bf87f156ec805cb7348c785c56b82ab.tar.bz2 linux-668aa15b5bf87f156ec805cb7348c785c56b82ab.zip |
RDMA/rxe: Improve loopback marking
Currently a packet is marked for loopback only if the source and
destination addresses equals. This is not enough when multiple gids are
present in rxe device's gid table and the traffic is from one gid to
another. Fix it by marking the packet for loopback if the destination MAC
address is equal to the source MAC address.
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Tested-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_av.c')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_av.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c index 27a7dec18874..81ee756c19b8 100644 --- a/drivers/infiniband/sw/rxe/rxe_av.c +++ b/drivers/infiniband/sw/rxe/rxe_av.c @@ -38,6 +38,7 @@ void rxe_init_av(struct rdma_ah_attr *attr, struct rxe_av *av) { rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr); rxe_av_fill_ip_info(av, attr); + memcpy(av->dmac, attr->roce.dmac, ETH_ALEN); } int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr) |