]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - include/rdma/ib_verbs.h
RDMA/netdev: Hoist alloc_netdev_mqs out of the driver
authorDenis Drozdov <denisd@mellanox.com>
Tue, 14 Aug 2018 11:08:51 +0000 (14:08 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 11 Oct 2018 00:58:11 +0000 (17:58 -0700)
commitf6a8a19bb11b46d60250ddc4e3e1ba6aa166f488
tree4f8228ae72f79461137697c8824a7f7e99df73dd
parenta6deaa99591098a3e558978c6cec0054fd1d3b97
RDMA/netdev: Hoist alloc_netdev_mqs out of the driver

netdev has several interfaces that expect to call alloc_netdev_mqs from
the core code, with the driver only providing the arguments.  This is
incompatible with the rdma_netdev interface that returns the netdev
directly.

Thus re-organize the API used by ipoib so that the verbs core code calls
alloc_netdev_mqs for the driver. This is done by allowing the drivers to
provide the allocation parameters via a 'get_params' callback and then
initializing an allocated netdev as a second step.

Fixes: cd565b4b51e5 ("IB/IPoIB: Support acceleration options callbacks")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Denis Drozdov <denisd@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/core/verbs.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
include/linux/mlx5/driver.h
include/rdma/ib_verbs.h