The MANA hardware channel starts with room for one request. This series lets the driver use the depth reported by the PF. It tests the new channel before publishing it and keeps the depth-one channel when the reported geometry cannot be used.
Changes since v11: - Split doorbell validation into a standalone fix. Once ESTABLISH_HWC has submitted queue addresses, retain the HWC mappings until the PF acknowledges DESTROY_HWC. Bound automatic PCI reprobes after an unacknowledged teardown; a still-bound device can retry in place. - Drop the v11 early returns from CQ and QP destruction. RDMA core can release these objects on process exit; the driver must still remove its callbacks and release the backing. PD, MR/MW and DM destruction can finish locally after a normal posted-command timeout. At that boundary the PF has drained old client DMA and invalidated outstanding requests. An unposted request or a reset notification is not such a guarantee. - Publish a batch of requests with one SQ doorbell. Do not post the next batch until the previous one finishes. Check posted deadlines before accepting or returning a reply so a late CREATE cannot supply a handle. A queued caller can detect the timeout even if the sender has not run. - Check the full-width depth against the 4 KiB descriptor rings. Enforce the negotiated transmit and receive limits and remove the redundant RDMA minimum-size check. Restore a tested depth-one channel only after acknowledged teardown of the failed candidate. Validation: targeted GCC and Clang W=1 builds and strict 80-column checkpatch on the series. Bounded host tests cover a two-request batch, replies before, at and after deadline, RDMA cleanup, unacknowledged HWC teardown, depth fallback and request sizing. No new hardware, performance or full-kernel test is claimed. Previous revision: https://lore.kernel.org/all/[email protected]/ Long Li (5): net: mana: validate the HWC doorbell before ringing it net: mana: keep HWC queues until the PF acknowledges teardown net: mana: protect the HWC response buffer until the sender returns net: mana: support concurrent HWC requests net: mana: use the reported HWC queue depth drivers/infiniband/hw/mana/main.c | 15 +- drivers/infiniband/hw/mana/mr.c | 6 +- .../net/ethernet/microsoft/mana/gdma_cdx.c | 6 +- .../net/ethernet/microsoft/mana/gdma_main.c | 165 ++- .../net/ethernet/microsoft/mana/gdma_pci.c | 144 ++- .../net/ethernet/microsoft/mana/hw_channel.c | 1081 +++++++++++++---- drivers/net/ethernet/microsoft/mana/mana_en.c | 4 +- .../net/ethernet/microsoft/mana/shm_channel.c | 58 +- include/net/mana/gdma.h | 19 + include/net/mana/hw_channel.h | 66 +- include/net/mana/shm_channel.h | 10 +- 11 files changed, 1240 insertions(+), 334 deletions(-) base-commit: eb6d6c80d35449c27471b1874f13066c09a8964d
