IB/qib: Reduce sdma_lock contention
[deliverable/linux.git] / drivers / infiniband / hw / qib / qib_verbs.h
index 1293133f28cb1a017a46db32ed41f4c5a9051f03..aff8b2c178869ce31503b7981ed5d7c8df456469 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2006, 2007, 2008, 2009, 2010 QLogic Corporation.
- * All rights reserved.
+ * Copyright (c) 2012 Intel Corporation.  All rights reserved.
+ * Copyright (c) 2006 - 2012 QLogic Corporation. All rights reserved.
  * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
  *
  * This software is available to you under a choice of one of two
@@ -420,7 +420,7 @@ struct qib_qp {
        /* read mostly fields above and below */
        struct ib_ah_attr remote_ah_attr;
        struct ib_ah_attr alt_ah_attr;
-       struct qib_qp *next;            /* link list for QPN hash table */
+       struct qib_qp __rcu *next;            /* link list for QPN hash table */
        struct qib_swqe *s_wq;  /* send work queue */
        struct qib_mmap_info *ip;
        struct qib_ib_header *s_hdr;     /* next packet header to send */
@@ -659,8 +659,8 @@ struct qib_opcode_stats {
 };
 
 struct qib_ibport {
-       struct qib_qp *qp0;
-       struct qib_qp *qp1;
+       struct qib_qp __rcu *qp0;
+       struct qib_qp __rcu *qp1;
        struct ib_mad_agent *send_agent;        /* agent for SMI (traps) */
        struct qib_ah *sm_ah;
        struct qib_ah *smi_ah;
@@ -727,6 +727,7 @@ struct qib_ibport {
        struct qib_opcode_stats opstats[128];
 };
 
+
 struct qib_ibdev {
        struct ib_device ibdev;
        struct list_head pending_mmaps;
@@ -743,7 +744,7 @@ struct qib_ibdev {
        struct list_head memwait;       /* list for wait kernel memory */
        struct list_head txreq_free;
        struct timer_list mem_timer;
-       struct qib_qp **qp_table;
+       struct qib_qp __rcu **qp_table;
        struct qib_pio_header *pio_hdrs;
        dma_addr_t pio_hdrs_phys;
        /* list of QPs waiting for RNR timer */
@@ -836,11 +837,7 @@ extern struct workqueue_struct *qib_cq_wq;
 /*
  * This must be called with s_lock held.
  */
-static inline void qib_schedule_send(struct qib_qp *qp)
-{
-       if (qib_send_ok(qp))
-               queue_work(ib_wq, &qp->s_work);
-}
+void qib_schedule_send(struct qib_qp *qp);
 
 static inline int qib_pkey_ok(u16 pkey1, u16 pkey2)
 {
@@ -937,6 +934,8 @@ void qib_rc_rcv(struct qib_ctxtdata *rcd, struct qib_ib_header *hdr,
 
 int qib_check_ah(struct ib_device *ibdev, struct ib_ah_attr *ah_attr);
 
+struct ib_ah *qib_create_qp0_ah(struct qib_ibport *ibp, u16 dlid);
+
 void qib_rc_rnr_retry(unsigned long arg);
 
 void qib_rc_send_complete(struct qib_qp *qp, struct qib_ib_header *hdr);
This page took 0.025969 seconds and 5 git commands to generate.