aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChien Tung <chien.tin.tung@intel.com>2009-12-09 18:21:56 -0500
committerRoland Dreier <rolandd@cisco.com>2009-12-09 18:21:56 -0500
commitd14152da13dc29aa70cddd8ca214a13e3597eb7f (patch)
tree6076ebd7ca30f97f53651b00859a28a9d096d0ff
parenta276510328d0721c252b37044c51e2fb4efe0364 (diff)
RDMA/nes: Implement IB_SIGNAL_ALL_WR as an iWARP extension
Add IB_SINGAL_ALL_WR support as an iWARP extension. If set, make sure all WR for the QP are signalled. Consolidate flags used in nesqp structure. Signed-off-by: Chien Tung <chien.tin.tung@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c6
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.h15
2 files changed, 13 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 0a2b18bad6ee..8ea75614b87c 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -1407,6 +1407,8 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
1407 return ERR_PTR(-EINVAL); 1407 return ERR_PTR(-EINVAL);
1408 } 1408 }
1409 1409
1410 nesqp->sig_all = (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR);
1411
1410 /* update the QP table */ 1412 /* update the QP table */
1411 nesdev->nesadapter->qp_table[nesqp->hwqp.qp_id-NES_FIRST_QPN] = nesqp; 1413 nesdev->nesadapter->qp_table[nesqp->hwqp.qp_id-NES_FIRST_QPN] = nesqp;
1412 nes_debug(NES_DBG_QP, "netdev refcnt=%u\n", 1414 nes_debug(NES_DBG_QP, "netdev refcnt=%u\n",
@@ -3502,9 +3504,9 @@ static int nes_post_send(struct ib_qp *ibqp, struct ib_send_wr *ib_wr,
3502 if (err) 3504 if (err)
3503 break; 3505 break;
3504 3506
3505 if (ib_wr->send_flags & IB_SEND_SIGNALED) { 3507 if ((ib_wr->send_flags & IB_SEND_SIGNALED) || nesqp->sig_all)
3506 wqe_misc |= NES_IWARP_SQ_WQE_SIGNALED_COMPL; 3508 wqe_misc |= NES_IWARP_SQ_WQE_SIGNALED_COMPL;
3507 } 3509
3508 wqe->wqe_words[NES_IWARP_SQ_WQE_MISC_IDX] = cpu_to_le32(wqe_misc); 3510 wqe->wqe_words[NES_IWARP_SQ_WQE_MISC_IDX] = cpu_to_le32(wqe_misc);
3509 3511
3510 ib_wr = ib_wr->next; 3512 ib_wr = ib_wr->next;
diff --git a/drivers/infiniband/hw/nes/nes_verbs.h b/drivers/infiniband/hw/nes/nes_verbs.h
index 89822d75f82e..ac8b86b8cc11 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.h
+++ b/drivers/infiniband/hw/nes/nes_verbs.h
@@ -167,17 +167,20 @@ struct nes_qp {
167 enum ib_event_type terminate_eventtype; 167 enum ib_event_type terminate_eventtype;
168 wait_queue_head_t kick_waitq; 168 wait_queue_head_t kick_waitq;
169 u16 in_disconnect; 169 u16 in_disconnect;
170 u16 active_conn:1;
171 u16 skip_lsmm:1;
172 u16 user_mode:1;
173 u16 hte_added:1;
174 u16 flush_issued:1;
175 u16 destroyed:1;
176 u16 sq_kmapped:1;
177 u16 sig_all:1;
178 u16 rsvd:8;
170 u16 private_data_len; 179 u16 private_data_len;
171 u16 term_sq_flush_code; 180 u16 term_sq_flush_code;
172 u16 term_rq_flush_code; 181 u16 term_rq_flush_code;
173 u8 active_conn;
174 u8 skip_lsmm;
175 u8 user_mode;
176 u8 hte_added;
177 u8 hw_iwarp_state; 182 u8 hw_iwarp_state;
178 u8 flush_issued;
179 u8 hw_tcp_state; 183 u8 hw_tcp_state;
180 u8 term_flags; 184 u8 term_flags;
181 u8 destroyed;
182}; 185};
183#endif /* NES_VERBS_H */ 186#endif /* NES_VERBS_H */