Deleted Added
full compact
mad_priv.h (219820) mad_priv.h (278886)
1/*
2 * Copyright (c) 2004, 2005, Voltaire, Inc. All rights reserved.
3 * Copyright (c) 2005 Intel Corporation. All rights reserved.
4 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
5 * Copyright (c) 2009 HNR Consulting. All rights reserved.
6 *
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU

--- 88 unchanged lines hidden (view full) ---

97 struct ib_mad_agent agent;
98 struct ib_mad_reg_req *reg_req;
99 struct ib_mad_qp_info *qp_info;
100
101 spinlock_t lock;
102 struct list_head send_list;
103 struct list_head wait_list;
104 struct list_head done_list;
1/*
2 * Copyright (c) 2004, 2005, Voltaire, Inc. All rights reserved.
3 * Copyright (c) 2005 Intel Corporation. All rights reserved.
4 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
5 * Copyright (c) 2009 HNR Consulting. All rights reserved.
6 *
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU

--- 88 unchanged lines hidden (view full) ---

97 struct ib_mad_agent agent;
98 struct ib_mad_reg_req *reg_req;
99 struct ib_mad_qp_info *qp_info;
100
101 spinlock_t lock;
102 struct list_head send_list;
103 struct list_head wait_list;
104 struct list_head done_list;
105 struct work_struct timeout_work;
106 struct timer_list timeout_timer;
105 struct delayed_work timed_work;
107 unsigned long timeout;
108 struct list_head local_list;
109 struct work_struct local_work;
110 struct list_head rmpp_list;
111
112 atomic_t refcount;
113 struct completion comp;
114};
115
116struct ib_mad_snoop_private {
117 struct ib_mad_agent agent;
118 struct ib_mad_qp_info *qp_info;
119 int snoop_index;
120 int mad_snoop_flags;
121 atomic_t refcount;
122 struct completion comp;
123};
124
106 unsigned long timeout;
107 struct list_head local_list;
108 struct work_struct local_work;
109 struct list_head rmpp_list;
110
111 atomic_t refcount;
112 struct completion comp;
113};
114
115struct ib_mad_snoop_private {
116 struct ib_mad_agent agent;
117 struct ib_mad_qp_info *qp_info;
118 int snoop_index;
119 int mad_snoop_flags;
120 atomic_t refcount;
121 struct completion comp;
122};
123
124/* Structure for timeout-fifo entry */
125struct tf_entry {
126 unsigned long exp_time; /* entry expiration time */
127 struct list_head fifo_list; /* to keep entries in fifo order */
128 struct list_head to_list; /* to keep entries in timeout order */
129 int canceled; /* indicates whether entry is canceled */
130};
131
125struct ib_mad_send_wr_private {
126 struct ib_mad_list_head mad_list;
127 struct list_head agent_list;
128 struct ib_mad_agent_private *mad_agent_priv;
129 struct ib_mad_send_buf send_buf;
130 u64 header_mapping;
131 u64 payload_mapping;
132 struct ib_send_wr send_wr;

--- 9 unchanged lines hidden (view full) ---

142 /* RMPP control */
143 struct list_head rmpp_list;
144 struct ib_rmpp_segment *last_ack_seg;
145 struct ib_rmpp_segment *cur_seg;
146 int last_ack;
147 int seg_num;
148 int newwin;
149 int pad;
132struct ib_mad_send_wr_private {
133 struct ib_mad_list_head mad_list;
134 struct list_head agent_list;
135 struct ib_mad_agent_private *mad_agent_priv;
136 struct ib_mad_send_buf send_buf;
137 u64 header_mapping;
138 u64 payload_mapping;
139 struct ib_send_wr send_wr;

--- 9 unchanged lines hidden (view full) ---

149 /* RMPP control */
150 struct list_head rmpp_list;
151 struct ib_rmpp_segment *last_ack_seg;
152 struct ib_rmpp_segment *cur_seg;
153 int last_ack;
154 int seg_num;
155 int newwin;
156 int pad;
157
158 /* SA congestion controlled MAD */
159 int is_sa_cc_mad;
160 struct tf_entry tf_list;
150};
151
152struct ib_mad_local_private {
153 struct list_head completion_list;
154 struct ib_mad_private *mad_priv;
155 struct ib_mad_agent_private *recv_mad_agent;
156 struct ib_mad_send_wr_private *mad_send_wr;
157};

--- 35 unchanged lines hidden (view full) ---

193 struct ib_mad_queue recv_queue;
194 struct list_head overflow_list;
195 spinlock_t snoop_lock;
196 struct ib_mad_snoop_private **snoop_table;
197 int snoop_table_size;
198 atomic_t snoop_count;
199};
200
161};
162
163struct ib_mad_local_private {
164 struct list_head completion_list;
165 struct ib_mad_private *mad_priv;
166 struct ib_mad_agent_private *recv_mad_agent;
167 struct ib_mad_send_wr_private *mad_send_wr;
168};

--- 35 unchanged lines hidden (view full) ---

204 struct ib_mad_queue recv_queue;
205 struct list_head overflow_list;
206 spinlock_t snoop_lock;
207 struct ib_mad_snoop_private **snoop_table;
208 int snoop_table_size;
209 atomic_t snoop_count;
210};
211
212struct to_fifo {
213 struct list_head to_head;
214 struct list_head fifo_head;
215 spinlock_t lists_lock;
216 struct timer_list timer;
217 struct work_struct work;
218 u32 fifo_size;
219 u32 num_items;
220 int stop_enqueue;
221 struct workqueue_struct *workq;
222};
223
224/* SA congestion control data */
225struct sa_cc_data {
226 spinlock_t lock;
227 unsigned long outstanding;
228 struct to_fifo *tf;
229};
230
201struct ib_mad_port_private {
202 struct list_head port_list;
203 struct ib_device *device;
204 int port_num;
205 struct ib_cq *cq;
206 struct ib_pd *pd;
207 struct ib_mr *mr;
208
209 spinlock_t reg_lock;
210 struct ib_mad_mgmt_version_table version[MAX_MGMT_VERSION];
211 struct list_head agent_list;
212 struct workqueue_struct *wq;
213 struct work_struct work;
214 struct ib_mad_qp_info qp_info[IB_MAD_QPS_CORE];
231struct ib_mad_port_private {
232 struct list_head port_list;
233 struct ib_device *device;
234 int port_num;
235 struct ib_cq *cq;
236 struct ib_pd *pd;
237 struct ib_mr *mr;
238
239 spinlock_t reg_lock;
240 struct ib_mad_mgmt_version_table version[MAX_MGMT_VERSION];
241 struct list_head agent_list;
242 struct workqueue_struct *wq;
243 struct work_struct work;
244 struct ib_mad_qp_info qp_info[IB_MAD_QPS_CORE];
245 struct sa_cc_data sa_cc;
215};
216
217int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr);
218
219struct ib_mad_send_wr_private *
220ib_find_send_mad(struct ib_mad_agent_private *mad_agent_priv,
221 struct ib_mad_recv_wc *mad_recv_wc);
222
223void ib_mad_complete_send_wr(struct ib_mad_send_wr_private *mad_send_wr,
224 struct ib_mad_send_wc *mad_send_wc);
225
226void ib_mark_mad_done(struct ib_mad_send_wr_private *mad_send_wr);
227
228void ib_reset_mad_timeout(struct ib_mad_send_wr_private *mad_send_wr,
229 int timeout_ms);
230
231#endif /* __IB_MAD_PRIV_H__ */
246};
247
248int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr);
249
250struct ib_mad_send_wr_private *
251ib_find_send_mad(struct ib_mad_agent_private *mad_agent_priv,
252 struct ib_mad_recv_wc *mad_recv_wc);
253
254void ib_mad_complete_send_wr(struct ib_mad_send_wr_private *mad_send_wr,
255 struct ib_mad_send_wc *mad_send_wc);
256
257void ib_mark_mad_done(struct ib_mad_send_wr_private *mad_send_wr);
258
259void ib_reset_mad_timeout(struct ib_mad_send_wr_private *mad_send_wr,
260 int timeout_ms);
261
262#endif /* __IB_MAD_PRIV_H__ */