]> git.ipfire.org Git - thirdparty/linux.git/commit
RDMA/irdma: Remove redundant legacy_mode checks
authorJacob Moroni <jmoroni@google.com>
Tue, 2 Jun 2026 21:44:22 +0000 (21:44 +0000)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 5 Jun 2026 17:09:29 +0000 (14:09 -0300)
commited8621be482bf18dcd217aa024e95758bf9d28f2
tree017cbd815b396f6216138ed003bbe5364b43b407
parent7d29f7e9dbd844cae4d3e559cf78324b9642fd6b
RDMA/irdma: Remove redundant legacy_mode checks

The driver has the following invariants:

1. legacy_mode is only allowed on GEN_1 hardware (enforced
   in irdma_alloc_ucontext).

2. GEN_1 hardware does not set IRDMA_FEATURE_CQ_RESIZE or
   IRDMA_FEATURE_RTS_AE. These feature flags are only set
   for GEN_2 and GEN_3 hardware.

Therefore, legacy_mode is always false if IRDMA_FEATURE_CQ_RESIZE
or IRDMA_FEATURE_RTS_AE is set, so remove the redundant checks.

Link: https://patch.msgid.link/r/20260602214423.1315105-1-jmoroni@google.com
Signed-off-by: Jacob Moroni <jmoroni@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/irdma/uk.c
drivers/infiniband/hw/irdma/user.h
drivers/infiniband/hw/irdma/verbs.c