mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-09-04 20:19:47 +08:00 
			
		
		
		
	RDMA/cxgb4: Make sure flush CQ entries are collected on connection close
At the time when a peer closes the connection, iw_cxgb4 will not send a cq event if ibqp.uobject exists. In that case, its possible for a user application to get blocked in ibv_get_cq_event(). To resolve this, call the cq's comp_handler to unblock any read from ibv_get_cq_event(). This will trigger userspace to poll the cq and collect flush status completions for any pending work requests. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
		
							parent
							
								
									9efe10a1e1
								
							
						
					
					
						commit
						01e7da6ba5
					
				| @ -966,8 +966,12 @@ static void flush_qp(struct c4iw_qp *qhp) | |||||||
| 	if (qhp->ibqp.uobject) { | 	if (qhp->ibqp.uobject) { | ||||||
| 		t4_set_wq_in_error(&qhp->wq); | 		t4_set_wq_in_error(&qhp->wq); | ||||||
| 		t4_set_cq_in_error(&rchp->cq); | 		t4_set_cq_in_error(&rchp->cq); | ||||||
| 		if (schp != rchp) | 		(*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context); | ||||||
|  | 		if (schp != rchp) { | ||||||
| 			t4_set_cq_in_error(&schp->cq); | 			t4_set_cq_in_error(&schp->cq); | ||||||
|  | 			(*schp->ibcq.comp_handler)(&schp->ibcq, | ||||||
|  | 					schp->ibcq.cq_context); | ||||||
|  | 		} | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
| 	__flush_qp(qhp, rchp, schp); | 	__flush_qp(qhp, rchp, schp); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Kumar Sanghvi
						Kumar Sanghvi