1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-O << 2 /* 1 /* 3 * Copyright (c) 2004 Topspin Corporation. Al 2 * Copyright (c) 2004 Topspin Corporation. All rights reserved. >> 3 * >> 4 * This software is available to you under a choice of one of two >> 5 * licenses. You may choose to be licensed under the terms of the GNU >> 6 * General Public License (GPL) Version 2, available from the file >> 7 * COPYING in the main directory of this source tree, or the >> 8 * OpenIB.org BSD license below: >> 9 * >> 10 * Redistribution and use in source and binary forms, with or >> 11 * without modification, are permitted provided that the following >> 12 * conditions are met: >> 13 * >> 14 * - Redistributions of source code must retain the above >> 15 * copyright notice, this list of conditions and the following >> 16 * disclaimer. >> 17 * >> 18 * - Redistributions in binary form must reproduce the above >> 19 * copyright notice, this list of conditions and the following >> 20 * disclaimer in the documentation and/or other materials >> 21 * provided with the distribution. >> 22 * >> 23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, >> 24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF >> 25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND >> 26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS >> 27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN >> 28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN >> 29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE >> 30 * SOFTWARE. 4 */ 31 */ 5 32 6 #ifndef IB_PACK_H 33 #ifndef IB_PACK_H 7 #define IB_PACK_H 34 #define IB_PACK_H 8 35 9 #include <rdma/ib_verbs.h> 36 #include <rdma/ib_verbs.h> 10 #include <uapi/linux/if_ether.h> 37 #include <uapi/linux/if_ether.h> 11 38 12 enum { 39 enum { 13 IB_LRH_BYTES = 8, !! 40 IB_LRH_BYTES = 8, 14 IB_ETH_BYTES = 14, !! 41 IB_ETH_BYTES = 14, 15 IB_VLAN_BYTES = 4, !! 42 IB_VLAN_BYTES = 4, 16 IB_GRH_BYTES = 40, !! 43 IB_GRH_BYTES = 40, 17 IB_IP4_BYTES = 20, !! 44 IB_IP4_BYTES = 20, 18 IB_UDP_BYTES = 8, !! 45 IB_UDP_BYTES = 8, 19 IB_BTH_BYTES = 12, !! 46 IB_BTH_BYTES = 12, 20 IB_DETH_BYTES = 8, !! 47 IB_DETH_BYTES = 8 21 IB_EXT_ATOMICETH_BYTES = 28, << 22 IB_EXT_XRC_BYTES = 4, << 23 IB_ICRC_BYTES = 4 << 24 }; 48 }; 25 49 26 struct ib_field { 50 struct ib_field { 27 size_t struct_offset_bytes; 51 size_t struct_offset_bytes; 28 size_t struct_size_bytes; 52 size_t struct_size_bytes; 29 int offset_words; 53 int offset_words; 30 int offset_bits; 54 int offset_bits; 31 int size_bits; 55 int size_bits; 32 char *field_name; 56 char *field_name; 33 }; 57 }; 34 58 35 #define RESERVED \ 59 #define RESERVED \ 36 .field_name = "reserved" 60 .field_name = "reserved" 37 61 38 /* 62 /* 39 * This macro cleans up the definitions of con 63 * This macro cleans up the definitions of constants for BTH opcodes. 40 * It is used to define constants such as IB_O 64 * It is used to define constants such as IB_OPCODE_UD_SEND_ONLY, 41 * which becomes IB_OPCODE_UD + IB_OPCODE_SEND 65 * which becomes IB_OPCODE_UD + IB_OPCODE_SEND_ONLY, and this gives 42 * the correct value. 66 * the correct value. 43 * 67 * 44 * In short, user code should use the constant 68 * In short, user code should use the constants defined using the 45 * macro rather than worrying about adding tog 69 * macro rather than worrying about adding together other constants. 46 */ 70 */ 47 #define IB_OPCODE(transport, op) \ 71 #define IB_OPCODE(transport, op) \ 48 IB_OPCODE_ ## transport ## _ ## op = \ 72 IB_OPCODE_ ## transport ## _ ## op = \ 49 IB_OPCODE_ ## transport + IB_O 73 IB_OPCODE_ ## transport + IB_OPCODE_ ## op 50 74 51 enum { 75 enum { 52 /* transport types -- just used to def 76 /* transport types -- just used to define real constants */ 53 IB_OPCODE_RC 77 IB_OPCODE_RC = 0x00, 54 IB_OPCODE_UC 78 IB_OPCODE_UC = 0x20, 55 IB_OPCODE_RD 79 IB_OPCODE_RD = 0x40, 56 IB_OPCODE_UD 80 IB_OPCODE_UD = 0x60, 57 /* per IBTA 1.3 vol 1 Table 38, A10.3. 81 /* per IBTA 1.3 vol 1 Table 38, A10.3.2 */ 58 IB_OPCODE_CNP 82 IB_OPCODE_CNP = 0x80, 59 /* Manufacturer specific */ 83 /* Manufacturer specific */ 60 IB_OPCODE_MSP 84 IB_OPCODE_MSP = 0xe0, 61 85 62 /* operations -- just used to define r 86 /* operations -- just used to define real constants */ 63 IB_OPCODE_SEND_FIRST 87 IB_OPCODE_SEND_FIRST = 0x00, 64 IB_OPCODE_SEND_MIDDLE 88 IB_OPCODE_SEND_MIDDLE = 0x01, 65 IB_OPCODE_SEND_LAST 89 IB_OPCODE_SEND_LAST = 0x02, 66 IB_OPCODE_SEND_LAST_WITH_IMMEDIATE 90 IB_OPCODE_SEND_LAST_WITH_IMMEDIATE = 0x03, 67 IB_OPCODE_SEND_ONLY 91 IB_OPCODE_SEND_ONLY = 0x04, 68 IB_OPCODE_SEND_ONLY_WITH_IMMEDIATE 92 IB_OPCODE_SEND_ONLY_WITH_IMMEDIATE = 0x05, 69 IB_OPCODE_RDMA_WRITE_FIRST 93 IB_OPCODE_RDMA_WRITE_FIRST = 0x06, 70 IB_OPCODE_RDMA_WRITE_MIDDLE 94 IB_OPCODE_RDMA_WRITE_MIDDLE = 0x07, 71 IB_OPCODE_RDMA_WRITE_LAST 95 IB_OPCODE_RDMA_WRITE_LAST = 0x08, 72 IB_OPCODE_RDMA_WRITE_LAST_WITH_IMMEDIA 96 IB_OPCODE_RDMA_WRITE_LAST_WITH_IMMEDIATE = 0x09, 73 IB_OPCODE_RDMA_WRITE_ONLY 97 IB_OPCODE_RDMA_WRITE_ONLY = 0x0a, 74 IB_OPCODE_RDMA_WRITE_ONLY_WITH_IMMEDIA 98 IB_OPCODE_RDMA_WRITE_ONLY_WITH_IMMEDIATE = 0x0b, 75 IB_OPCODE_RDMA_READ_REQUEST 99 IB_OPCODE_RDMA_READ_REQUEST = 0x0c, 76 IB_OPCODE_RDMA_READ_RESPONSE_FIRST 100 IB_OPCODE_RDMA_READ_RESPONSE_FIRST = 0x0d, 77 IB_OPCODE_RDMA_READ_RESPONSE_MIDDLE 101 IB_OPCODE_RDMA_READ_RESPONSE_MIDDLE = 0x0e, 78 IB_OPCODE_RDMA_READ_RESPONSE_LAST 102 IB_OPCODE_RDMA_READ_RESPONSE_LAST = 0x0f, 79 IB_OPCODE_RDMA_READ_RESPONSE_ONLY 103 IB_OPCODE_RDMA_READ_RESPONSE_ONLY = 0x10, 80 IB_OPCODE_ACKNOWLEDGE 104 IB_OPCODE_ACKNOWLEDGE = 0x11, 81 IB_OPCODE_ATOMIC_ACKNOWLEDGE 105 IB_OPCODE_ATOMIC_ACKNOWLEDGE = 0x12, 82 IB_OPCODE_COMPARE_SWAP 106 IB_OPCODE_COMPARE_SWAP = 0x13, 83 IB_OPCODE_FETCH_ADD 107 IB_OPCODE_FETCH_ADD = 0x14, 84 /* opcode 0x15 is reserved */ 108 /* opcode 0x15 is reserved */ 85 IB_OPCODE_SEND_LAST_WITH_INVALIDATE 109 IB_OPCODE_SEND_LAST_WITH_INVALIDATE = 0x16, 86 IB_OPCODE_SEND_ONLY_WITH_INVALIDATE 110 IB_OPCODE_SEND_ONLY_WITH_INVALIDATE = 0x17, 87 IB_OPCODE_FLUSH << 88 IB_OPCODE_ATOMIC_WRITE << 89 111 90 /* real constants follow -- see commen 112 /* real constants follow -- see comment about above IB_OPCODE() 91 macro for more details */ 113 macro for more details */ 92 114 93 /* RC */ 115 /* RC */ 94 IB_OPCODE(RC, SEND_FIRST), 116 IB_OPCODE(RC, SEND_FIRST), 95 IB_OPCODE(RC, SEND_MIDDLE), 117 IB_OPCODE(RC, SEND_MIDDLE), 96 IB_OPCODE(RC, SEND_LAST), 118 IB_OPCODE(RC, SEND_LAST), 97 IB_OPCODE(RC, SEND_LAST_WITH_IMMEDIATE 119 IB_OPCODE(RC, SEND_LAST_WITH_IMMEDIATE), 98 IB_OPCODE(RC, SEND_ONLY), 120 IB_OPCODE(RC, SEND_ONLY), 99 IB_OPCODE(RC, SEND_ONLY_WITH_IMMEDIATE 121 IB_OPCODE(RC, SEND_ONLY_WITH_IMMEDIATE), 100 IB_OPCODE(RC, RDMA_WRITE_FIRST), 122 IB_OPCODE(RC, RDMA_WRITE_FIRST), 101 IB_OPCODE(RC, RDMA_WRITE_MIDDLE), 123 IB_OPCODE(RC, RDMA_WRITE_MIDDLE), 102 IB_OPCODE(RC, RDMA_WRITE_LAST), 124 IB_OPCODE(RC, RDMA_WRITE_LAST), 103 IB_OPCODE(RC, RDMA_WRITE_LAST_WITH_IMM 125 IB_OPCODE(RC, RDMA_WRITE_LAST_WITH_IMMEDIATE), 104 IB_OPCODE(RC, RDMA_WRITE_ONLY), 126 IB_OPCODE(RC, RDMA_WRITE_ONLY), 105 IB_OPCODE(RC, RDMA_WRITE_ONLY_WITH_IMM 127 IB_OPCODE(RC, RDMA_WRITE_ONLY_WITH_IMMEDIATE), 106 IB_OPCODE(RC, RDMA_READ_REQUEST), 128 IB_OPCODE(RC, RDMA_READ_REQUEST), 107 IB_OPCODE(RC, RDMA_READ_RESPONSE_FIRST 129 IB_OPCODE(RC, RDMA_READ_RESPONSE_FIRST), 108 IB_OPCODE(RC, RDMA_READ_RESPONSE_MIDDL 130 IB_OPCODE(RC, RDMA_READ_RESPONSE_MIDDLE), 109 IB_OPCODE(RC, RDMA_READ_RESPONSE_LAST) 131 IB_OPCODE(RC, RDMA_READ_RESPONSE_LAST), 110 IB_OPCODE(RC, RDMA_READ_RESPONSE_ONLY) 132 IB_OPCODE(RC, RDMA_READ_RESPONSE_ONLY), 111 IB_OPCODE(RC, ACKNOWLEDGE), 133 IB_OPCODE(RC, ACKNOWLEDGE), 112 IB_OPCODE(RC, ATOMIC_ACKNOWLEDGE), 134 IB_OPCODE(RC, ATOMIC_ACKNOWLEDGE), 113 IB_OPCODE(RC, COMPARE_SWAP), 135 IB_OPCODE(RC, COMPARE_SWAP), 114 IB_OPCODE(RC, FETCH_ADD), 136 IB_OPCODE(RC, FETCH_ADD), 115 IB_OPCODE(RC, SEND_LAST_WITH_INVALIDAT 137 IB_OPCODE(RC, SEND_LAST_WITH_INVALIDATE), 116 IB_OPCODE(RC, SEND_ONLY_WITH_INVALIDAT 138 IB_OPCODE(RC, SEND_ONLY_WITH_INVALIDATE), 117 IB_OPCODE(RC, FLUSH), << 118 IB_OPCODE(RC, ATOMIC_WRITE), << 119 139 120 /* UC */ 140 /* UC */ 121 IB_OPCODE(UC, SEND_FIRST), 141 IB_OPCODE(UC, SEND_FIRST), 122 IB_OPCODE(UC, SEND_MIDDLE), 142 IB_OPCODE(UC, SEND_MIDDLE), 123 IB_OPCODE(UC, SEND_LAST), 143 IB_OPCODE(UC, SEND_LAST), 124 IB_OPCODE(UC, SEND_LAST_WITH_IMMEDIATE 144 IB_OPCODE(UC, SEND_LAST_WITH_IMMEDIATE), 125 IB_OPCODE(UC, SEND_ONLY), 145 IB_OPCODE(UC, SEND_ONLY), 126 IB_OPCODE(UC, SEND_ONLY_WITH_IMMEDIATE 146 IB_OPCODE(UC, SEND_ONLY_WITH_IMMEDIATE), 127 IB_OPCODE(UC, RDMA_WRITE_FIRST), 147 IB_OPCODE(UC, RDMA_WRITE_FIRST), 128 IB_OPCODE(UC, RDMA_WRITE_MIDDLE), 148 IB_OPCODE(UC, RDMA_WRITE_MIDDLE), 129 IB_OPCODE(UC, RDMA_WRITE_LAST), 149 IB_OPCODE(UC, RDMA_WRITE_LAST), 130 IB_OPCODE(UC, RDMA_WRITE_LAST_WITH_IMM 150 IB_OPCODE(UC, RDMA_WRITE_LAST_WITH_IMMEDIATE), 131 IB_OPCODE(UC, RDMA_WRITE_ONLY), 151 IB_OPCODE(UC, RDMA_WRITE_ONLY), 132 IB_OPCODE(UC, RDMA_WRITE_ONLY_WITH_IMM 152 IB_OPCODE(UC, RDMA_WRITE_ONLY_WITH_IMMEDIATE), 133 153 134 /* RD */ 154 /* RD */ 135 IB_OPCODE(RD, SEND_FIRST), 155 IB_OPCODE(RD, SEND_FIRST), 136 IB_OPCODE(RD, SEND_MIDDLE), 156 IB_OPCODE(RD, SEND_MIDDLE), 137 IB_OPCODE(RD, SEND_LAST), 157 IB_OPCODE(RD, SEND_LAST), 138 IB_OPCODE(RD, SEND_LAST_WITH_IMMEDIATE 158 IB_OPCODE(RD, SEND_LAST_WITH_IMMEDIATE), 139 IB_OPCODE(RD, SEND_ONLY), 159 IB_OPCODE(RD, SEND_ONLY), 140 IB_OPCODE(RD, SEND_ONLY_WITH_IMMEDIATE 160 IB_OPCODE(RD, SEND_ONLY_WITH_IMMEDIATE), 141 IB_OPCODE(RD, RDMA_WRITE_FIRST), 161 IB_OPCODE(RD, RDMA_WRITE_FIRST), 142 IB_OPCODE(RD, RDMA_WRITE_MIDDLE), 162 IB_OPCODE(RD, RDMA_WRITE_MIDDLE), 143 IB_OPCODE(RD, RDMA_WRITE_LAST), 163 IB_OPCODE(RD, RDMA_WRITE_LAST), 144 IB_OPCODE(RD, RDMA_WRITE_LAST_WITH_IMM 164 IB_OPCODE(RD, RDMA_WRITE_LAST_WITH_IMMEDIATE), 145 IB_OPCODE(RD, RDMA_WRITE_ONLY), 165 IB_OPCODE(RD, RDMA_WRITE_ONLY), 146 IB_OPCODE(RD, RDMA_WRITE_ONLY_WITH_IMM 166 IB_OPCODE(RD, RDMA_WRITE_ONLY_WITH_IMMEDIATE), 147 IB_OPCODE(RD, RDMA_READ_REQUEST), 167 IB_OPCODE(RD, RDMA_READ_REQUEST), 148 IB_OPCODE(RD, RDMA_READ_RESPONSE_FIRST 168 IB_OPCODE(RD, RDMA_READ_RESPONSE_FIRST), 149 IB_OPCODE(RD, RDMA_READ_RESPONSE_MIDDL 169 IB_OPCODE(RD, RDMA_READ_RESPONSE_MIDDLE), 150 IB_OPCODE(RD, RDMA_READ_RESPONSE_LAST) 170 IB_OPCODE(RD, RDMA_READ_RESPONSE_LAST), 151 IB_OPCODE(RD, RDMA_READ_RESPONSE_ONLY) 171 IB_OPCODE(RD, RDMA_READ_RESPONSE_ONLY), 152 IB_OPCODE(RD, ACKNOWLEDGE), 172 IB_OPCODE(RD, ACKNOWLEDGE), 153 IB_OPCODE(RD, ATOMIC_ACKNOWLEDGE), 173 IB_OPCODE(RD, ATOMIC_ACKNOWLEDGE), 154 IB_OPCODE(RD, COMPARE_SWAP), 174 IB_OPCODE(RD, COMPARE_SWAP), 155 IB_OPCODE(RD, FETCH_ADD), 175 IB_OPCODE(RD, FETCH_ADD), 156 IB_OPCODE(RD, FLUSH), << 157 176 158 /* UD */ 177 /* UD */ 159 IB_OPCODE(UD, SEND_ONLY), 178 IB_OPCODE(UD, SEND_ONLY), 160 IB_OPCODE(UD, SEND_ONLY_WITH_IMMEDIATE 179 IB_OPCODE(UD, SEND_ONLY_WITH_IMMEDIATE) 161 }; 180 }; 162 181 163 enum { 182 enum { 164 IB_LNH_RAW = 0, 183 IB_LNH_RAW = 0, 165 IB_LNH_IP = 1, 184 IB_LNH_IP = 1, 166 IB_LNH_IBA_LOCAL = 2, 185 IB_LNH_IBA_LOCAL = 2, 167 IB_LNH_IBA_GLOBAL = 3 186 IB_LNH_IBA_GLOBAL = 3 168 }; 187 }; 169 188 170 struct ib_unpacked_lrh { 189 struct ib_unpacked_lrh { 171 u8 virtual_lane; 190 u8 virtual_lane; 172 u8 link_version; 191 u8 link_version; 173 u8 service_level; 192 u8 service_level; 174 u8 link_next_header; 193 u8 link_next_header; 175 __be16 destination_lid; 194 __be16 destination_lid; 176 __be16 packet_length; 195 __be16 packet_length; 177 __be16 source_lid; 196 __be16 source_lid; 178 }; 197 }; 179 198 180 struct ib_unpacked_grh { 199 struct ib_unpacked_grh { 181 u8 ip_version; 200 u8 ip_version; 182 u8 traffic_class; 201 u8 traffic_class; 183 __be32 flow_label; 202 __be32 flow_label; 184 __be16 payload_length; 203 __be16 payload_length; 185 u8 next_header; 204 u8 next_header; 186 u8 hop_limit; 205 u8 hop_limit; 187 union ib_gid source_gid; 206 union ib_gid source_gid; 188 union ib_gid destination_gid; 207 union ib_gid destination_gid; 189 }; 208 }; 190 209 191 struct ib_unpacked_bth { 210 struct ib_unpacked_bth { 192 u8 opcode; 211 u8 opcode; 193 u8 solicited_event; 212 u8 solicited_event; 194 u8 mig_req; 213 u8 mig_req; 195 u8 pad_count; 214 u8 pad_count; 196 u8 transport_header_version; 215 u8 transport_header_version; 197 __be16 pkey; 216 __be16 pkey; 198 __be32 destination_qpn; 217 __be32 destination_qpn; 199 u8 ack_req; 218 u8 ack_req; 200 __be32 psn; 219 __be32 psn; 201 }; 220 }; 202 221 203 struct ib_unpacked_deth { 222 struct ib_unpacked_deth { 204 __be32 qkey; 223 __be32 qkey; 205 __be32 source_qpn; 224 __be32 source_qpn; 206 }; 225 }; 207 226 208 struct ib_unpacked_eth { 227 struct ib_unpacked_eth { 209 u8 dmac_h[4]; 228 u8 dmac_h[4]; 210 u8 dmac_l[2]; 229 u8 dmac_l[2]; 211 u8 smac_h[2]; 230 u8 smac_h[2]; 212 u8 smac_l[4]; 231 u8 smac_l[4]; 213 __be16 type; 232 __be16 type; 214 }; 233 }; 215 234 216 struct ib_unpacked_ip4 { 235 struct ib_unpacked_ip4 { 217 u8 ver; 236 u8 ver; 218 u8 hdr_len; 237 u8 hdr_len; 219 u8 tos; 238 u8 tos; 220 __be16 tot_len; 239 __be16 tot_len; 221 __be16 id; 240 __be16 id; 222 __be16 frag_off; 241 __be16 frag_off; 223 u8 ttl; 242 u8 ttl; 224 u8 protocol; 243 u8 protocol; 225 __sum16 check; 244 __sum16 check; 226 __be32 saddr; 245 __be32 saddr; 227 __be32 daddr; 246 __be32 daddr; 228 }; 247 }; 229 248 230 struct ib_unpacked_udp { 249 struct ib_unpacked_udp { 231 __be16 sport; 250 __be16 sport; 232 __be16 dport; 251 __be16 dport; 233 __be16 length; 252 __be16 length; 234 __be16 csum; 253 __be16 csum; 235 }; 254 }; 236 255 237 struct ib_unpacked_vlan { 256 struct ib_unpacked_vlan { 238 __be16 tag; 257 __be16 tag; 239 __be16 type; 258 __be16 type; 240 }; 259 }; 241 260 242 struct ib_ud_header { 261 struct ib_ud_header { 243 int lrh_present; 262 int lrh_present; 244 struct ib_unpacked_lrh lrh; 263 struct ib_unpacked_lrh lrh; 245 int eth_present; 264 int eth_present; 246 struct ib_unpacked_eth eth; 265 struct ib_unpacked_eth eth; 247 int vlan_present; 266 int vlan_present; 248 struct ib_unpacked_vlan vlan; 267 struct ib_unpacked_vlan vlan; 249 int grh_present; 268 int grh_present; 250 struct ib_unpacked_grh grh; 269 struct ib_unpacked_grh grh; 251 int ipv4_present; 270 int ipv4_present; 252 struct ib_unpacked_ip4 ip4; 271 struct ib_unpacked_ip4 ip4; 253 int udp_present; 272 int udp_present; 254 struct ib_unpacked_udp udp; 273 struct ib_unpacked_udp udp; 255 struct ib_unpacked_bth bth; 274 struct ib_unpacked_bth bth; 256 struct ib_unpacked_deth deth; 275 struct ib_unpacked_deth deth; 257 int immediate_pres 276 int immediate_present; 258 __be32 immediate_data 277 __be32 immediate_data; 259 }; 278 }; 260 279 261 void ib_pack(const struct ib_field *des 280 void ib_pack(const struct ib_field *desc, 262 int des 281 int desc_len, 263 void *str 282 void *structure, 264 void *buf 283 void *buf); 265 284 266 void ib_unpack(const struct ib_field *d 285 void ib_unpack(const struct ib_field *desc, 267 int d 286 int desc_len, 268 void *b 287 void *buf, 269 void *s 288 void *structure); 270 289 271 __sum16 ib_ud_ip4_csum(struct ib_ud_header *he 290 __sum16 ib_ud_ip4_csum(struct ib_ud_header *header); 272 291 273 int ib_ud_header_init(int pa 292 int ib_ud_header_init(int payload_bytes, 274 int lr 293 int lrh_present, 275 int et 294 int eth_present, 276 int vl 295 int vlan_present, 277 int gr 296 int grh_present, 278 int ip 297 int ip_version, 279 int ud 298 int udp_present, 280 int im 299 int immediate_present, 281 struct ib_ud_header *hea 300 struct ib_ud_header *header); 282 301 283 int ib_ud_header_pack(struct ib_ud_header *hea 302 int ib_ud_header_pack(struct ib_ud_header *header, 284 void *buf 303 void *buf); 285 304 286 int ib_ud_header_unpack(void *b 305 int ib_ud_header_unpack(void *buf, 287 struct ib_ud_header *h 306 struct ib_ud_header *header); 288 307 289 #endif /* IB_PACK_H */ 308 #endif /* IB_PACK_H */ 290 309
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.