diff options
author | Eli Cohen <eli@dev.mellanox.co.il> | 2008-04-29 16:46:53 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-29 16:46:53 -0400 |
commit | f56bcd8013566d4ad4759ae5fc85a6660e4655c7 (patch) | |
tree | 58b7e23f81caf5e6d8ada5819170f0bfb783d7e3 /drivers/infiniband/ulp/ipoib/ipoib.h | |
parent | 87528227dfa8776d12779d073c217f0835fd6d20 (diff) |
IPoIB: Use separate CQ for UD send completions
Use a dedicated CQ for UD send completions. Also, do not arm the UD
send CQ, which reduces the number of interrupts generated. This patch
farther reduces overhead by not calling poll CQ for every posted send
WR -- it does polls only when there 16 or more outstanding work requests.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
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.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index f1f142dc64b1..9044f8803532 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h | |||
@@ -95,6 +95,8 @@ enum { | |||
95 | IPOIB_MCAST_FLAG_SENDONLY = 1, | 95 | IPOIB_MCAST_FLAG_SENDONLY = 1, |
96 | IPOIB_MCAST_FLAG_BUSY = 2, /* joining or already joined */ | 96 | IPOIB_MCAST_FLAG_BUSY = 2, /* joining or already joined */ |
97 | IPOIB_MCAST_FLAG_ATTACHED = 3, | 97 | IPOIB_MCAST_FLAG_ATTACHED = 3, |
98 | |||
99 | MAX_SEND_CQE = 16, | ||
98 | }; | 100 | }; |
99 | 101 | ||
100 | #define IPOIB_OP_RECV (1ul << 31) | 102 | #define IPOIB_OP_RECV (1ul << 31) |
@@ -285,7 +287,8 @@ struct ipoib_dev_priv { | |||
285 | u16 pkey_index; | 287 | u16 pkey_index; |
286 | struct ib_pd *pd; | 288 | struct ib_pd *pd; |
287 | struct ib_mr *mr; | 289 | struct ib_mr *mr; |
288 | struct ib_cq *cq; | 290 | struct ib_cq *recv_cq; |
291 | struct ib_cq *send_cq; | ||
289 | struct ib_qp *qp; | 292 | struct ib_qp *qp; |
290 | u32 qkey; | 293 | u32 qkey; |
291 | 294 | ||
@@ -305,6 +308,7 @@ struct ipoib_dev_priv { | |||
305 | struct ib_sge tx_sge[MAX_SKB_FRAGS + 1]; | 308 | struct ib_sge tx_sge[MAX_SKB_FRAGS + 1]; |
306 | struct ib_send_wr tx_wr; | 309 | struct ib_send_wr tx_wr; |
307 | unsigned tx_outstanding; | 310 | unsigned tx_outstanding; |
311 | struct ib_wc send_wc[MAX_SEND_CQE]; | ||
308 | 312 | ||
309 | struct ib_recv_wr rx_wr; | 313 | struct ib_recv_wr rx_wr; |
310 | struct ib_sge rx_sge[IPOIB_UD_RX_SG]; | 314 | struct ib_sge rx_sge[IPOIB_UD_RX_SG]; |
@@ -662,7 +666,6 @@ static inline int ipoib_register_debugfs(void) { return 0; } | |||
662 | static inline void ipoib_unregister_debugfs(void) { } | 666 | static inline void ipoib_unregister_debugfs(void) { } |
663 | #endif | 667 | #endif |
664 | 668 | ||
665 | |||
666 | #define ipoib_printk(level, priv, format, arg...) \ | 669 | #define ipoib_printk(level, priv, format, arg...) \ |
667 | printk(level "%s: " format, ((struct ipoib_dev_priv *) priv)->dev->name , ## arg) | 670 | printk(level "%s: " format, ((struct ipoib_dev_priv *) priv)->dev->name , ## arg) |
668 | #define ipoib_warn(priv, format, arg...) \ | 671 | #define ipoib_warn(priv, format, arg...) \ |