linux/drivers/infiniband/ulp/opa_vnic
Jason Gunthorpe 11a0ae4c4b RDMA: Allow ib_client's to fail when add() is called
When a client is added it isn't allowed to fail, but all the client's have
various failure paths within their add routines.

This creates the very fringe condition where the client was added, failed
during add and didn't set the client_data. The core code will then still
call other client_data centric ops like remove(), rename(), get_nl_info(),
and get_net_dev_by_params() with NULL client_data - which is confusing and
unexpected.

If the add() callback fails, then do not call any more client ops for the
device, even remove.

Remove all the now redundant checks for NULL client_data in ops callbacks.

Update all the add() callbacks to return error codes
appropriately. EOPNOTSUPP is used for cases where the ULP does not support
the ib_device - eg because it only works with IB.

Link: https://lore.kernel.org/r/20200421172440.387069-1-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Acked-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-05-06 11:57:33 -03:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
opa_vnic_encap.c IB/hfi1: Ensure ucast_dlid access doesnt exceed bounds 2018-09-30 19:21:12 -06:00
opa_vnic_encap.h IB/hfi1: Get rid of a warning 2020-03-27 12:51:04 -03:00
opa_vnic_ethtool.c RDMA/opa_vnic: Delete driver version 2020-02-27 16:40:40 -04:00
opa_vnic_internal.h RDMA/opa_vnic: Delete driver version 2020-02-27 16:40:40 -04:00
opa_vnic_netdev.c net: remove 'fallback' argument from dev->ndo_select_queue() 2019-03-20 11:18:55 -07:00
opa_vnic_vema_iface.c IB/opa_vnic: Add routing control information 2017-09-27 11:21:57 -04:00
opa_vnic_vema.c RDMA: Allow ib_client's to fail when add() is called 2020-05-06 11:57:33 -03:00