Commit f535b56c authored by Ivan Barrera's avatar Ivan Barrera Committed by Doug Ledford

i40iw: Remove UDA QP from QoS list if creation fails

If User-space Direct Access (UDA) QP creation fails,
the QP entry is not removed from QoS list. Fix this
by removing QP from QoS list if create QP fails.

Fixes: 0fc2dc58 ("i40iw: Add Quality of Service support")
Signed-off-by: default avatarIvan Barrera <ivan.d.barrera@intel.com>
Signed-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 56b2f523
...@@ -377,7 +377,7 @@ void i40iw_change_l2params(struct i40iw_sc_vsi *vsi, struct i40iw_l2params *l2pa ...@@ -377,7 +377,7 @@ void i40iw_change_l2params(struct i40iw_sc_vsi *vsi, struct i40iw_l2params *l2pa
* i40iw_qp_rem_qos - remove qp from qos lists during destroy qp * i40iw_qp_rem_qos - remove qp from qos lists during destroy qp
* @qp: qp to be removed from qos * @qp: qp to be removed from qos
*/ */
static void i40iw_qp_rem_qos(struct i40iw_sc_qp *qp) void i40iw_qp_rem_qos(struct i40iw_sc_qp *qp)
{ {
struct i40iw_sc_vsi *vsi = qp->vsi; struct i40iw_sc_vsi *vsi = qp->vsi;
unsigned long flags; unsigned long flags;
......
...@@ -86,7 +86,7 @@ void i40iw_sc_vsi_init(struct i40iw_sc_vsi *vsi, struct i40iw_vsi_init_info *inf ...@@ -86,7 +86,7 @@ void i40iw_sc_vsi_init(struct i40iw_sc_vsi *vsi, struct i40iw_vsi_init_info *inf
void i40iw_change_l2params(struct i40iw_sc_vsi *vsi, struct i40iw_l2params *l2params); void i40iw_change_l2params(struct i40iw_sc_vsi *vsi, struct i40iw_l2params *l2params);
void i40iw_qp_add_qos(struct i40iw_sc_qp *qp); void i40iw_qp_add_qos(struct i40iw_sc_qp *qp);
void i40iw_qp_rem_qos(struct i40iw_sc_qp *qp);
void i40iw_terminate_send_fin(struct i40iw_sc_qp *qp); void i40iw_terminate_send_fin(struct i40iw_sc_qp *qp);
void i40iw_terminate_connection(struct i40iw_sc_qp *qp, struct i40iw_aeqe_info *info); void i40iw_terminate_connection(struct i40iw_sc_qp *qp, struct i40iw_aeqe_info *info);
......
...@@ -615,8 +615,10 @@ static enum i40iw_status_code i40iw_puda_qp_create(struct i40iw_puda_rsrc *rsrc) ...@@ -615,8 +615,10 @@ static enum i40iw_status_code i40iw_puda_qp_create(struct i40iw_puda_rsrc *rsrc)
ret = i40iw_cqp_qp_create_cmd(rsrc->dev, qp); ret = i40iw_cqp_qp_create_cmd(rsrc->dev, qp);
else else
ret = i40iw_puda_qp_wqe(rsrc->dev, qp); ret = i40iw_puda_qp_wqe(rsrc->dev, qp);
if (ret) if (ret) {
i40iw_qp_rem_qos(qp);
i40iw_free_dma_mem(rsrc->dev->hw, &rsrc->qpmem); i40iw_free_dma_mem(rsrc->dev->hw, &rsrc->qpmem);
}
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment