]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
IB/ipoib: Add capability to switch between datagram and connected mode
authorGary Leshner <Gary.S.Leshner@intel.com>
Mon, 11 May 2020 16:07:06 +0000 (12:07 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 21 May 2020 14:23:57 +0000 (11:23 -0300)
commit8f149b684764662bca3e08f340202b7bd67736fc
treea1f9fd097b1b0dc6ee4eaa719163138f175f0e61
parent7638c0e965f48d773d8684d38e0967e4d0ee238c
IB/ipoib: Add capability to switch between datagram and connected mode

This is the prerequisite modification to the ipoib ulp to allow a
rdma netdev to obtain the default ndo ops for init/uninit/open/close.

This is accomplished by setting the netdev ops field within the
callback function passed to the netdev allocation routine which
in turn was passed into the rdma netdev allocation routine.

This allows the rdma netdev to call back into the ulp to create the
resources required for connected mode operation.

Additionally as the ulp is not re-entrant, when switching modes,
the number of real tx queues is set to 1 for the connected mode.

For datagram mode the number of real tx queues is set to the
actual number of tx queues specified at the netdev's allocation.

For the internal ulp netdev the number of tx queues defaults to 1.

It is up to the rdma netdev to specify the actual number it can support.

When the driver does not support a rdma netdev for acceleration,
(-ENOTSUPPORTED return code or the verbs function for allocation is
NULL) the ipoib ulp functions are unaffected by using the internal
netdev allocated by the ipoib ulp.

Link: https://lore.kernel.org/r/20200511160706.173205.19086.stgit@awfm-01.aw.intel.com
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Gary Leshner <Gary.S.Leshner@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c