git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx5: convert control path memory to unified malloc
[dpdk.git]
/
drivers
/
net
/
mlx5
/
mlx5_flow_meter.c
diff --git
a/drivers/net/mlx5/mlx5_flow_meter.c
b/drivers/net/mlx5/mlx5_flow_meter.c
index
86c334b
..
bf34687
100644
(file)
--- a/
drivers/net/mlx5/mlx5_flow_meter.c
+++ b/
drivers/net/mlx5/mlx5_flow_meter.c
@@
-10,6
+10,7
@@
#include <rte_mtr_driver.h>
#include <mlx5_devx_cmds.h>
#include <rte_mtr_driver.h>
#include <mlx5_devx_cmds.h>
+#include <mlx5_malloc.h>
#include "mlx5.h"
#include "mlx5_flow.h"
#include "mlx5.h"
#include "mlx5_flow.h"
@@
-356,8
+357,8
@@
mlx5_flow_meter_profile_add(struct rte_eth_dev *dev,
if (ret)
return ret;
/* Meter profile memory allocation. */
if (ret)
return ret;
/* Meter profile memory allocation. */
- fmp =
rte_calloc(__func__, 1
, sizeof(struct mlx5_flow_meter_profile),
- RTE_CACHE_LINE_SIZE);
+ fmp =
mlx5_malloc(MLX5_MEM_ZERO
, sizeof(struct mlx5_flow_meter_profile),
+ RTE_CACHE_LINE_SIZE
, SOCKET_ID_ANY
);
if (fmp == NULL)
return -rte_mtr_error_set(error, ENOMEM,
RTE_MTR_ERROR_TYPE_UNSPECIFIED,
if (fmp == NULL)
return -rte_mtr_error_set(error, ENOMEM,
RTE_MTR_ERROR_TYPE_UNSPECIFIED,
@@
-374,7
+375,7
@@
mlx5_flow_meter_profile_add(struct rte_eth_dev *dev,
TAILQ_INSERT_TAIL(fmps, fmp, next);
return 0;
error:
TAILQ_INSERT_TAIL(fmps, fmp, next);
return 0;
error:
-
rte
_free(fmp);
+
mlx5
_free(fmp);
return ret;
}
return ret;
}
@@
-417,7
+418,7
@@
mlx5_flow_meter_profile_delete(struct rte_eth_dev *dev,
NULL, "Meter profile is in use.");
/* Remove from list. */
TAILQ_REMOVE(&priv->flow_meter_profiles, fmp, next);
NULL, "Meter profile is in use.");
/* Remove from list. */
TAILQ_REMOVE(&priv->flow_meter_profiles, fmp, next);
-
rte
_free(fmp);
+
mlx5
_free(fmp);
return 0;
}
return 0;
}
@@
-1286,7
+1287,7
@@
mlx5_flow_meter_flush(struct rte_eth_dev *dev, struct rte_mtr_error *error)
MLX5_ASSERT(!fmp->ref_cnt);
/* Remove from list. */
TAILQ_REMOVE(&priv->flow_meter_profiles, fmp, next);
MLX5_ASSERT(!fmp->ref_cnt);
/* Remove from list. */
TAILQ_REMOVE(&priv->flow_meter_profiles, fmp, next);
-
rte
_free(fmp);
+
mlx5
_free(fmp);
}
return 0;
}
}
return 0;
}