Message ID | 20241114000105.703740-1-jbrandeb@kernel.org (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v1] ice: do not reserve resources for RDMA when disabled | expand |
On Wed, Nov 13, 2024 at 04:00:56PM -0800, jbrandeb@kernel.org wrote: > From: Jesse Brandeburg <jbrandeb@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@intel.com> > Signed-off-by: Jesse Brandeburg <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 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)) ice_eth is not dependent on CONFIG_INFINIBAND_IRDMA and can be built perfectly without irdma. So technically, you disabled RDMA for such kernels and users won't be able to load out-of-tree built module. I don't care about out-of-tree code, but it is worth to add into commit message, so users will know what to do it IRDMA stopped to work for them. Thanks > + 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 > >
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: