[ofa-general] Re: [RFC][PATCH] last wqe event handler patch

Roland Dreier rdreier at cisco.com
Wed Jun 25 11:18:38 PDT 2008


 > What you describe makes sense to me but it looks like your fix opens
 > another hole. Now you removed the limit on the number of drain WRs that
 > may be posted and you risk a CQ overflow. Wouldn't it be simpler to just
 > move one entry from the flush list to the drain list instead of moving
 > appending the whole flush list to the drain list?
 > 
 > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
 > index 6223fc3..1fcbf7b 100644
 > --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
 > +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
 > @@ -222,7 +222,7 @@ static void ipoib_cm_start_rx_drain(struct ipoib_dev_priv *priv)
 >  	if (ib_post_send(p->qp, &ipoib_cm_rx_drain_wr, &bad_wr))
 >  		ipoib_warn(priv, "failed to post drain wr\n");
 >  
 > -	list_splice_init(&priv->cm.rx_flush_list, &priv->cm.rx_drain_list);
 > +	list_move(priv->cm.rx_flush_list.next, &priv->cm.rx_drain_list);
 >  }
 >  
 >  static void ipoib_cm_rx_event_handler(struct ib_event *event, void *ctx)

Yes, this makes a lot of sense to me.  The issue with the current code
is that getting a last WQE reached event doesn't imply that all CQEs
have been processed yet ... so we can't free a whole list of QPs at once
as the current code does.

 - R.



More information about the general mailing list