aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib.h')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib.h48
1 files changed, 35 insertions, 13 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index ca126fc2b853..b0ffc9abe8c0 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -30,8 +30,6 @@
30 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 30 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32 * SOFTWARE. 32 * SOFTWARE.
33 *
34 * $Id: ipoib.h 1358 2004-12-17 22:00:11Z roland $
35 */ 33 */
36 34
37#ifndef _IPOIB_H 35#ifndef _IPOIB_H
@@ -52,9 +50,16 @@
52#include <rdma/ib_verbs.h> 50#include <rdma/ib_verbs.h>
53#include <rdma/ib_pack.h> 51#include <rdma/ib_pack.h>
54#include <rdma/ib_sa.h> 52#include <rdma/ib_sa.h>
53#include <linux/inet_lro.h>
55 54
56/* constants */ 55/* constants */
57 56
57enum ipoib_flush_level {
58 IPOIB_FLUSH_LIGHT,
59 IPOIB_FLUSH_NORMAL,
60 IPOIB_FLUSH_HEAVY
61};
62
58enum { 63enum {
59 IPOIB_ENCAP_LEN = 4, 64 IPOIB_ENCAP_LEN = 4,
60 65
@@ -65,8 +70,8 @@ enum {
65 IPOIB_CM_BUF_SIZE = IPOIB_CM_MTU + IPOIB_ENCAP_LEN, 70 IPOIB_CM_BUF_SIZE = IPOIB_CM_MTU + IPOIB_ENCAP_LEN,
66 IPOIB_CM_HEAD_SIZE = IPOIB_CM_BUF_SIZE % PAGE_SIZE, 71 IPOIB_CM_HEAD_SIZE = IPOIB_CM_BUF_SIZE % PAGE_SIZE,
67 IPOIB_CM_RX_SG = ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE) / PAGE_SIZE, 72 IPOIB_CM_RX_SG = ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE) / PAGE_SIZE,
68 IPOIB_RX_RING_SIZE = 128, 73 IPOIB_RX_RING_SIZE = 256,
69 IPOIB_TX_RING_SIZE = 64, 74 IPOIB_TX_RING_SIZE = 128,
70 IPOIB_MAX_QUEUE_SIZE = 8192, 75 IPOIB_MAX_QUEUE_SIZE = 8192,
71 IPOIB_MIN_QUEUE_SIZE = 2, 76 IPOIB_MIN_QUEUE_SIZE = 2,
72 IPOIB_CM_MAX_CONN_QP = 4096, 77 IPOIB_CM_MAX_CONN_QP = 4096,
@@ -84,7 +89,6 @@ enum {
84 IPOIB_FLAG_SUBINTERFACE = 5, 89 IPOIB_FLAG_SUBINTERFACE = 5,
85 IPOIB_MCAST_RUN = 6, 90 IPOIB_MCAST_RUN = 6,
86 IPOIB_STOP_REAPER = 7, 91 IPOIB_STOP_REAPER = 7,
87 IPOIB_MCAST_STARTED = 8,
88 IPOIB_FLAG_ADMIN_CM = 9, 92 IPOIB_FLAG_ADMIN_CM = 9,
89 IPOIB_FLAG_UMCAST = 10, 93 IPOIB_FLAG_UMCAST = 10,
90 IPOIB_FLAG_CSUM = 11, 94 IPOIB_FLAG_CSUM = 11,
@@ -96,7 +100,11 @@ enum {
96 IPOIB_MCAST_FLAG_BUSY = 2, /* joining or already joined */ 100 IPOIB_MCAST_FLAG_BUSY = 2, /* joining or already joined */
97 IPOIB_MCAST_FLAG_ATTACHED = 3, 101 IPOIB_MCAST_FLAG_ATTACHED = 3,
98 102
103 IPOIB_MAX_LRO_DESCRIPTORS = 8,
104 IPOIB_LRO_MAX_AGGR = 64,
105
99 MAX_SEND_CQE = 16, 106 MAX_SEND_CQE = 16,
107 IPOIB_CM_COPYBREAK = 256,
100}; 108};
101 109
102#define IPOIB_OP_RECV (1ul << 31) 110#define IPOIB_OP_RECV (1ul << 31)
@@ -149,6 +157,11 @@ struct ipoib_tx_buf {
149 u64 mapping[MAX_SKB_FRAGS + 1]; 157 u64 mapping[MAX_SKB_FRAGS + 1];
150}; 158};
151 159
160struct ipoib_cm_tx_buf {
161 struct sk_buff *skb;
162 u64 mapping;
163};
164
152struct ib_cm_id; 165struct ib_cm_id;
153 166
154struct ipoib_cm_data { 167struct ipoib_cm_data {
@@ -207,7 +220,7 @@ struct ipoib_cm_tx {
207 struct net_device *dev; 220 struct net_device *dev;
208 struct ipoib_neigh *neigh; 221 struct ipoib_neigh *neigh;
209 struct ipoib_path *path; 222 struct ipoib_path *path;
210 struct ipoib_tx_buf *tx_ring; 223 struct ipoib_cm_tx_buf *tx_ring;
211 unsigned tx_head; 224 unsigned tx_head;
212 unsigned tx_tail; 225 unsigned tx_tail;
213 unsigned long flags; 226 unsigned long flags;
@@ -249,6 +262,11 @@ struct ipoib_ethtool_st {
249 u16 max_coalesced_frames; 262 u16 max_coalesced_frames;
250}; 263};
251 264
265struct ipoib_lro {
266 struct net_lro_mgr lro_mgr;
267 struct net_lro_desc lro_desc[IPOIB_MAX_LRO_DESCRIPTORS];
268};
269
252/* 270/*
253 * Device private locking: tx_lock protects members used in TX fast 271 * Device private locking: tx_lock protects members used in TX fast
254 * path (and we use LLTX so upper layers don't do extra locking). 272 * path (and we use LLTX so upper layers don't do extra locking).
@@ -264,7 +282,6 @@ struct ipoib_dev_priv {
264 282
265 unsigned long flags; 283 unsigned long flags;
266 284
267 struct mutex mcast_mutex;
268 struct mutex vlan_mutex; 285 struct mutex vlan_mutex;
269 286
270 struct rb_root path_tree; 287 struct rb_root path_tree;
@@ -276,10 +293,11 @@ struct ipoib_dev_priv {
276 293
277 struct delayed_work pkey_poll_task; 294 struct delayed_work pkey_poll_task;
278 struct delayed_work mcast_task; 295 struct delayed_work mcast_task;
279 struct work_struct flush_task; 296 struct work_struct flush_light;
297 struct work_struct flush_normal;
298 struct work_struct flush_heavy;
280 struct work_struct restart_task; 299 struct work_struct restart_task;
281 struct delayed_work ah_reap_task; 300 struct delayed_work ah_reap_task;
282 struct work_struct pkey_event_task;
283 301
284 struct ib_device *ca; 302 struct ib_device *ca;
285 u8 port; 303 u8 port;
@@ -335,6 +353,8 @@ struct ipoib_dev_priv {
335 int hca_caps; 353 int hca_caps;
336 struct ipoib_ethtool_st ethtool; 354 struct ipoib_ethtool_st ethtool;
337 struct timer_list poll_timer; 355 struct timer_list poll_timer;
356
357 struct ipoib_lro lro;
338}; 358};
339 359
340struct ipoib_ah { 360struct ipoib_ah {
@@ -359,6 +379,7 @@ struct ipoib_path {
359 379
360 struct rb_node rb_node; 380 struct rb_node rb_node;
361 struct list_head list; 381 struct list_head list;
382 int valid;
362}; 383};
363 384
364struct ipoib_neigh { 385struct ipoib_neigh {
@@ -423,11 +444,14 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb,
423 struct ipoib_ah *address, u32 qpn); 444 struct ipoib_ah *address, u32 qpn);
424void ipoib_reap_ah(struct work_struct *work); 445void ipoib_reap_ah(struct work_struct *work);
425 446
447void ipoib_mark_paths_invalid(struct net_device *dev);
426void ipoib_flush_paths(struct net_device *dev); 448void ipoib_flush_paths(struct net_device *dev);
427struct ipoib_dev_priv *ipoib_intf_alloc(const char *format); 449struct ipoib_dev_priv *ipoib_intf_alloc(const char *format);
428 450
429int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port); 451int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port);
430void ipoib_ib_dev_flush(struct work_struct *work); 452void ipoib_ib_dev_flush_light(struct work_struct *work);
453void ipoib_ib_dev_flush_normal(struct work_struct *work);
454void ipoib_ib_dev_flush_heavy(struct work_struct *work);
431void ipoib_pkey_event(struct work_struct *work); 455void ipoib_pkey_event(struct work_struct *work);
432void ipoib_ib_dev_cleanup(struct net_device *dev); 456void ipoib_ib_dev_cleanup(struct net_device *dev);
433 457
@@ -466,9 +490,7 @@ void ipoib_path_iter_read(struct ipoib_path_iter *iter,
466#endif 490#endif
467 491
468int ipoib_mcast_attach(struct net_device *dev, u16 mlid, 492int ipoib_mcast_attach(struct net_device *dev, u16 mlid,
469 union ib_gid *mgid); 493 union ib_gid *mgid, int set_qkey);
470int ipoib_mcast_detach(struct net_device *dev, u16 mlid,
471 union ib_gid *mgid);
472 494
473int ipoib_init_qp(struct net_device *dev); 495int ipoib_init_qp(struct net_device *dev);
474int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca); 496int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca);