Skip to content

Commit f20d429

Browse files
mustafakismailjgunthorpe
authored andcommitted
i40iw: Free IEQ resources
The iWARP Exception Queue (IEQ) resources are not freed when a QP is destroyed. Fix this by freeing IEQ resources when freeing QP resources. Fixes: d374984 ("i40iw: add files for iwarp interface") Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent ebb6c0c commit f20d429

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

drivers/infiniband/hw/i40iw/i40iw_puda.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ static void i40iw_ieq_tx_compl(struct i40iw_sc_vsi *vsi, void *sqwrid);
4848
static void i40iw_ilq_putback_rcvbuf(struct i40iw_sc_qp *qp, u32 wqe_idx);
4949
static enum i40iw_status_code i40iw_puda_replenish_rq(struct i40iw_puda_rsrc
5050
*rsrc, bool initial);
51-
static void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp);
5251
/**
5352
* i40iw_puda_get_listbuf - get buffer from puda list
5453
* @list: list to use for buffers (ILQ or IEQ)
@@ -1483,7 +1482,7 @@ static void i40iw_ieq_tx_compl(struct i40iw_sc_vsi *vsi, void *sqwrid)
14831482
* @ieq: ieq resource
14841483
* @qp: all pending fpdu buffers
14851484
*/
1486-
static void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp)
1485+
void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp)
14871486
{
14881487
struct i40iw_puda_buf *buf;
14891488
struct i40iw_pfpdu *pfpdu = &qp->pfpdu;

drivers/infiniband/hw/i40iw/i40iw_puda.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,5 @@ enum i40iw_status_code i40iw_cqp_qp_create_cmd(struct i40iw_sc_dev *dev, struct
184184
enum i40iw_status_code i40iw_cqp_cq_create_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_cq *cq);
185185
void i40iw_cqp_qp_destroy_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_qp *qp);
186186
void i40iw_cqp_cq_destroy_cmd(struct i40iw_sc_dev *dev, struct i40iw_sc_cq *cq);
187+
void i40iw_ieq_cleanup_qp(struct i40iw_puda_rsrc *ieq, struct i40iw_sc_qp *qp);
187188
#endif

drivers/infiniband/hw/i40iw/i40iw_verbs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ void i40iw_free_qp_resources(struct i40iw_device *iwdev,
412412
{
413413
struct i40iw_pbl *iwpbl = &iwqp->iwpbl;
414414

415+
i40iw_ieq_cleanup_qp(iwdev->vsi.ieq, &iwqp->sc_qp);
415416
i40iw_dealloc_push_page(iwdev, &iwqp->sc_qp);
416417
if (qp_num)
417418
i40iw_free_resource(iwdev, iwdev->allocated_qps, qp_num);

0 commit comments

Comments
 (0)