Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015 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 | */ |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 15 | /** |
| 16 | * @file |
| 17 | * @brief Host utility functions |
| 18 | */ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 19 | #include <vppinfra/format.h> |
| 20 | #include <vlib/vlib.h> |
| 21 | |
| 22 | #include <vlib/threads.h> |
Dave Barach | acd2a6a | 2017-05-16 17:41:34 -0400 | [diff] [blame] | 23 | #include <vnet/vnet.h> |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 24 | #include <vppinfra/format.h> |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 25 | |
| 26 | /** |
| 27 | * @brief GDB callable function: vl - Return vector length of vector |
| 28 | * |
| 29 | * @param *p - void - address of vector |
| 30 | * |
| 31 | * @return length - u32 |
| 32 | * |
| 33 | */ |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 34 | u32 |
| 35 | vl (void *p) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 36 | { |
| 37 | return vec_len (p); |
| 38 | } |
| 39 | |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 40 | /** |
Dave Barach | a690fdb | 2020-01-21 12:34:55 -0500 | [diff] [blame] | 41 | * @brief GDB callable function: pvh - Return vector header of vector |
| 42 | * |
| 43 | * @param *p - void - address of vector |
| 44 | * |
| 45 | * @return vh - vec_header_t, the vector header |
| 46 | * |
| 47 | */ |
| 48 | vec_header_t * |
| 49 | pvh (void *p) |
| 50 | { |
| 51 | return _vec_find (p); |
| 52 | } |
| 53 | |
| 54 | |
| 55 | /** |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 56 | * @brief GDB callable function: pe - call pool_elts - number of elements in a pool |
| 57 | * |
| 58 | * @param *v - void - address of pool |
| 59 | * |
| 60 | * @return number - uword |
| 61 | * |
| 62 | */ |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 63 | uword |
| 64 | pe (void *v) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 65 | { |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 66 | return (pool_elts (v)); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 67 | } |
| 68 | |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 69 | /** |
| 70 | * @brief GDB callable function: pifi - call pool_is_free_index - is passed index free? |
| 71 | * |
| 72 | * @param *p - void - address of pool |
| 73 | * @param *index - u32 |
| 74 | * |
| 75 | * @return 0|1 - int |
| 76 | * |
| 77 | */ |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 78 | int |
| 79 | pifi (void *p, u32 index) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 80 | { |
| 81 | return pool_is_free_index (p, index); |
| 82 | } |
| 83 | |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 84 | /** |
| 85 | * @brief GDB callable function: debug_hex_bytes - return formatted hex string |
| 86 | * |
| 87 | * @param *s - u8 |
| 88 | * @param n - u32 - number of bytes to format |
| 89 | * |
| 90 | */ |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 91 | void |
| 92 | debug_hex_bytes (u8 * s, u32 n) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 93 | { |
| 94 | fformat (stderr, "%U\n", format_hex_bytes, s, n); |
| 95 | } |
| 96 | |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 97 | /** |
| 98 | * @brief GDB callable function: vlib_dump_frame_ownership |
| 99 | * |
| 100 | */ |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 101 | void |
| 102 | vlib_dump_frame_ownership (void) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 103 | { |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 104 | vlib_main_t *vm = vlib_get_main (); |
| 105 | vlib_node_main_t *nm = &vm->node_main; |
| 106 | vlib_node_runtime_t *this_node_runtime; |
| 107 | vlib_next_frame_t *nf; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 108 | u32 first_nf_index; |
| 109 | u32 index; |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 110 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 111 | vec_foreach (this_node_runtime, nm->nodes_by_type[VLIB_NODE_TYPE_INTERNAL]) |
| 112 | { |
| 113 | first_nf_index = this_node_runtime->next_frame_index; |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 114 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 115 | for (index = first_nf_index; index < first_nf_index + |
| 116 | this_node_runtime->n_next_nodes; index++) |
| 117 | { |
| 118 | vlib_node_runtime_t *owned_runtime; |
| 119 | nf = vec_elt_at_index (vm->node_main.next_frames, index); |
| 120 | if (nf->flags & VLIB_FRAME_OWNER) |
| 121 | { |
| 122 | owned_runtime = vec_elt_at_index (nm->nodes_by_type[0], |
| 123 | nf->node_runtime_index); |
| 124 | fformat (stderr, |
| 125 | "%s next index %d owns enqueue rights to %s\n", |
| 126 | nm->nodes[this_node_runtime->node_index]->name, |
| 127 | index - first_nf_index, |
| 128 | nm->nodes[owned_runtime->node_index]->name); |
Andreas Schultz | 58b2eb1 | 2019-07-15 15:40:56 +0200 | [diff] [blame] | 129 | fformat (stderr, " nf index %d nf->frame %p\n", |
| 130 | nf - vm->node_main.next_frames, nf->frame); |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 131 | } |
| 132 | } |
| 133 | } |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 134 | } |
| 135 | |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 136 | /** |
| 137 | * @brief GDB callable function: vlib_runtime_index_to_node_name |
| 138 | * |
| 139 | * Takes node index and will return the node name. |
| 140 | * |
| 141 | * @param index - u32 |
| 142 | */ |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 143 | void |
| 144 | vlib_runtime_index_to_node_name (u32 index) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 145 | { |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 146 | vlib_main_t *vm = vlib_get_main (); |
| 147 | vlib_node_main_t *nm = &vm->node_main; |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 148 | |
Eyal Bari | cd30774 | 2018-07-22 12:45:15 +0300 | [diff] [blame] | 149 | if (index >= vec_len (nm->nodes)) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 150 | { |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 151 | fformat (stderr, "%d out of range, max %d\n", vec_len (nm->nodes)); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 152 | return; |
| 153 | } |
| 154 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 155 | fformat (stderr, "node runtime index %d name %s\n", index, |
| 156 | nm->nodes[index]->name); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 157 | } |
| 158 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 159 | void |
| 160 | gdb_show_errors (int verbose) |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 161 | { |
| 162 | extern vlib_cli_command_t vlib_cli_show_errors; |
| 163 | unformat_input_t input; |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 164 | vlib_main_t *vm = vlib_get_main (); |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 165 | |
| 166 | if (verbose == 0) |
| 167 | unformat_init_string (&input, "verbose 0", 9); |
| 168 | else if (verbose == 1) |
| 169 | unformat_init_string (&input, "verbose 1", 9); |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 170 | else |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 171 | { |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 172 | fformat (stderr, "verbose not 0 or 1\n"); |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 173 | return; |
| 174 | } |
| 175 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 176 | vlib_cli_show_errors.function (vm, &input, 0 /* cmd */ ); |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 177 | unformat_free (&input); |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 178 | } |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 179 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 180 | void |
| 181 | gdb_show_session (int verbose) |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 182 | { |
| 183 | extern vlib_cli_command_t vlib_cli_show_session_command; |
| 184 | unformat_input_t input; |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 185 | vlib_main_t *vm = vlib_get_main (); |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 186 | |
| 187 | if (verbose == 0) |
| 188 | unformat_init_string (&input, "verbose 0", 9); |
| 189 | else if (verbose == 1) |
| 190 | unformat_init_string (&input, "verbose 1", 9); |
| 191 | else if (verbose == 2) |
| 192 | unformat_init_string (&input, "verbose 2", 9); |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 193 | else |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 194 | { |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 195 | fformat (stderr, "verbose not 0 - 2\n"); |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 196 | return; |
| 197 | } |
| 198 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 199 | vlib_cli_show_session_command.function (vm, &input, 0 /* cmd */ ); |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 200 | unformat_free (&input); |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 201 | } |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 202 | |
Kingwel Xie | 3543908 | 2019-03-05 05:06:48 -0500 | [diff] [blame] | 203 | static int |
| 204 | trace_cmp (void *a1, void *a2) |
| 205 | { |
| 206 | vlib_trace_header_t **t1 = a1; |
| 207 | vlib_trace_header_t **t2 = a2; |
| 208 | i64 dt = t1[0]->time - t2[0]->time; |
| 209 | return dt < 0 ? -1 : (dt > 0 ? +1 : 0); |
| 210 | } |
| 211 | |
| 212 | void |
| 213 | gdb_show_traces () |
| 214 | { |
| 215 | vlib_trace_main_t *tm; |
| 216 | vlib_trace_header_t **h, **traces; |
| 217 | u32 i, index = 0; |
| 218 | char *fmt; |
| 219 | u8 *s = 0; |
| 220 | u32 max; |
| 221 | |
| 222 | /* By default display only this many traces. */ |
| 223 | max = 50; |
| 224 | |
| 225 | /* Get active traces from pool. */ |
| 226 | |
| 227 | /* *INDENT-OFF* */ |
| 228 | foreach_vlib_main ( |
| 229 | ({ |
| 230 | fmt = "------------------- Start of thread %d %s -------------------\n"; |
| 231 | s = format (s, fmt, index, vlib_worker_threads[index].name); |
| 232 | |
| 233 | tm = &this_vlib_main->trace_main; |
| 234 | |
| 235 | trace_apply_filter(this_vlib_main); |
| 236 | |
| 237 | traces = 0; |
| 238 | pool_foreach (h, tm->trace_buffer_pool, |
| 239 | ({ |
| 240 | vec_add1 (traces, h[0]); |
| 241 | })); |
| 242 | |
| 243 | if (vec_len (traces) == 0) |
| 244 | { |
| 245 | s = format (s, "No packets in trace buffer\n"); |
| 246 | goto done; |
| 247 | } |
| 248 | |
| 249 | /* Sort them by increasing time. */ |
| 250 | vec_sort_with_function (traces, trace_cmp); |
| 251 | |
| 252 | for (i = 0; i < vec_len (traces); i++) |
| 253 | { |
| 254 | if (i == max) |
| 255 | { |
| 256 | fformat (stderr, "Limiting display to %d packets." |
| 257 | " To display more specify max.", max); |
| 258 | goto done; |
| 259 | } |
| 260 | |
| 261 | s = format (s, "Packet %d\n%U\n\n", i + 1, |
| 262 | format_vlib_trace, vlib_mains[0], traces[i]); |
| 263 | } |
| 264 | |
| 265 | done: |
| 266 | vec_free (traces); |
| 267 | |
| 268 | index++; |
| 269 | })); |
| 270 | /* *INDENT-ON* */ |
| 271 | |
| 272 | fformat (stderr, "%v", s); |
| 273 | vec_free (s); |
| 274 | } |
| 275 | |
Keith Burns (alagalah) | 07203af | 2016-08-25 13:37:37 -0700 | [diff] [blame] | 276 | /** |
| 277 | * @brief GDB callable function: show_gdb_command_fn - show gdb |
| 278 | * |
| 279 | * Shows list of functions for VPP available in GDB |
| 280 | * |
| 281 | * @return error - clib_error_t |
| 282 | */ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 283 | static clib_error_t * |
| 284 | show_gdb_command_fn (vlib_main_t * vm, |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 285 | unformat_input_t * input, vlib_cli_command_t * cmd) |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 286 | { |
| 287 | vlib_cli_output (vm, "vl(p) returns vec_len(p)"); |
Dave Barach | 7bee773 | 2017-10-18 18:48:11 -0400 | [diff] [blame] | 288 | vlib_cli_output (vm, "vb(b) returns vnet_buffer(b) [opaque]"); |
| 289 | vlib_cli_output (vm, "vb2(b) returns vnet_buffer2(b) [opaque2]"); |
Benoît Ganne | 2b65f9c | 2019-11-21 16:53:31 +0100 | [diff] [blame] | 290 | vlib_cli_output (vm, "vbi(b) returns b index"); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 291 | vlib_cli_output (vm, "pe(p) returns pool_elts(p)"); |
| 292 | vlib_cli_output (vm, "pifi(p, i) returns pool_is_free_index(p, i)"); |
Florin Coras | 66b1131 | 2017-07-31 17:18:03 -0700 | [diff] [blame] | 293 | vlib_cli_output (vm, "gdb_show_errors(0|1) dumps error counters"); |
| 294 | vlib_cli_output (vm, "gdb_show_session dumps session counters"); |
Kingwel Xie | 3543908 | 2019-03-05 05:06:48 -0500 | [diff] [blame] | 295 | vlib_cli_output (vm, "gdb_show_traces() dumps buffer traces"); |
Benoît Ganne | 2b65f9c | 2019-11-21 16:53:31 +0100 | [diff] [blame] | 296 | vlib_cli_output (vm, "gdb_validate_buffer(b) check vlib_buffer b sanity"); |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 297 | vlib_cli_output (vm, "debug_hex_bytes (ptr, n_bytes) dumps n_bytes in hex"); |
| 298 | vlib_cli_output (vm, "vlib_dump_frame_ownership() does what it says"); |
| 299 | vlib_cli_output (vm, "vlib_runtime_index_to_node_name (index) prints NN"); |
| 300 | |
| 301 | return 0; |
| 302 | } |
| 303 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 304 | /* *INDENT-OFF* */ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 305 | VLIB_CLI_COMMAND (show_gdb_funcs_command, static) = { |
| 306 | .path = "show gdb", |
| 307 | .short_help = "Describe functions which can be called from gdb", |
| 308 | .function = show_gdb_command_fn, |
| 309 | }; |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 310 | /* *INDENT-ON* */ |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 311 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 312 | vnet_buffer_opaque_t * |
| 313 | vb (void *vb_arg) |
Dave Barach | acd2a6a | 2017-05-16 17:41:34 -0400 | [diff] [blame] | 314 | { |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 315 | vlib_buffer_t *b = (vlib_buffer_t *) vb_arg; |
| 316 | vnet_buffer_opaque_t *rv; |
Dave Barach | acd2a6a | 2017-05-16 17:41:34 -0400 | [diff] [blame] | 317 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 318 | rv = vnet_buffer (b); |
| 319 | |
| 320 | return rv; |
Dave Barach | acd2a6a | 2017-05-16 17:41:34 -0400 | [diff] [blame] | 321 | } |
| 322 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 323 | vnet_buffer_opaque2_t * |
| 324 | vb2 (void *vb_arg) |
Dave Barach | 7bee773 | 2017-10-18 18:48:11 -0400 | [diff] [blame] | 325 | { |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 326 | vlib_buffer_t *b = (vlib_buffer_t *) vb_arg; |
| 327 | vnet_buffer_opaque2_t *rv; |
Dave Barach | 7bee773 | 2017-10-18 18:48:11 -0400 | [diff] [blame] | 328 | |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 329 | rv = vnet_buffer2 (b); |
| 330 | |
| 331 | return rv; |
Dave Barach | 7bee773 | 2017-10-18 18:48:11 -0400 | [diff] [blame] | 332 | } |
| 333 | |
Benoît Ganne | 2b65f9c | 2019-11-21 16:53:31 +0100 | [diff] [blame] | 334 | u32 |
| 335 | vbi (vlib_buffer_t * b) |
| 336 | { |
| 337 | vlib_main_t *vm = vlib_get_main (); |
| 338 | vlib_buffer_main_t *bm = vm->buffer_main; |
| 339 | u32 bi = pointer_to_uword (b) - bm->buffer_mem_start; |
| 340 | bi >>= CLIB_LOG2_CACHE_LINE_BYTES; |
| 341 | return bi; |
| 342 | } |
| 343 | |
| 344 | int |
| 345 | gdb_validate_buffer (vlib_buffer_t * b) |
| 346 | { |
| 347 | vlib_main_t *vm = vlib_get_main (); |
| 348 | u32 bi = vbi (b); |
| 349 | u8 *s = |
| 350 | vlib_validate_buffers (vm, &bi, 0, 1, VLIB_BUFFER_KNOWN_ALLOCATED, 1); |
| 351 | if (s) |
| 352 | { |
| 353 | fformat (stderr, "gdb_validate_buffer(): %v", s); |
| 354 | return -1; |
| 355 | } |
| 356 | fformat (stderr, "gdb_validate_buffer(): no error found\n"); |
| 357 | return 0; |
| 358 | } |
Dave Barach | 7bee773 | 2017-10-18 18:48:11 -0400 | [diff] [blame] | 359 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 360 | /* Cafeteria plan, maybe you don't want these functions */ |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 361 | clib_error_t * |
| 362 | gdb_func_init (vlib_main_t * vm) |
| 363 | { |
| 364 | return 0; |
| 365 | } |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 366 | |
| 367 | VLIB_INIT_FUNCTION (gdb_func_init); |
sharath reddy | 1b0c983 | 2017-11-29 20:08:11 +0530 | [diff] [blame] | 368 | |
| 369 | /* |
| 370 | * fd.io coding-style-patch-verification: ON |
| 371 | * |
| 372 | * Local Variables: |
| 373 | * eval: (c-set-style "gnu") |
| 374 | * End: |
| 375 | */ |