-static int
-mlx5_config_doorbell_mapping_env(const struct mlx5_common_dev_config *config)
-{
- char *env;
- int value;
-
- MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY);
- /* Get environment variable to store. */
- env = getenv(MLX5_SHUT_UP_BF);
- value = env ? !!strcmp(env, "0") : MLX5_ARG_UNSET;
- if (config->dbnc == MLX5_ARG_UNSET)
- setenv(MLX5_SHUT_UP_BF, MLX5_SHUT_UP_BF_DEFAULT, 1);
- else
- setenv(MLX5_SHUT_UP_BF,
- config->dbnc == MLX5_TXDB_NCACHED ? "1" : "0", 1);
- return value;
-}
-
-static void
-mlx5_restore_doorbell_mapping_env(int value)
-{
- MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY);
- /* Restore the original environment variable state. */
- if (value == MLX5_ARG_UNSET)
- unsetenv(MLX5_SHUT_UP_BF);
- else
- setenv(MLX5_SHUT_UP_BF, value ? "1" : "0", 1);
-}
-
-/**
- * Extract pdn of PD object using DV API.
- *
- * @param[in] pd
- * Pointer to the verbs PD object.
- * @param[out] pdn
- * Pointer to the PD object number variable.
- *
- * @return
- * 0 on success, error value otherwise.
- */
-int
-mlx5_os_get_pdn(void *pd, uint32_t *pdn)
-{
-#ifdef HAVE_IBV_FLOW_DV_SUPPORT
- struct mlx5dv_obj obj;
- struct mlx5dv_pd pd_info;
- int ret = 0;
-
- obj.pd.in = pd;
- obj.pd.out = &pd_info;
- ret = mlx5_glue->dv_init_obj(&obj, MLX5DV_OBJ_PD);
- if (ret) {
- DRV_LOG(DEBUG, "Fail to get PD object info");
- return ret;
- }
- *pdn = pd_info.pdn;
- return 0;
-#else
- (void)pd;
- (void)pdn;
- return -ENOTSUP;
-#endif /* HAVE_IBV_FLOW_DV_SUPPORT */
-}
-