aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib.h
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2007-10-23 22:57:54 -0400
committerRoland Dreier <rolandd@cisco.com>2008-01-25 17:15:23 -0500
commit2337f80941ac22f747ce6fd2c7a79e91d911a3ce (patch)
treee813aa78a5ec8fc07bad4826ac083ac83ae35f5c /drivers/infiniband/ulp/ipoib/ipoib.h
parent657c2f2cbccbac88689ac5174fc13dd3f9aece34 (diff)
IPoIB: Trivial formatting cleanups
Fix whitespace blunders, convert "foo* bar" to "foo *bar", etc. 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.h152
1 files changed, 76 insertions, 76 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index eb7edab0e836..a376fb6ffa0e 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -56,42 +56,42 @@
56/* constants */ 56/* constants */
57 57
58enum { 58enum {
59 IPOIB_PACKET_SIZE = 2048, 59 IPOIB_PACKET_SIZE = 2048,
60 IPOIB_BUF_SIZE = IPOIB_PACKET_SIZE + IB_GRH_BYTES, 60 IPOIB_BUF_SIZE = IPOIB_PACKET_SIZE + IB_GRH_BYTES,
61 61
62 IPOIB_ENCAP_LEN = 4, 62 IPOIB_ENCAP_LEN = 4,
63 63
64 IPOIB_CM_MTU = 0x10000 - 0x10, /* padding to align header to 16 */ 64 IPOIB_CM_MTU = 0x10000 - 0x10, /* padding to align header to 16 */
65 IPOIB_CM_BUF_SIZE = IPOIB_CM_MTU + IPOIB_ENCAP_LEN, 65 IPOIB_CM_BUF_SIZE = IPOIB_CM_MTU + IPOIB_ENCAP_LEN,
66 IPOIB_CM_HEAD_SIZE = IPOIB_CM_BUF_SIZE % PAGE_SIZE, 66 IPOIB_CM_HEAD_SIZE = IPOIB_CM_BUF_SIZE % PAGE_SIZE,
67 IPOIB_CM_RX_SG = ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE) / PAGE_SIZE, 67 IPOIB_CM_RX_SG = ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE) / PAGE_SIZE,
68 IPOIB_RX_RING_SIZE = 128, 68 IPOIB_RX_RING_SIZE = 128,
69 IPOIB_TX_RING_SIZE = 64, 69 IPOIB_TX_RING_SIZE = 64,
70 IPOIB_MAX_QUEUE_SIZE = 8192, 70 IPOIB_MAX_QUEUE_SIZE = 8192,
71 IPOIB_MIN_QUEUE_SIZE = 2, 71 IPOIB_MIN_QUEUE_SIZE = 2,
72 72
73 IPOIB_NUM_WC = 4, 73 IPOIB_NUM_WC = 4,
74 74
75 IPOIB_MAX_PATH_REC_QUEUE = 3, 75 IPOIB_MAX_PATH_REC_QUEUE = 3,
76 IPOIB_MAX_MCAST_QUEUE = 3, 76 IPOIB_MAX_MCAST_QUEUE = 3,
77 77
78 IPOIB_FLAG_OPER_UP = 0, 78 IPOIB_FLAG_OPER_UP = 0,
79 IPOIB_FLAG_INITIALIZED = 1, 79 IPOIB_FLAG_INITIALIZED = 1,
80 IPOIB_FLAG_ADMIN_UP = 2, 80 IPOIB_FLAG_ADMIN_UP = 2,
81 IPOIB_PKEY_ASSIGNED = 3, 81 IPOIB_PKEY_ASSIGNED = 3,
82 IPOIB_PKEY_STOP = 4, 82 IPOIB_PKEY_STOP = 4,
83 IPOIB_FLAG_SUBINTERFACE = 5, 83 IPOIB_FLAG_SUBINTERFACE = 5,
84 IPOIB_MCAST_RUN = 6, 84 IPOIB_MCAST_RUN = 6,
85 IPOIB_STOP_REAPER = 7, 85 IPOIB_STOP_REAPER = 7,
86 IPOIB_MCAST_STARTED = 8, 86 IPOIB_MCAST_STARTED = 8,
87 IPOIB_FLAG_ADMIN_CM = 9, 87 IPOIB_FLAG_ADMIN_CM = 9,
88 IPOIB_FLAG_UMCAST = 10, 88 IPOIB_FLAG_UMCAST = 10,
89 89
90 IPOIB_MAX_BACKOFF_SECONDS = 16, 90 IPOIB_MAX_BACKOFF_SECONDS = 16,
91 91
92 IPOIB_MCAST_FLAG_FOUND = 0, /* used in set_multicast_list */ 92 IPOIB_MCAST_FLAG_FOUND = 0, /* used in set_multicast_list */
93 IPOIB_MCAST_FLAG_SENDONLY = 1, 93 IPOIB_MCAST_FLAG_SENDONLY = 1,
94 IPOIB_MCAST_FLAG_BUSY = 2, /* joining or already joined */ 94 IPOIB_MCAST_FLAG_BUSY = 2, /* joining or already joined */
95 IPOIB_MCAST_FLAG_ATTACHED = 3, 95 IPOIB_MCAST_FLAG_ATTACHED = 3,
96}; 96};
97 97
@@ -117,7 +117,7 @@ struct ipoib_pseudoheader {
117struct ipoib_mcast { 117struct ipoib_mcast {
118 struct ib_sa_mcmember_rec mcmember; 118 struct ib_sa_mcmember_rec mcmember;
119 struct ib_sa_multicast *mc; 119 struct ib_sa_multicast *mc;
120 struct ipoib_ah *ah; 120 struct ipoib_ah *ah;
121 121
122 struct rb_node rb_node; 122 struct rb_node rb_node;
123 struct list_head list; 123 struct list_head list;
@@ -186,27 +186,27 @@ enum ipoib_cm_state {
186}; 186};
187 187
188struct ipoib_cm_rx { 188struct ipoib_cm_rx {
189 struct ib_cm_id *id; 189 struct ib_cm_id *id;
190 struct ib_qp *qp; 190 struct ib_qp *qp;
191 struct list_head list; 191 struct list_head list;
192 struct net_device *dev; 192 struct net_device *dev;
193 unsigned long jiffies; 193 unsigned long jiffies;
194 enum ipoib_cm_state state; 194 enum ipoib_cm_state state;
195}; 195};
196 196
197struct ipoib_cm_tx { 197struct ipoib_cm_tx {
198 struct ib_cm_id *id; 198 struct ib_cm_id *id;
199 struct ib_qp *qp; 199 struct ib_qp *qp;
200 struct list_head list; 200 struct list_head list;
201 struct net_device *dev; 201 struct net_device *dev;
202 struct ipoib_neigh *neigh; 202 struct ipoib_neigh *neigh;
203 struct ipoib_path *path; 203 struct ipoib_path *path;
204 struct ipoib_tx_buf *tx_ring; 204 struct ipoib_tx_buf *tx_ring;
205 unsigned tx_head; 205 unsigned tx_head;
206 unsigned tx_tail; 206 unsigned tx_tail;
207 unsigned long flags; 207 unsigned long flags;
208 u32 mtu; 208 u32 mtu;
209 struct ib_wc ibwc[IPOIB_NUM_WC]; 209 struct ib_wc ibwc[IPOIB_NUM_WC];
210}; 210};
211 211
212struct ipoib_cm_rx_buf { 212struct ipoib_cm_rx_buf {
@@ -215,24 +215,24 @@ struct ipoib_cm_rx_buf {
215}; 215};
216 216
217struct ipoib_cm_dev_priv { 217struct ipoib_cm_dev_priv {
218 struct ib_srq *srq; 218 struct ib_srq *srq;
219 struct ipoib_cm_rx_buf *srq_ring; 219 struct ipoib_cm_rx_buf *srq_ring;
220 struct ib_cm_id *id; 220 struct ib_cm_id *id;
221 struct list_head passive_ids; /* state: LIVE */ 221 struct list_head passive_ids; /* state: LIVE */
222 struct list_head rx_error_list; /* state: ERROR */ 222 struct list_head rx_error_list; /* state: ERROR */
223 struct list_head rx_flush_list; /* state: FLUSH, drain not started */ 223 struct list_head rx_flush_list; /* state: FLUSH, drain not started */
224 struct list_head rx_drain_list; /* state: FLUSH, drain started */ 224 struct list_head rx_drain_list; /* state: FLUSH, drain started */
225 struct list_head rx_reap_list; /* state: FLUSH, drain done */ 225 struct list_head rx_reap_list; /* state: FLUSH, drain done */
226 struct work_struct start_task; 226 struct work_struct start_task;
227 struct work_struct reap_task; 227 struct work_struct reap_task;
228 struct work_struct skb_task; 228 struct work_struct skb_task;
229 struct work_struct rx_reap_task; 229 struct work_struct rx_reap_task;
230 struct delayed_work stale_task; 230 struct delayed_work stale_task;
231 struct sk_buff_head skb_queue; 231 struct sk_buff_head skb_queue;
232 struct list_head start_list; 232 struct list_head start_list;
233 struct list_head reap_list; 233 struct list_head reap_list;
234 struct ib_wc ibwc[IPOIB_NUM_WC]; 234 struct ib_wc ibwc[IPOIB_NUM_WC];
235 struct ib_sge rx_sge[IPOIB_CM_RX_SG]; 235 struct ib_sge rx_sge[IPOIB_CM_RX_SG];
236 struct ib_recv_wr rx_wr; 236 struct ib_recv_wr rx_wr;
237}; 237};
238 238
@@ -269,30 +269,30 @@ struct ipoib_dev_priv {
269 struct work_struct pkey_event_task; 269 struct work_struct pkey_event_task;
270 270
271 struct ib_device *ca; 271 struct ib_device *ca;
272 u8 port; 272 u8 port;
273 u16 pkey; 273 u16 pkey;
274 u16 pkey_index; 274 u16 pkey_index;
275 struct ib_pd *pd; 275 struct ib_pd *pd;
276 struct ib_mr *mr; 276 struct ib_mr *mr;
277 struct ib_cq *cq; 277 struct ib_cq *cq;
278 struct ib_qp *qp; 278 struct ib_qp *qp;
279 u32 qkey; 279 u32 qkey;
280 280
281 union ib_gid local_gid; 281 union ib_gid local_gid;
282 u16 local_lid; 282 u16 local_lid;
283 283
284 unsigned int admin_mtu; 284 unsigned int admin_mtu;
285 unsigned int mcast_mtu; 285 unsigned int mcast_mtu;
286 286
287 struct ipoib_rx_buf *rx_ring; 287 struct ipoib_rx_buf *rx_ring;
288 288
289 spinlock_t tx_lock; 289 spinlock_t tx_lock;
290 struct ipoib_tx_buf *tx_ring; 290 struct ipoib_tx_buf *tx_ring;
291 unsigned tx_head; 291 unsigned tx_head;
292 unsigned tx_tail; 292 unsigned tx_tail;
293 struct ib_sge tx_sge; 293 struct ib_sge tx_sge;
294 struct ib_send_wr tx_wr; 294 struct ib_send_wr tx_wr;
295 unsigned tx_outstanding; 295 unsigned tx_outstanding;
296 296
297 struct ib_wc ibwc[IPOIB_NUM_WC]; 297 struct ib_wc ibwc[IPOIB_NUM_WC];
298 298
@@ -317,10 +317,10 @@ struct ipoib_dev_priv {
317 317
318struct ipoib_ah { 318struct ipoib_ah {
319 struct net_device *dev; 319 struct net_device *dev;
320 struct ib_ah *ah; 320 struct ib_ah *ah;
321 struct list_head list; 321 struct list_head list;
322 struct kref ref; 322 struct kref ref;
323 unsigned last_send; 323 unsigned last_send;
324}; 324};
325 325
326struct ipoib_path { 326struct ipoib_path {
@@ -331,11 +331,11 @@ struct ipoib_path {
331 331
332 struct list_head neigh_list; 332 struct list_head neigh_list;
333 333
334 int query_id; 334 int query_id;
335 struct ib_sa_query *query; 335 struct ib_sa_query *query;
336 struct completion done; 336 struct completion done;
337 337
338 struct rb_node rb_node; 338 struct rb_node rb_node;
339 struct list_head list; 339 struct list_head list;
340}; 340};
341 341
@@ -344,7 +344,7 @@ struct ipoib_neigh {
344#ifdef CONFIG_INFINIBAND_IPOIB_CM 344#ifdef CONFIG_INFINIBAND_IPOIB_CM
345 struct ipoib_cm_tx *cm; 345 struct ipoib_cm_tx *cm;
346#endif 346#endif
347 union ib_gid dgid; 347 union ib_gid dgid;
348 struct sk_buff_head queue; 348 struct sk_buff_head queue;
349 349
350 struct neighbour *neighbour; 350 struct neighbour *neighbour;
@@ -455,8 +455,8 @@ void ipoib_drain_cq(struct net_device *dev);
455 455
456#ifdef CONFIG_INFINIBAND_IPOIB_CM 456#ifdef CONFIG_INFINIBAND_IPOIB_CM
457 457
458#define IPOIB_FLAGS_RC 0x80 458#define IPOIB_FLAGS_RC 0x80
459#define IPOIB_FLAGS_UC 0x40 459#define IPOIB_FLAGS_UC 0x40
460 460
461/* We don't support UC connections at the moment */ 461/* We don't support UC connections at the moment */
462#define IPOIB_CM_SUPPORTED(ha) (ha[0] & (IPOIB_FLAGS_RC)) 462#define IPOIB_CM_SUPPORTED(ha) (ha[0] & (IPOIB_FLAGS_RC))
@@ -500,7 +500,7 @@ void ipoib_cm_dev_cleanup(struct net_device *dev);
500struct ipoib_cm_tx *ipoib_cm_create_tx(struct net_device *dev, struct ipoib_path *path, 500struct ipoib_cm_tx *ipoib_cm_create_tx(struct net_device *dev, struct ipoib_path *path,
501 struct ipoib_neigh *neigh); 501 struct ipoib_neigh *neigh);
502void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx); 502void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx);
503void ipoib_cm_skb_too_long(struct net_device* dev, struct sk_buff *skb, 503void ipoib_cm_skb_too_long(struct net_device *dev, struct sk_buff *skb,
504 unsigned int mtu); 504 unsigned int mtu);
505void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc); 505void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc);
506void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc); 506void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc);
@@ -582,7 +582,7 @@ int ipoib_cm_add_mode_attr(struct net_device *dev)
582 return 0; 582 return 0;
583} 583}
584 584
585static inline void ipoib_cm_skb_too_long(struct net_device* dev, struct sk_buff *skb, 585static inline void ipoib_cm_skb_too_long(struct net_device *dev, struct sk_buff *skb,
586 unsigned int mtu) 586 unsigned int mtu)
587{ 587{
588 dev_kfree_skb_any(skb); 588 dev_kfree_skb_any(skb);
@@ -624,12 +624,12 @@ extern struct ib_sa_client ipoib_sa_client;
624extern int ipoib_debug_level; 624extern int ipoib_debug_level;
625 625
626#define ipoib_dbg(priv, format, arg...) \ 626#define ipoib_dbg(priv, format, arg...) \
627 do { \ 627 do { \
628 if (ipoib_debug_level > 0) \ 628 if (ipoib_debug_level > 0) \
629 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \ 629 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
630 } while (0) 630 } while (0)
631#define ipoib_dbg_mcast(priv, format, arg...) \ 631#define ipoib_dbg_mcast(priv, format, arg...) \
632 do { \ 632 do { \
633 if (mcast_debug_level > 0) \ 633 if (mcast_debug_level > 0) \
634 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \ 634 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
635 } while (0) 635 } while (0)
@@ -642,7 +642,7 @@ extern int ipoib_debug_level;
642 642
643#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA 643#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA
644#define ipoib_dbg_data(priv, format, arg...) \ 644#define ipoib_dbg_data(priv, format, arg...) \
645 do { \ 645 do { \
646 if (data_debug_level > 0) \ 646 if (data_debug_level > 0) \
647 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \ 647 ipoib_printk(KERN_DEBUG, priv, format , ## arg); \
648 } while (0) 648 } while (0)