aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_lib.c
diff options
context:
space:
mode:
authorMichal Swiatkowski <[email protected]>2024-12-03 06:58:15 +0000
committerTony Nguyen <[email protected]>2025-02-05 17:04:57 +0000
commit87181cd6985fbd591ba2b7b7c5ab9772c7cab689 (patch)
treecef68c9d5b7d8f323cd3ffd26298277542588d93 /drivers/net/ethernet/intel/ice/ice_lib.c
parentice: treat dyn_allowed only as suggestion (diff)
downloadkernel-87181cd6985fbd591ba2b7b7c5ab9772c7cab689.tar.gz
kernel-87181cd6985fbd591ba2b7b7c5ab9772c7cab689.zip
ice: enable_rdma devlink param
Implement enable_rdma devlink parameter to allow user to turn RDMA feature on and off. It is useful when there is no enough interrupts and user doesn't need RDMA feature. Reviewed-by: Jacob Keller <[email protected]> Reviewed-by: Jan Sokolowski <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Signed-off-by: Michal Swiatkowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_lib.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_lib.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 1827f1f20ce8..16c419809849 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -833,7 +833,13 @@ bool ice_is_safe_mode(struct ice_pf *pf)
*/
bool ice_is_rdma_ena(struct ice_pf *pf)
{
- return test_bit(ICE_FLAG_RDMA_ENA, pf->flags);
+ union devlink_param_value value;
+ int err;
+
+ err = devl_param_driverinit_value_get(priv_to_devlink(pf),
+ DEVLINK_PARAM_GENERIC_ID_ENABLE_RDMA,
+ &value);
+ return err ? test_bit(ICE_FLAG_RDMA_ENA, pf->flags) : value.vbool;
}
/**