diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 18:34:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 18:34:26 -0500 |
commit | f0e2dcffae8701f00b34bce90e762eb798dea5b1 (patch) | |
tree | f648533a633a2d065b3c9c569c4e9e3c6b2c2ea8 /include | |
parent | 04a94babd68952a4e3cdd54ebf8ce8891f9b0f2e (diff) | |
parent | 5128bdc97a1018aacac2550cf73bda61041cc3b8 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/core: Remove unused struct ib_device.flags member
IB/core: Add IP checksum offload support
IPoIB: Add send gather support
IPoIB: Add high DMA feature flag
IB/mlx4: Use multiple WQ blocks to post smaller send WQEs
mlx4_core: Clean up struct mlx4_buf
mlx4_core: For 64-bit systems, vmap() kernel queue buffers
IB/mlx4: Consolidate code to get an entry from a struct mlx4_buf
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mlx4/device.h | 19 | ||||
-rw-r--r-- | include/linux/mlx4/qp.h | 4 | ||||
-rw-r--r-- | include/rdma/ib_verbs.h | 16 |
3 files changed, 31 insertions, 8 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 222815d91c40..6cdf813cd478 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -133,6 +133,11 @@ enum { | |||
133 | MLX4_STAT_RATE_OFFSET = 5 | 133 | MLX4_STAT_RATE_OFFSET = 5 |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) | ||
137 | { | ||
138 | return (major << 32) | (minor << 16) | subminor; | ||
139 | } | ||
140 | |||
136 | struct mlx4_caps { | 141 | struct mlx4_caps { |
137 | u64 fw_ver; | 142 | u64 fw_ver; |
138 | int num_ports; | 143 | int num_ports; |
@@ -189,10 +194,8 @@ struct mlx4_buf_list { | |||
189 | }; | 194 | }; |
190 | 195 | ||
191 | struct mlx4_buf { | 196 | struct mlx4_buf { |
192 | union { | 197 | struct mlx4_buf_list direct; |
193 | struct mlx4_buf_list direct; | 198 | struct mlx4_buf_list *page_list; |
194 | struct mlx4_buf_list *page_list; | ||
195 | } u; | ||
196 | int nbufs; | 199 | int nbufs; |
197 | int npages; | 200 | int npages; |
198 | int page_shift; | 201 | int page_shift; |
@@ -308,6 +311,14 @@ struct mlx4_init_port_param { | |||
308 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, | 311 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, |
309 | struct mlx4_buf *buf); | 312 | struct mlx4_buf *buf); |
310 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); | 313 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); |
314 | static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset) | ||
315 | { | ||
316 | if (BITS_PER_LONG == 64 || buf->nbufs == 1) | ||
317 | return buf->direct.buf + offset; | ||
318 | else | ||
319 | return buf->page_list[offset >> PAGE_SHIFT].buf + | ||
320 | (offset & (PAGE_SIZE - 1)); | ||
321 | } | ||
311 | 322 | ||
312 | int mlx4_pd_alloc(struct mlx4_dev *dev, u32 *pdn); | 323 | int mlx4_pd_alloc(struct mlx4_dev *dev, u32 *pdn); |
313 | void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn); | 324 | void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn); |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 3968b943259a..09a2230923f2 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -154,7 +154,11 @@ struct mlx4_qp_context { | |||
154 | u32 reserved5[10]; | 154 | u32 reserved5[10]; |
155 | }; | 155 | }; |
156 | 156 | ||
157 | /* Which firmware version adds support for NEC (NoErrorCompletion) bit */ | ||
158 | #define MLX4_FW_VER_WQE_CTRL_NEC mlx4_fw_ver(2, 2, 232) | ||
159 | |||
157 | enum { | 160 | enum { |
161 | MLX4_WQE_CTRL_NEC = 1 << 29, | ||
158 | MLX4_WQE_CTRL_FENCE = 1 << 6, | 162 | MLX4_WQE_CTRL_FENCE = 1 << 6, |
159 | MLX4_WQE_CTRL_CQ_UPDATE = 3 << 2, | 163 | MLX4_WQE_CTRL_CQ_UPDATE = 3 << 2, |
160 | MLX4_WQE_CTRL_SOLICITED = 1 << 1, | 164 | MLX4_WQE_CTRL_SOLICITED = 1 << 1, |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index cfbd38fe2998..701e7b40560a 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -95,7 +95,15 @@ enum ib_device_cap_flags { | |||
95 | IB_DEVICE_N_NOTIFY_CQ = (1<<14), | 95 | IB_DEVICE_N_NOTIFY_CQ = (1<<14), |
96 | IB_DEVICE_ZERO_STAG = (1<<15), | 96 | IB_DEVICE_ZERO_STAG = (1<<15), |
97 | IB_DEVICE_SEND_W_INV = (1<<16), | 97 | IB_DEVICE_SEND_W_INV = (1<<16), |
98 | IB_DEVICE_MEM_WINDOW = (1<<17) | 98 | IB_DEVICE_MEM_WINDOW = (1<<17), |
99 | /* | ||
100 | * Devices should set IB_DEVICE_UD_IP_SUM if they support | ||
101 | * insertion of UDP and TCP checksum on outgoing UD IPoIB | ||
102 | * messages and can verify the validity of checksum for | ||
103 | * incoming messages. Setting this flag implies that the | ||
104 | * IPoIB driver may set NETIF_F_IP_CSUM for datagram mode. | ||
105 | */ | ||
106 | IB_DEVICE_UD_IP_CSUM = (1<<18), | ||
99 | }; | 107 | }; |
100 | 108 | ||
101 | enum ib_atomic_cap { | 109 | enum ib_atomic_cap { |
@@ -431,6 +439,7 @@ struct ib_wc { | |||
431 | u8 sl; | 439 | u8 sl; |
432 | u8 dlid_path_bits; | 440 | u8 dlid_path_bits; |
433 | u8 port_num; /* valid only for DR SMPs on switches */ | 441 | u8 port_num; /* valid only for DR SMPs on switches */ |
442 | int csum_ok; | ||
434 | }; | 443 | }; |
435 | 444 | ||
436 | enum ib_cq_notify_flags { | 445 | enum ib_cq_notify_flags { |
@@ -615,7 +624,8 @@ enum ib_send_flags { | |||
615 | IB_SEND_FENCE = 1, | 624 | IB_SEND_FENCE = 1, |
616 | IB_SEND_SIGNALED = (1<<1), | 625 | IB_SEND_SIGNALED = (1<<1), |
617 | IB_SEND_SOLICITED = (1<<2), | 626 | IB_SEND_SOLICITED = (1<<2), |
618 | IB_SEND_INLINE = (1<<3) | 627 | IB_SEND_INLINE = (1<<3), |
628 | IB_SEND_IP_CSUM = (1<<4) | ||
619 | }; | 629 | }; |
620 | 630 | ||
621 | struct ib_sge { | 631 | struct ib_sge { |
@@ -890,8 +900,6 @@ struct ib_device { | |||
890 | int *pkey_tbl_len; | 900 | int *pkey_tbl_len; |
891 | int *gid_tbl_len; | 901 | int *gid_tbl_len; |
892 | 902 | ||
893 | u32 flags; | ||
894 | |||
895 | int num_comp_vectors; | 903 | int num_comp_vectors; |
896 | 904 | ||
897 | struct iw_cm_verbs *iwcm; | 905 | struct iw_cm_verbs *iwcm; |