regex/mlx5: prevent double setup of queue pair
When mlx5_regex_qp_setup() is called, make sure the provided QP is not already setup. Signed-off-by: Ady Agbarih <adypodoman@gmail.com> Acked-by: Ori Kam <orika@nvidia.com>
This commit is contained in:
parent
02179f82b9
commit
b5832a0d15
@ -204,6 +204,12 @@ mlx5_regex_qp_setup(struct rte_regexdev *dev, uint16_t qp_ind,
|
||||
uint16_t log_desc;
|
||||
|
||||
qp = &priv->qps[qp_ind];
|
||||
if (qp->jobs) {
|
||||
DRV_LOG(ERR, "Attempting to setup QP a second time.");
|
||||
rte_errno = EINVAL;
|
||||
return -rte_errno;
|
||||
}
|
||||
|
||||
qp->flags = cfg->qp_conf_flags;
|
||||
log_desc = rte_log2_u32(cfg->nb_desc);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user