[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA1PR11MB619459AFADE5BB3A515C0577DD5B2@IA1PR11MB6194.namprd11.prod.outlook.com>
Date: Thu, 14 Nov 2024 18:06:21 +0000
From: "Ertman, David M" <david.m.ertman@...el.com>
To: "jbrandeb@...nel.org" <jbrandeb@...nel.org>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>
CC: "Brandeburg, Jesse" <jbrandeburg@...udflare.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<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: RE: [PATCH net v1] ice: do not reserve resources for RDMA when
disabled
> -----Original Message-----
> From: jbrandeb@...nel.org <jbrandeb@...nel.org>
> Sent: Wednesday, November 13, 2024 4:01 PM
> To: netdev@...r.kernel.org
> Cc: Brandeburg, Jesse <jbrandeburg@...udflare.com>; Jesse Brandeburg
> <jbrandeb@...nel.org>; intel-wired-lan@...ts.osuosl.org; Ertman, David M
> <david.m.ertman@...el.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; Kitszel, Przemyslaw
> <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,
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
Powered by blists - more mailing lists