#include "mlx5_regex.h"
#include "mlx5_regex_utils.h"
-#include "mlx5_rxp_csrs.h"
#include "mlx5_rxp.h"
#define MLX5_REGEX_MAX_MATCHES MLX5_RXP_MAX_MATCHES
dev->data->dev_conf.nb_queue_pairs = priv->nb_queues;
priv->qps = rte_zmalloc(NULL, sizeof(struct mlx5_regex_qp) *
priv->nb_queues, 0);
- if (!priv->nb_queues) {
+ if (!priv->qps) {
DRV_LOG(ERR, "can't allocate qps memory");
rte_errno = ENOMEM;
return -rte_errno;
DRV_LOG(DEBUG, "Regex config without rules programming!");
return 0;
configure_error:
- if (priv->qps)
- rte_free(priv->qps);
+ rte_free(priv->qps);
return -rte_errno;
}