]> git.baikalelectronics.ru Git - kernel.git/commit
IB/core: Introduce and use rdma_create_user_ah
authorParav Pandit <parav@mellanox.com>
Mon, 16 Oct 2017 05:45:12 +0000 (08:45 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 18 Oct 2017 16:10:36 +0000 (12:10 -0400)
commitd3bed7db7ca666be15332973db3ba7edfee67506
tree4f3812d332206bd246d7718b53ad51e83278fdbe
parent588ae97c0e041e8f180dda12ddea968e55f9b5b7
IB/core: Introduce and use rdma_create_user_ah

Introduce rdma_create_user_ah API which allows passing udata to
provider driver and additionally which resolves DMAC for RoCE.

ib_resolve_eth_dmac() resolves destination mac address for unicast,
multicast, link local ipv4 mapped ipv6 and ipv6 destination gid entry.
This allows all RoCE provider drivers to avoid duplicating such code.

Such change brings consistency where IB core always resolves dmac and pass
it to RoCE provider drivers for user and kernel consumers, with this
ah_attr->roce.dmac is always an input field for provider drivers.

This uniformity avoids exporting ib_resolve_eth_dmac symbol to providers
or other modules. Therefore its removed as exported symbol at later in
the patch series.

Now uverbs and umad both makes use of rdma_create_user_ah API which
fixes the issue where umad has invalid DMAC for address.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/user_mad.c
drivers/infiniband/core/uverbs_cmd.c
drivers/infiniband/core/verbs.c
include/rdma/ib_verbs.h