]> git.baikalelectronics.ru Git - kernel.git/commit
IB/IPoIB: Separate control and data related initializations
authorErez Shitrit <erezsh@mellanox.com>
Mon, 10 Apr 2017 08:22:26 +0000 (11:22 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Apr 2017 19:19:42 +0000 (15:19 -0400)
commit1d487d85c848035ded28b9b087cd0bcc6a5a8639
treeb67d0439302dcd909f46144b3f54131c8e8dd883
parent5f2c2ac3bed5868055f7291209e3b2d5f3499587
IB/IPoIB: Separate control and data related initializations

This patch prepares init and teardown flows so we can call them
through ipoib_options function pointers.

It arranges that area of code as the following:
 * All operations which deal with the resource allocation/deletion
   are performed in one place.
 * All operations that are control oriented, meaning that they are not
   connected to a specific hardware, are performed in a separate place.

The operations for allocation of hardware resources are now in the
function ipoib_dev_init_default, and the deletion of all the resources
are in ipoib_dev_uninit_default

The only exception is the creation of the PD object,
which is used both for resource allocation (create QP etc.)
and for control flows like creating AH.

It also does:
 * Move creation of rx_ring and tx_ring to be in the resources
   allocation area.
 * Move the function ipoib_ib_dev_open that does the open device
   to the control area instead of the dev_init which creates resources.

Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Reviewed-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/ipoib/ipoib.h
drivers/infiniband/ulp/ipoib/ipoib_ib.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_verbs.c