ice: fix reservation of resources for RDMA when disabled
Subsystems (3)
PATCH v2 1/1 ice: fix reservation of resources for RDMA when disabled
From: Jesse Brandeburg <[email protected]>
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.
---
v2: resend with acks, add note about oot irdma (Leon), reword commit message
v1: https://lore.kernel.org/netdev/[email protected]/
--- drivers/net/ethernet/intel/ice/ice_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_common.c +2 -1
@@ -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 :
Signature · 1 line
2.43.0
Quoted 24 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jesse Brandeburg
Sent: Thursday, March 6, 2025 6:57 PM
To: [email protected]
Cc: Brandeburg, Jesse <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Kitszel, Przemyslaw <[email protected]>; Ertman, David M <[email protected]>
Subject: [Intel-wired-lan] [PATCH intel-net v2] ice: fix reservation of resources for RDMA when disabledFrom: Jesse Brandeburg <[email protected]>
If the
CONFIG_INFINIBAND_IRDMAsymbol 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.
Quoted 7 lines
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 <[email protected]>Acked-by Dave Ertman <[email protected]>
Quoted 28 lines
---
v2: resend with acks, add note about oot irdma (Leon), reword commit message
v1: https://lore.kernel.org/netdev/20241114000105.703740-1-
[email protected]/--- drivers/net/ethernet/intel/ice/ice_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/intel/ice/ice_common.c +2
-1@@ -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);drivers/net/ethernet/intel/ice/ice_common.c +0
-1break ;case ICE_AQC_CAPS_MAX_MTU : --2.43.0
Quoted 18 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jesse Brandeburg
Sent: 06 March 2025 23:27
To: [email protected]
Cc: Brandeburg, Jesse <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Kitszel, Przemyslaw <[email protected]>; Ertman, David M <[email protected]>
Subject: [Intel-wired-lan] [PATCH intel-net v2] ice: fix reservation of resources for RDMA when disabledFrom: Jesse Brandeburg <[email protected]>
If the
CONFIG_INFINIBAND_IRDMAsymbol 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 <[email protected]>Acked-by Dave Ertman <[email protected]>
Quoted 7 lines
---
v2: resend with acks, add note about oot irdma (Leon), reword commit message
v1: https://lore.kernel.org/netdev/[email protected]/
---drivers/net/ethernet/intel/ice/ice_common.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)