Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016 Cisco and/or its affiliates. |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at: |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
| 15 | /** |
| 16 | * @brief |
| 17 | * A Data-Path Object is an object that represents actions that are |
| 18 | * applied to packets are they are switched through VPP's data-path. |
| 19 | * |
| 20 | * The DPO can be considered to be like is a base class that is specialised |
| 21 | * by other objects to provide concreate actions |
| 22 | * |
| 23 | * The VLIB graph nodes are graph of DPO types, the DPO graph is a graph of |
| 24 | * instances. |
| 25 | */ |
| 26 | |
| 27 | #ifndef __DPO_H__ |
| 28 | #define __DPO_H__ |
| 29 | |
| 30 | #include <vnet/vnet.h> |
| 31 | |
| 32 | /** |
| 33 | * @brief An index for adjacencies. |
| 34 | * Alas 'C' is not typesafe enough to b0rk when a u32 is used instead of |
| 35 | * an index_t. However, for us humans, we can glean much more intent |
| 36 | * from the declaration |
| 37 | * foo barindex_t t); |
| 38 | * than we can from |
| 39 | * foo bar(u32 t); |
| 40 | */ |
| 41 | typedef u32 index_t; |
| 42 | |
| 43 | /** |
| 44 | * @brief Invalid index - used when no index is known |
| 45 | * blazoned capitals INVALID speak volumes where ~0 does not. |
| 46 | */ |
| 47 | #define INDEX_INVALID ((index_t)(~0)) |
| 48 | |
| 49 | /** |
| 50 | * @brief Data path protocol. |
| 51 | * Actions performed on packets in the data-plane can be described and represented |
| 52 | * by protocol independent objects, i.e. ADJACENCY, but the spceifics actions |
| 53 | * required during ADJACENCY processing can be protocol dependent. For example, |
| 54 | * the adjacency rewrite node performs a ip4 checksum calculation, ip6 and MPLS |
| 55 | * do not, all 3 perform a TTL decrement. The VLIB graph nodes are thus protocol |
| 56 | * dependent, and thus each graph edge/arc is too. |
| 57 | * When programming a DPO's next node arc from child to parent it is thus required |
| 58 | * to know the parent's data-path protocol so the correct arc index can be used. |
| 59 | */ |
| 60 | typedef enum dpo_proto_t_ |
| 61 | { |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 62 | DPO_PROTO_IP4 = 0, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 63 | DPO_PROTO_IP6, |
| 64 | DPO_PROTO_MPLS, |
Neale Ranns | da78f95 | 2017-05-24 09:15:43 -0700 | [diff] [blame] | 65 | DPO_PROTO_ETHERNET, |
Florin Coras | ce1b4c7 | 2017-01-26 14:25:34 -0800 | [diff] [blame] | 66 | DPO_PROTO_NSH, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 67 | } __attribute__((packed)) dpo_proto_t; |
| 68 | |
Florin Coras | ce1b4c7 | 2017-01-26 14:25:34 -0800 | [diff] [blame] | 69 | #define DPO_PROTO_NUM ((dpo_proto_t)(DPO_PROTO_NSH+1)) |
Neale Ranns | 450cd30 | 2016-11-09 17:49:42 +0000 | [diff] [blame] | 70 | #define DPO_PROTO_NONE ((dpo_proto_t)(DPO_PROTO_NUM+1)) |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 71 | |
| 72 | #define DPO_PROTOS { \ |
| 73 | [DPO_PROTO_IP4] = "ip4", \ |
| 74 | [DPO_PROTO_IP6] = "ip6", \ |
Neale Ranns | 5e575b1 | 2016-10-03 09:40:25 +0100 | [diff] [blame] | 75 | [DPO_PROTO_ETHERNET] = "ethernet", \ |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 76 | [DPO_PROTO_MPLS] = "mpls", \ |
Florin Coras | ce1b4c7 | 2017-01-26 14:25:34 -0800 | [diff] [blame] | 77 | [DPO_PROTO_NSH] = "nsh", \ |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 78 | } |
| 79 | |
Neale Ranns | 5e575b1 | 2016-10-03 09:40:25 +0100 | [diff] [blame] | 80 | #define FOR_EACH_DPO_PROTO(_proto) \ |
| 81 | for (_proto = DPO_PROTO_IP4; \ |
Florin Coras | ce1b4c7 | 2017-01-26 14:25:34 -0800 | [diff] [blame] | 82 | _proto <= DPO_PROTO_NSH; \ |
Neale Ranns | 5e575b1 | 2016-10-03 09:40:25 +0100 | [diff] [blame] | 83 | _proto++) |
| 84 | |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 85 | /** |
| 86 | * @brief Common types of data-path objects |
| 87 | * New types can be dynamically added using dpo_register_new_type() |
| 88 | */ |
| 89 | typedef enum dpo_type_t_ { |
| 90 | /** |
| 91 | * A non-zero value first so we can spot unitialisation errors |
| 92 | */ |
| 93 | DPO_FIRST, |
| 94 | DPO_DROP, |
Neale Ranns | 948e00f | 2016-10-20 13:39:34 +0100 | [diff] [blame] | 95 | DPO_IP_NULL, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 96 | DPO_PUNT, |
| 97 | /** |
| 98 | * @brief load-balancing over a choice of [un]equal cost paths |
| 99 | */ |
| 100 | DPO_LOAD_BALANCE, |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 101 | DPO_REPLICATE, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 102 | DPO_ADJACENCY, |
| 103 | DPO_ADJACENCY_INCOMPLETE, |
| 104 | DPO_ADJACENCY_MIDCHAIN, |
| 105 | DPO_ADJACENCY_GLEAN, |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 106 | DPO_ADJACENCY_MCAST, |
Neale Ranns | 0f26c5a | 2017-03-01 15:12:11 -0800 | [diff] [blame] | 107 | DPO_ADJACENCY_MCAST_MIDCHAIN, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 108 | DPO_RECEIVE, |
| 109 | DPO_LOOKUP, |
| 110 | DPO_LISP_CP, |
| 111 | DPO_CLASSIFY, |
| 112 | DPO_MPLS_LABEL, |
Neale Ranns | 0f26c5a | 2017-03-01 15:12:11 -0800 | [diff] [blame] | 113 | DPO_MPLS_DISPOSITION, |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 114 | DPO_MFIB_ENTRY, |
Neale Ranns | 43161a8 | 2017-08-12 02:12:00 -0700 | [diff] [blame] | 115 | DPO_INTERFACE_RX, |
| 116 | DPO_INTERFACE_TX, |
Neale Ranns | 6f63115 | 2017-10-03 08:20:21 -0700 | [diff] [blame] | 117 | DPO_L2_BRIDGE, |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 118 | DPO_LAST, |
| 119 | } __attribute__((packed)) dpo_type_t; |
| 120 | |
| 121 | #define DPO_TYPE_NUM DPO_LAST |
| 122 | |
| 123 | #define DPO_TYPES { \ |
| 124 | [DPO_FIRST] = "dpo-invalid", \ |
| 125 | [DPO_DROP] = "dpo-drop", \ |
Neale Ranns | 948e00f | 2016-10-20 13:39:34 +0100 | [diff] [blame] | 126 | [DPO_IP_NULL] = "dpo-ip-null", \ |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 127 | [DPO_PUNT] = "dpo-punt", \ |
| 128 | [DPO_ADJACENCY] = "dpo-adjacency", \ |
| 129 | [DPO_ADJACENCY_INCOMPLETE] = "dpo-adjacency-incomplete", \ |
| 130 | [DPO_ADJACENCY_MIDCHAIN] = "dpo-adjacency-midcahin", \ |
| 131 | [DPO_ADJACENCY_GLEAN] = "dpo-glean", \ |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 132 | [DPO_ADJACENCY_MCAST] = "dpo-adj-mcast", \ |
Neale Ranns | 0f26c5a | 2017-03-01 15:12:11 -0800 | [diff] [blame] | 133 | [DPO_ADJACENCY_MCAST_MIDCHAIN] = "dpo-adj-mcast-midchain", \ |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 134 | [DPO_RECEIVE] = "dpo-receive", \ |
| 135 | [DPO_LOOKUP] = "dpo-lookup", \ |
| 136 | [DPO_LOAD_BALANCE] = "dpo-load-balance", \ |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 137 | [DPO_REPLICATE] = "dpo-replicate", \ |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 138 | [DPO_LISP_CP] = "dpo-lisp-cp", \ |
| 139 | [DPO_CLASSIFY] = "dpo-classify", \ |
Neale Ranns | 32e1c01 | 2016-11-22 17:07:28 +0000 | [diff] [blame] | 140 | [DPO_MPLS_LABEL] = "dpo-mpls-label", \ |
Neale Ranns | 0f26c5a | 2017-03-01 15:12:11 -0800 | [diff] [blame] | 141 | [DPO_MPLS_DISPOSITION] = "dpo-mpls-diposition", \ |
| 142 | [DPO_MFIB_ENTRY] = "dpo-mfib_entry", \ |
Neale Ranns | 43161a8 | 2017-08-12 02:12:00 -0700 | [diff] [blame] | 143 | [DPO_INTERFACE_RX] = "dpo-interface-rx", \ |
Neale Ranns | 6f63115 | 2017-10-03 08:20:21 -0700 | [diff] [blame] | 144 | [DPO_INTERFACE_TX] = "dpo-interface-tx", \ |
| 145 | [DPO_L2_BRIDGE] = "dpo-l2-bridge" \ |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | /** |
| 149 | * @brief The identity of a DPO is a combination of its type and its |
| 150 | * instance number/index of objects of that type |
| 151 | */ |
| 152 | typedef struct dpo_id_t_ { |
| 153 | /** |
| 154 | * the type |
| 155 | */ |
| 156 | dpo_type_t dpoi_type; |
| 157 | /** |
| 158 | * the data-path protocol of the type. |
| 159 | */ |
| 160 | dpo_proto_t dpoi_proto; |
| 161 | /** |
| 162 | * The next VLIB node to follow. |
| 163 | */ |
| 164 | u16 dpoi_next_node; |
| 165 | /** |
| 166 | * the index of objects of that type |
| 167 | */ |
| 168 | index_t dpoi_index; |
| 169 | } __attribute__ ((aligned(sizeof(u64)))) dpo_id_t; |
| 170 | |
Damjan Marion | cf47894 | 2016-11-07 14:57:50 +0100 | [diff] [blame] | 171 | STATIC_ASSERT(sizeof(dpo_id_t) <= sizeof(u64), |
| 172 | "DPO ID is greater than sizeof u64 " |
| 173 | "atomic updates need to be revisited"); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 174 | |
| 175 | /** |
Neale Ranns | ad95b5d | 2016-11-10 20:35:14 +0000 | [diff] [blame] | 176 | * @brief An initialiser for DPOs declared on the stack. |
| 177 | * Thenext node is set to 0 since VLIB graph nodes should set 0 index to drop. |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 178 | */ |
Neale Ranns | ad95b5d | 2016-11-10 20:35:14 +0000 | [diff] [blame] | 179 | #define DPO_INVALID \ |
| 180 | { \ |
| 181 | .dpoi_type = DPO_FIRST, \ |
| 182 | .dpoi_proto = DPO_PROTO_NONE, \ |
| 183 | .dpoi_index = INDEX_INVALID, \ |
| 184 | .dpoi_next_node = 0, \ |
| 185 | } |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 186 | |
| 187 | /** |
| 188 | * @brief Return true if the DPO object is valid, i.e. has been initialised. |
| 189 | */ |
| 190 | static inline int |
| 191 | dpo_id_is_valid (const dpo_id_t *dpoi) |
| 192 | { |
| 193 | return (dpoi->dpoi_type != DPO_FIRST && |
| 194 | dpoi->dpoi_index != INDEX_INVALID); |
| 195 | } |
| 196 | |
Neale Ranns | ad95b5d | 2016-11-10 20:35:14 +0000 | [diff] [blame] | 197 | extern dpo_proto_t vnet_link_to_dpo_proto(vnet_link_t linkt); |
| 198 | |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 199 | /** |
| 200 | * @brief |
| 201 | * Take a reference counting lock on the DPO |
| 202 | */ |
| 203 | extern void dpo_lock(dpo_id_t *dpo); |
| 204 | |
| 205 | /** |
| 206 | * @brief |
| 207 | * Release a reference counting lock on the DPO |
| 208 | */ |
| 209 | extern void dpo_unlock(dpo_id_t *dpo); |
| 210 | |
| 211 | /** |
| 212 | * @brief Set/create a DPO ID |
| 213 | * The DPO will be locked. |
| 214 | * |
| 215 | * @param dpo |
| 216 | * The DPO object to configure |
| 217 | * |
| 218 | * @param type |
| 219 | * The dpo_type_t of the DPO |
| 220 | * |
| 221 | * @param proto |
| 222 | * The dpo_proto_t of the DPO |
| 223 | * |
| 224 | * @param index |
| 225 | * The type specific index of the DPO |
| 226 | */ |
| 227 | extern void dpo_set(dpo_id_t *dpo, |
| 228 | dpo_type_t type, |
| 229 | dpo_proto_t proto, |
| 230 | index_t index); |
| 231 | |
| 232 | /** |
| 233 | * @brief reset a DPO ID |
| 234 | * The DPO will be unlocked. |
| 235 | * |
| 236 | * @param dpo |
| 237 | * The DPO object to reset |
| 238 | */ |
| 239 | extern void dpo_reset(dpo_id_t *dpo); |
| 240 | |
| 241 | /** |
| 242 | * @brief compare two DPOs for equality |
| 243 | */ |
| 244 | extern int dpo_cmp(const dpo_id_t *dpo1, |
| 245 | const dpo_id_t *dpo2); |
| 246 | |
| 247 | /** |
| 248 | * @brief |
| 249 | * atomic copy a data-plane object. |
| 250 | * This is safe to use when the dst DPO is currently switching packets |
| 251 | */ |
| 252 | extern void dpo_copy(dpo_id_t *dst, |
| 253 | const dpo_id_t *src); |
| 254 | |
| 255 | /** |
| 256 | * @brief Return TRUE is the DPO is any type of adjacency |
| 257 | */ |
| 258 | extern int dpo_is_adj(const dpo_id_t *dpo); |
| 259 | |
| 260 | /** |
| 261 | * @biref Format a DPO_id_t oject |
| 262 | */ |
| 263 | extern u8 *format_dpo_id(u8 * s, va_list * args); |
| 264 | |
| 265 | /** |
| 266 | * @biref format a DPO type |
| 267 | */ |
| 268 | extern u8 *format_dpo_type(u8 * s, va_list * args); |
| 269 | |
| 270 | /** |
| 271 | * @brief format a DPO protocol |
| 272 | */ |
| 273 | extern u8 *format_dpo_proto(u8 * s, va_list * args); |
| 274 | |
| 275 | /** |
Neale Ranns | da78f95 | 2017-05-24 09:15:43 -0700 | [diff] [blame] | 276 | * @brief format a DPO protocol |
| 277 | */ |
| 278 | extern vnet_link_t dpo_proto_to_link(dpo_proto_t dp); |
| 279 | |
| 280 | /** |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 281 | * @brief |
| 282 | * Set and stack a DPO. |
| 283 | * The DPO passed is set to the parent DPO and the necessary |
| 284 | * VLIB graph arcs are created. The child_type and child_proto |
| 285 | * are used to get the VLID nodes from which the arcs are added. |
| 286 | * |
| 287 | * @param child_type |
| 288 | * Child DPO type. |
| 289 | * |
| 290 | * @param child_proto |
| 291 | * Child DPO proto |
| 292 | * |
| 293 | * @parem dpo |
| 294 | * This is the DPO to stack and set. |
| 295 | * |
| 296 | * @paren parent_dpo |
| 297 | * The parent DPO to stack onto. |
| 298 | */ |
| 299 | extern void dpo_stack(dpo_type_t child_type, |
| 300 | dpo_proto_t child_proto, |
| 301 | dpo_id_t *dpo, |
| 302 | const dpo_id_t *parent_dpo); |
| 303 | |
| 304 | /** |
| 305 | * @brief |
| 306 | * Set and stack a DPO. |
| 307 | * The DPO passed is set to the parent DPO and the necessary |
| 308 | * VLIB graph arcs are created, from the child_node passed. |
| 309 | * |
| 310 | * @param child_node |
| 311 | * The VLIB grpah node index to create an arc from to the parent |
| 312 | * |
| 313 | * @parem dpo |
| 314 | * This is the DPO to stack and set. |
| 315 | * |
| 316 | * @paren parent_dpo |
| 317 | * The parent DPO to stack onto. |
| 318 | */ |
| 319 | extern void dpo_stack_from_node(u32 child_node, |
| 320 | dpo_id_t *dpo, |
| 321 | const dpo_id_t *parent); |
| 322 | |
| 323 | /** |
| 324 | * @brief A lock function registered for a DPO type |
| 325 | */ |
| 326 | typedef void (*dpo_lock_fn_t)(dpo_id_t *dpo); |
| 327 | |
| 328 | /** |
| 329 | * @brief An unlock function registered for a DPO type |
| 330 | */ |
| 331 | typedef void (*dpo_unlock_fn_t)(dpo_id_t *dpo); |
| 332 | |
| 333 | /** |
Neale Ranns | 6c3ebcc | 2016-10-02 21:20:15 +0100 | [diff] [blame] | 334 | * @brief An memory usage show command |
| 335 | */ |
| 336 | typedef void (*dpo_mem_show_t)(void); |
| 337 | |
| 338 | /** |
Neale Ranns | 43161a8 | 2017-08-12 02:12:00 -0700 | [diff] [blame] | 339 | * @brief Given a DPO instance return a vector of node indices that |
| 340 | * the type/instance will use. |
| 341 | */ |
| 342 | typedef u32* (*dpo_get_next_node_t)(const dpo_id_t *dpo); |
| 343 | |
| 344 | /** |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 345 | * @brief A virtual function table regisitered for a DPO type |
| 346 | */ |
| 347 | typedef struct dpo_vft_t_ |
| 348 | { |
| 349 | /** |
| 350 | * A reference counting lock function |
| 351 | */ |
| 352 | dpo_lock_fn_t dv_lock; |
| 353 | /** |
| 354 | * A reference counting unlock function |
| 355 | */ |
| 356 | dpo_lock_fn_t dv_unlock; |
| 357 | /** |
| 358 | * A format function |
| 359 | */ |
| 360 | format_function_t *dv_format; |
Neale Ranns | 6c3ebcc | 2016-10-02 21:20:15 +0100 | [diff] [blame] | 361 | /** |
| 362 | * A show memory usage function |
| 363 | */ |
| 364 | dpo_mem_show_t dv_mem_show; |
Neale Ranns | 43161a8 | 2017-08-12 02:12:00 -0700 | [diff] [blame] | 365 | /** |
| 366 | * A function to get the next VLIB node given an instance |
| 367 | * of the DPO. If this is null, then the node's name MUST be |
| 368 | * retreiveable from the nodes names array passed in the register |
| 369 | * function |
| 370 | */ |
| 371 | dpo_get_next_node_t dv_get_next_node; |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 372 | } dpo_vft_t; |
| 373 | |
| 374 | |
| 375 | /** |
| 376 | * @brief For a given DPO type Register: |
| 377 | * - a virtual function table |
| 378 | * - a NULL terminated array of graph nodes from which that object type |
| 379 | * will originate packets, i.e. the nodes in which the object type will be |
| 380 | * the parent DPO in the DP graph. The ndoes are per-data-path protocol |
| 381 | * (see above). |
| 382 | * |
| 383 | * @param type |
| 384 | * The type being registered. |
| 385 | * |
| 386 | * @param vft |
| 387 | * The virtual function table to register for the type. |
| 388 | * |
| 389 | * @param nodes |
| 390 | * The string description of the per-protocol VLIB graph nodes. |
| 391 | */ |
Neale Ranns | 6c3ebcc | 2016-10-02 21:20:15 +0100 | [diff] [blame] | 392 | extern void dpo_register(dpo_type_t type, |
| 393 | const dpo_vft_t *vft, |
| 394 | const char * const * const * nodes); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 395 | |
| 396 | /** |
| 397 | * @brief Create and register a new DPO type. |
| 398 | * |
| 399 | * This can be used by plugins to create new DPO types that are not listed |
| 400 | * in dpo_type_t enum |
| 401 | * |
| 402 | * @param vft |
| 403 | * The virtual function table to register for the type. |
| 404 | * |
| 405 | * @param nodes |
| 406 | * The string description of the per-protocol VLIB graph nodes. |
| 407 | * |
| 408 | * @return The new dpo_type_t |
| 409 | */ |
Neale Ranns | 6c3ebcc | 2016-10-02 21:20:15 +0100 | [diff] [blame] | 410 | extern dpo_type_t dpo_register_new_type(const dpo_vft_t *vft, |
| 411 | const char * const * const * nodes); |
Neale Ranns | 0bfe5d8 | 2016-08-25 15:29:12 +0100 | [diff] [blame] | 412 | |
| 413 | #endif |