~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/rdma/ib_pack.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/rdma/ib_pack.h (Version linux-6.11.5) and /include/rdma/ib_pack.h (Version linux-5.9.16)


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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php