[Intel-wired-lan] [PATCH net v1] ice: do not reserve resources for RDMA when disabled
Ertman, David M
david.m.ertman at intel.com
Thu Nov 14 18:06:21 UTC 2024
> -----Original Message-----
> From: jbrandeb at kernel.org <jbrandeb at kernel.org>
> Sent: Wednesday, November 13, 2024 4:01 PM
> To: netdev at vger.kernel.org
> Cc: Brandeburg, Jesse <jbrandeburg at cloudflare.com>; Jesse Brandeburg
> <jbrandeb at kernel.org>; intel-wired-lan at lists.osuosl.org; Ertman, David M
> <david.m.ertman at intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen at intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel at intel.com>; Andrew Lunn <andrew+netdev at lunn.ch>;
> David S. Miller <davem at davemloft.net>; Eric Dumazet
> <edumazet at google.com>; Jakub Kicinski <kuba at kernel.org>; Paolo Abeni
> <pabeni at redhat.com>
> Subject: [PATCH net v1] ice: do not reserve resources for RDMA when
> disabled
>
> From: Jesse Brandeburg <jbrandeb at kernel.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 at intel.com>
> Signed-off-by: Jesse Brandeburg <jbrandeb at 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 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,
The HW caps struct should always accurately reflect the capabilities of the HW being probed. Since this
is a kernel configuration (i.e. software) consideration, the more appropriate approach would be to control
the PF flag "ICE_FLAG_RDMA_ENA" based on the kernel CONFIG setting.
Thanks,
DaveE
More information about the Intel-wired-lan
mailing list