netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH intel-net v2] ice: fix reservation of resources for RDMA when disabled
@ 2025-03-06 17:56 Jesse Brandeburg
  2025-03-07  7:04 ` [Intel-wired-lan] " Loktionov, Aleksandr
  2025-03-17 11:01 ` Rinitha, SX
  0 siblings, 2 replies; 3+ messages in thread
From: Jesse Brandeburg @ 2025-03-06 17:56 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: Jesse Brandeburg, netdev, kernel-team, jbrandeb, leon,
	przemyslaw.kitszel, Dave Ertman

From: Jesse Brandeburg <jbrandeburg@cloudflare.com>

If the CONFIG_INFINIBAND_IRDMA symbol is not enabled as a module or a
built-in, then don't let the driver reserve resources for RDMA. The result
of this change is a large savings in resources for older kernels, and a
cleaner driver configuration for the IRDMA=n case for old and new kernels.

Implement this by avoiding enabling the RDMA capability when scanning
hardware capabilities.

Note: Loading the out-of-tree irdma driver in connection to the in-kernel
ice driver, is not supported, and should not be attempted, especially when
disabling IRDMA in the kernel config.

Fixes: d25a0fc41c1f ("ice: Initialize RDMA support")
Signed-off-by: Jesse Brandeburg <jbrandeburg@cloudflare.com>
Acked-by: Dave Ertman <david.m.ertman@intel.com>
---
v2: resend with acks, add note about oot irdma (Leon), reword commit
message
v1: https://lore.kernel.org/netdev/20241114000105.703740-1-jbrandeb@kernel.org/
---
 drivers/net/ethernet/intel/ice/ice_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 7a2a2e8da8fa..1e801300310e 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -2271,7 +2271,8 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps,
 			  caps->nvm_unified_update);
 		break;
 	case ICE_AQC_CAPS_RDMA:
-		caps->rdma = (number == 1);
+		if (IS_ENABLED(CONFIG_INFINIBAND_IRDMA))
+			caps->rdma = (number == 1);
 		ice_debug(hw, ICE_DBG_INIT, "%s: rdma = %d\n", prefix, caps->rdma);
 		break;
 	case ICE_AQC_CAPS_MAX_MTU:
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-17 11:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-06 17:56 [PATCH intel-net v2] ice: fix reservation of resources for RDMA when disabled Jesse Brandeburg
2025-03-07  7:04 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-03-17 11:01 ` Rinitha, SX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).