[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241114000105.703740-1-jbrandeb@kernel.org>
Date: Wed, 13 Nov 2024 16:00:56 -0800
From: jbrandeb@...nel.org
To: netdev@...r.kernel.org
Cc: jbrandeburg@...udflare.com,
Jesse Brandeburg <jbrandeb@...nel.org>,
intel-wired-lan@...ts.osuosl.org,
Dave Ertman <david.m.ertman@...el.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH net v1] ice: do not reserve resources for RDMA when disabled
From: Jesse Brandeburg <jbrandeb@...nel.org>
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.
Do this by avoiding enabling the capability when scanning hardware
capabilities.
Fixes: d25a0fc41c1f ("ice: Initialize RDMA support")
CC: Dave Ertman <david.m.ertman@...el.com>
Signed-off-by: Jesse Brandeburg <jbrandeb@...nel.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 009716a12a26..70be07ad2c10 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -2174,7 +2174,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:
base-commit: 2d5404caa8c7bb5c4e0435f94b28834ae5456623
--
2.39.5
Powered by blists - more mailing lists