aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib.h
diff options
context:
space:
mode:
authorEli Cohen <eli@dev.mellanox.co.il>2008-04-30 23:02:45 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-30 23:02:45 -0400
commit57ce41d1d18279cc90223f3deadca70c7de1cfca (patch)
tree39111403527e4744b4a6a15d5ffe3fd038751489 /drivers/infiniband/ulp/ipoib/ipoib.h
parent3ae15e1623b9d32eb410c2a23d90e47b16e6acd0 (diff)
IB/ipoib: Fix transmit queue stalling forever
Commit f56bcd80 ("IPoIB: Use separate CQ for UD send completions") introduced a bug where the transmit queue could get stopped and never woken up. The problem is that send completions are only polled at the end of the xmit function, so if the send queue fills up and the xmit path stops the queue, then there is no way for send completions to ever get polled, and so the transmit queue stays stopped forever. Fix this by arming the send CQ just before posting the last send request that fills the send queue. Then, when the completion event handler is called, drain the send CQ. Since it is possible that not enough send completions are in the CQ, verify that the the net queue has been woken up after draining the send CQ, and if not arm a timer and drain again at the timer function. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib.h')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index 9044f8803532..ca126fc2b853 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -334,6 +334,7 @@ struct ipoib_dev_priv {
334#endif 334#endif
335 int hca_caps; 335 int hca_caps;
336 struct ipoib_ethtool_st ethtool; 336 struct ipoib_ethtool_st ethtool;
337 struct timer_list poll_timer;
337}; 338};
338 339
339struct ipoib_ah { 340struct ipoib_ah {
@@ -404,6 +405,7 @@ extern struct workqueue_struct *ipoib_workqueue;
404 405
405int ipoib_poll(struct napi_struct *napi, int budget); 406int ipoib_poll(struct napi_struct *napi, int budget);
406void ipoib_ib_completion(struct ib_cq *cq, void *dev_ptr); 407void ipoib_ib_completion(struct ib_cq *cq, void *dev_ptr);
408void ipoib_send_comp_handler(struct ib_cq *cq, void *dev_ptr);
407 409
408struct ipoib_ah *ipoib_create_ah(struct net_device *dev, 410struct ipoib_ah *ipoib_create_ah(struct net_device *dev,
409 struct ib_pd *pd, struct ib_ah_attr *attr); 411 struct ib_pd *pd, struct ib_ah_attr *attr);