Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 1 | /* |
| 2 | Copyright (c) 2012 Cisco and/or its affiliates. |
| 3 | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at: |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include <vppinfra/slist.h> |
| 18 | |
| 19 | /* |
| 20 | * skip-list implementation |
| 21 | * |
| 22 | * Good news / bad news. As balanced binary tree schemes go, |
| 23 | * this one seems pretty fast and is reasonably simple. There's a very |
| 24 | * limited amount that can be done to mitigate sdram read latency. |
| 25 | * |
| 26 | * Each active clib_slist_elt_t is on from 1 to N lists. Each active element |
| 27 | * is always on the "level-0" list. Since most elements are *only* on |
| 28 | * level 0, we keep the level 0 (and level 1) in the element. For those |
| 29 | * elements on more than two lists, we switch to a vector. Hence, the |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 30 | * "n" union in slib_slist_elt_t. |
| 31 | * |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 32 | * The low-order bit of elt->n.next0[0] is 1 for inlined next indices, |
| 33 | * 0 for vector indices (since the allocator always aligns to at least |
| 34 | * a 4-byte boundary). We can only represent 2e9 items, but since the |
| 35 | * practical performance limit is O(1e7), it doesn't matter. |
| 36 | * |
| 37 | * We create a "head" element which (by construction) is always |
| 38 | * lexically lighter than any other element. This makes a large number |
| 39 | * of irritating special cases go away. |
| 40 | * |
| 41 | * User code is in charge of comparing a supplied key with |
| 42 | * the key component of a user pool element. The user tells this code |
| 43 | * to add or delete (opaque key, 32-bit integer) pairs to the skip-list. |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 44 | * |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 45 | * The algorithm adds new elements to one or more lists. |
| 46 | * For levels greater than zero, the probability of a new element landing on |
| 47 | * a list is branching_factor**N. Branching_factor = 0.2 seems to work |
| 48 | * OK, yielding about 50 compares per search at O(1e7) items. |
| 49 | */ |
| 50 | |
| 51 | clib_error_t * |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 52 | clib_slist_init (clib_slist_t * sp, f64 branching_factor, |
| 53 | clib_slist_key_compare_function_t compare, |
| 54 | format_function_t format_user_element) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 55 | { |
| 56 | clib_slist_elt_t *head; |
Dave Barach | b7b9299 | 2018-10-17 10:38:51 -0400 | [diff] [blame] | 57 | clib_memset (sp, 0, sizeof (sp[0])); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 58 | sp->branching_factor = branching_factor; |
| 59 | sp->format_user_element = format_user_element; |
| 60 | sp->compare = compare; |
| 61 | sp->seed = 0xdeaddabe; |
| 62 | pool_get (sp->elts, head); |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 63 | vec_add1 (head->n.nexts, (u32) ~ 0); |
| 64 | head->user_pool_index = (u32) ~ 0; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 65 | vec_validate (sp->path, 1); |
| 66 | vec_validate (sp->occupancy, 0); |
| 67 | |
| 68 | return 0; |
| 69 | } |
| 70 | |
| 71 | /* |
| 72 | * slist_search_internal |
| 73 | */ |
| 74 | static inline clib_slist_search_result_t |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 75 | slist_search_internal (clib_slist_t * sp, void *key, int need_full_path) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 76 | { |
| 77 | int level, comp_result; |
| 78 | clib_slist_elt_t *search_elt, *head_elt; |
| 79 | |
| 80 | sp->ncompares = 0; |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 81 | /* |
| 82 | * index 0 is the magic listhead element which is |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 83 | * lexically lighter than / to the left of every element |
| 84 | */ |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 85 | search_elt = head_elt = pool_elt_at_index (sp->elts, 0); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 86 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 87 | /* |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 88 | * Initial negotiating position, only the head_elt is |
| 89 | * lighter than the supplied key |
| 90 | */ |
Dave Barach | b7b9299 | 2018-10-17 10:38:51 -0400 | [diff] [blame] | 91 | clib_memset (sp->path, 0, vec_len (head_elt->n.nexts) * sizeof (u32)); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 92 | |
| 93 | /* Walk the fastest lane first */ |
| 94 | level = vec_len (head_elt->n.nexts) - 1; |
| 95 | _vec_len (sp->path) = level + 1; |
| 96 | |
| 97 | while (1) |
| 98 | { |
| 99 | u32 next_index_this_level; |
| 100 | clib_slist_elt_t *prefetch_elt; |
| 101 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 102 | /* |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 103 | * Prefetching the next element at this level makes a measurable |
| 104 | * difference, but doesn't fix the dependent read stall problem |
| 105 | */ |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 106 | prefetch_elt = sp->elts + |
| 107 | clib_slist_get_next_at_level (search_elt, level); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 108 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 109 | CLIB_PREFETCH (prefetch_elt, CLIB_CACHE_LINE_BYTES, READ); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 110 | |
| 111 | /* Compare the key with the current element */ |
| 112 | comp_result = (search_elt == head_elt) ? 1 : |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 113 | sp->compare (key, search_elt->user_pool_index); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 114 | |
| 115 | sp->ncompares++; |
| 116 | /* key "lighter" than this element */ |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 117 | if (comp_result < 0) |
| 118 | { |
| 119 | /* |
| 120 | * Back up to previous item on this list |
| 121 | * and search the next finer-grained list |
| 122 | * starting there. |
| 123 | */ |
| 124 | search_elt = pool_elt_at_index (sp->elts, sp->path[level]); |
| 125 | next_list: |
| 126 | if (level > 0) |
| 127 | { |
| 128 | level--; |
| 129 | continue; |
| 130 | } |
| 131 | else |
| 132 | { |
| 133 | return CLIB_SLIST_NO_MATCH; |
| 134 | } |
| 135 | } |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 136 | /* Match */ |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 137 | if (comp_result == 0) |
| 138 | { |
| 139 | /* |
| 140 | * If we're trying to delete an element, we need to |
| 141 | * track down all of the elements which point at it. |
| 142 | * Otherwise, don't bother with it |
| 143 | */ |
| 144 | if (need_full_path && level > 0) |
| 145 | { |
| 146 | search_elt = pool_elt_at_index (sp->elts, sp->path[level]); |
| 147 | level--; |
| 148 | continue; |
| 149 | } |
| 150 | level = vec_len (head_elt->n.nexts); |
| 151 | sp->path[level] = search_elt - sp->elts; |
| 152 | _vec_len (sp->path) = level + 1; |
| 153 | return CLIB_SLIST_MATCH; |
| 154 | } |
| 155 | /* |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 156 | * comp_result positive, key is to the right of |
| 157 | * this element |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 158 | */ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 159 | sp->path[level] = search_elt - sp->elts; |
| 160 | |
| 161 | /* Out of list at this level? */ |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 162 | next_index_this_level = |
| 163 | clib_slist_get_next_at_level (search_elt, level); |
| 164 | if (next_index_this_level == (u32) ~ 0) |
| 165 | goto next_list; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 166 | |
| 167 | /* No, try the next element */ |
| 168 | search_elt = pool_elt_at_index (sp->elts, next_index_this_level); |
| 169 | } |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 170 | return 0; /* notreached */ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 171 | } |
| 172 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 173 | u32 |
| 174 | clib_slist_search (clib_slist_t * sp, void *key, u32 * ncompares) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 175 | { |
| 176 | clib_slist_search_result_t rv; |
| 177 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 178 | rv = slist_search_internal (sp, key, 0 /* dont need full path */ ); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 179 | if (rv == CLIB_SLIST_MATCH) |
| 180 | { |
| 181 | clib_slist_elt_t *elt; |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 182 | elt = pool_elt_at_index (sp->elts, sp->path[vec_len (sp->path) - 1]); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 183 | if (ncompares) |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 184 | *ncompares = sp->ncompares; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 185 | return elt->user_pool_index; |
| 186 | } |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 187 | return (u32) ~ 0; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 188 | } |
| 189 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 190 | void |
| 191 | clib_slist_add (clib_slist_t * sp, void *key, u32 user_pool_index) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 192 | { |
| 193 | clib_slist_elt_t *new_elt; |
| 194 | clib_slist_search_result_t search_result; |
| 195 | int level; |
| 196 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 197 | search_result = slist_search_internal (sp, key, |
| 198 | 0 /* don't need full path */ ); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 199 | |
| 200 | /* Special case: key exists, just replace user_pool_index */ |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 201 | if (PREDICT_FALSE (search_result == CLIB_SLIST_MATCH)) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 202 | { |
| 203 | clib_slist_elt_t *elt; |
| 204 | elt = pool_elt_at_index (sp->elts, sp->path[0]); |
| 205 | elt->user_pool_index = user_pool_index; |
| 206 | return; |
| 207 | } |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 208 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 209 | pool_get (sp->elts, new_elt); |
| 210 | new_elt->n.nexts = 0; |
| 211 | new_elt->user_pool_index = user_pool_index; |
| 212 | |
| 213 | /* sp->path lists elements to the left of key, by level */ |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 214 | for (level = 0; level < vec_len (sp->path); level++) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 215 | { |
| 216 | clib_slist_elt_t *prev_elt_this_level; |
| 217 | u32 prev_elt_next_index_this_level; |
| 218 | |
| 219 | /* Add to list at the current level */ |
| 220 | prev_elt_this_level = pool_elt_at_index (sp->elts, sp->path[level]); |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 221 | prev_elt_next_index_this_level = clib_slist_get_next_at_level |
| 222 | (prev_elt_this_level, level); |
| 223 | |
| 224 | clib_slist_set_next_at_level (new_elt, prev_elt_next_index_this_level, |
| 225 | level); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 226 | |
| 227 | clib_slist_set_next_at_level (prev_elt_this_level, new_elt - sp->elts, |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 228 | level); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 229 | sp->occupancy[level]++; |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 230 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 231 | /* Randomly add to the next-higher level */ |
| 232 | if (random_f64 (&sp->seed) > sp->branching_factor) |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 233 | break; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 234 | } |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 235 | { |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 236 | /* Time to add a new ply? */ |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 237 | clib_slist_elt_t *head_elt = pool_elt_at_index (sp->elts, 0); |
| 238 | int top_level = vec_len (head_elt->n.nexts) - 1; |
| 239 | if (((f64) sp->occupancy[top_level]) * sp->branching_factor > 1.0) |
| 240 | { |
| 241 | vec_add1 (sp->occupancy, 0); |
| 242 | vec_add1 (head_elt->n.nexts, (u32) ~ 0); |
| 243 | /* full match case returns n+1 items */ |
| 244 | vec_validate (sp->path, vec_len (head_elt->n.nexts)); |
| 245 | } |
| 246 | } |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 247 | } |
| 248 | |
| 249 | clib_slist_search_result_t |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 250 | clib_slist_del (clib_slist_t * sp, void *key) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 251 | { |
| 252 | clib_slist_search_result_t search_result; |
| 253 | clib_slist_elt_t *del_elt; |
| 254 | int level; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 255 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 256 | search_result = slist_search_internal (sp, key, 1 /* need full path */ ); |
| 257 | |
| 258 | if (PREDICT_FALSE (search_result == CLIB_SLIST_NO_MATCH)) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 259 | return search_result; |
| 260 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 261 | del_elt = pool_elt_at_index (sp->elts, sp->path[vec_len (sp->path) - 1]); |
| 262 | ASSERT (vec_len (sp->path) > 1); |
| 263 | |
| 264 | for (level = 0; level < vec_len (sp->path) - 1; level++) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 265 | { |
| 266 | clib_slist_elt_t *path_elt; |
| 267 | u32 path_elt_next_index; |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 268 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 269 | path_elt = pool_elt_at_index (sp->elts, sp->path[level]); |
| 270 | path_elt_next_index = clib_slist_get_next_at_level (path_elt, level); |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 271 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 272 | /* Splice the item out of the list if it's adjacent to the victim */ |
| 273 | if (path_elt_next_index == del_elt - sp->elts) |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 274 | { |
| 275 | sp->occupancy[level]--; |
| 276 | path_elt_next_index = clib_slist_get_next_at_level (del_elt, level); |
| 277 | clib_slist_set_next_at_level (path_elt, path_elt_next_index, level); |
| 278 | } |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 279 | } |
| 280 | |
| 281 | /* If this element is on more than two lists it has a vector of nexts */ |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 282 | if (!(del_elt->n.next0[0] & 1)) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 283 | vec_free (del_elt->n.nexts); |
| 284 | pool_put (sp->elts, del_elt); |
| 285 | return CLIB_SLIST_MATCH; |
| 286 | } |
| 287 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 288 | u8 * |
| 289 | format_slist (u8 * s, va_list * args) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 290 | { |
| 291 | clib_slist_t *sl = va_arg (*args, clib_slist_t *); |
| 292 | int verbose = va_arg (*args, int); |
| 293 | int i; |
| 294 | clib_slist_elt_t *head_elt, *elt; |
| 295 | |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 296 | s = format (s, "slist 0x%x, %u items, branching_factor %.2f\n", sl, |
| 297 | sl->occupancy ? sl->occupancy[0] : 0, sl->branching_factor); |
| 298 | |
| 299 | if (pool_elts (sl->elts) == 0) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 300 | return s; |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 301 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 302 | head_elt = pool_elt_at_index (sl->elts, 0); |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 303 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 304 | for (i = 0; i < vec_len (head_elt->n.nexts); i++) |
| 305 | { |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 306 | s = format (s, "level %d: %d elts\n", i, |
| 307 | sl->occupancy ? sl->occupancy[i] : 0); |
| 308 | |
| 309 | if (verbose && head_elt->n.nexts[i] != (u32) ~ 0) |
| 310 | { |
| 311 | elt = pool_elt_at_index (sl->elts, head_elt->n.nexts[i]); |
| 312 | while (elt) |
| 313 | { |
| 314 | u32 next_index; |
| 315 | s = format (s, "%U(%d) ", sl->format_user_element, |
| 316 | elt->user_pool_index, elt - sl->elts); |
| 317 | next_index = clib_slist_get_next_at_level (elt, i); |
| 318 | ASSERT (next_index != 0x7fffffff); |
| 319 | if (next_index == (u32) ~ 0) |
| 320 | break; |
| 321 | else |
| 322 | elt = pool_elt_at_index (sl->elts, next_index); |
| 323 | } |
| 324 | } |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 325 | s = format (s, "\n"); |
| 326 | } |
| 327 | return s; |
| 328 | } |
Dave Barach | c379999 | 2016-08-15 11:12:27 -0400 | [diff] [blame] | 329 | |
| 330 | /* |
| 331 | * fd.io coding-style-patch-verification: ON |
| 332 | * |
| 333 | * Local Variables: |
| 334 | * eval: (c-set-style "gnu") |
| 335 | * End: |
| 336 | */ |