aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/ila
AgeCommit message (Collapse)AuthorFilesLines
2021-12-03fib: Fix the display (or lack of) for fib node types in dependent children listsNeale Ranns1-1/+1
Type: fix When registering a new FIB node type, no name was required on the API, and so no name was printed. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I8a99cf29c194637a550061b0a5e9782ffe8b31dd
2021-10-14misc: fix coverity warning in ila pluginKlement Sekera1-1/+1
Remove non-null check for a pointer which cannot be null to avoid dead code warning. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I5ff40a4f80db7bb0dff9928c90ff757b763902fd
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-3/+3
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-12-04fib: Decouple source from priority and behaviourNeale Ranns1-3/+10
Type: feature the fib_source_t enum alone no longer defines the priority and behaviour, instead each source must be allocated these attributes. This allows the creation of other sources by the plugins (and soon over the API). Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I890ee820fbc16079ee417ea1fbc163192806e853
2019-09-25fib: fix some typos in fib/mtrieLijian.Zhang1-1/+1
Type: fix Change-Id: I1af0e4a9bc23a3b6b6d3a74df093801ab6cae1f8 Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-05-03plugins: clean up plugin descriptionsDave Wallace1-1/+1
- Make plugin descriptions more consistent so the output of "show plugin" can be used in the wiki. Change-Id: I4c6feb11e7dcc5a4cf0848eed37f1d3b035c7dda Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-08-27cmake: Fix plugins .h includesMohsin Kazmi1-1/+7
Change-Id: I90600d000afb02e8969f3c01bcf9e4b5c10a7d39 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-25cmake: improve add_vpp_plugin macroDamjan Marion1-1/+1
Change-Id: Iffd5c45ab242a919592a1f686f7f880936b68a1a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+15
Change-Id: Ibc59323e849810531dd0963e85493efad3b86857 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-19Remove unused argument to vlib_feature_nextDamjan Marion1-3/+3
Change-Id: Ieb8b53977fc8484c19780941e232ee072b667de3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-13Remove unsed parameter from fib_table_entry_special_add() (only used in FIB ↵Neale Ranns1-2/+1
tests). The DPO was incorrectly initialised with FIB_PROTO_MAX Change-Id: I962df9e162e4dfb6837a5ce79ea795d5ff2d7315 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-03-22vlib: add description field in plugin registrationDamjan Marion1-0/+1
Change-Id: I88b322a5d602f3d6d3310e971479180a89430e0e Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-02-22VPP-635: CLI Memory leak with invalid parameterBilly McFall1-7/+18
In the CLI parsing, below is a common pattern: /* Get a line of input. */ if (!unformat_user (input, unformat_line_input, line_input)) return 0; while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT) { if (unformat (line_input, "x")) x = 1; : else return clib_error_return (0, "unknown input `%U'", format_unformat_error, line_input); } unformat_free (line_input); The 'else' returns if an unknown string is encountered. There a memory leak because the 'unformat_free(line_input)' is not called. There is a large number of instances of this pattern. Replaced the previous pattern with: /* Get a line of input. */ if (!unformat_user (input, unformat_line_input, line_input)) return 0; while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT) { if (unformat (line_input, "x")) x = 1; : else { error = clib_error_return (0, "unknown input `%U'", format_unformat_error, line_input); goto done: } } /* ...Remaining code... */ done: unformat_free (line_input); return error; } In multiple files, 'unformat_free (line_input);' was never called, so there was a memory leak whether an invalid string was entered or not. Also, there were multiple instance where: error = clib_error_return (0, "unknown input `%U'", format_unformat_error, line_input); used 'input' as the last parameter instead of 'line_input'. The result is that output did not contain the substring in error, instead just an empty string. Fixed all of those as well. There are a lot of file, and very mind numbing work, so tried to keep it to a pattern to avoid mistakes. Change-Id: I8902f0c32a47dd7fb3bb3471a89818571702f1d2 Signed-off-by: Billy McFall <bmcfall@redhat.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-03Plugin infrastructure improvementsDamjan Marion1-8/+6
This patch replaces requirement for vlib_plugin_register function in the plugin so file and introduces new macro: VLIB_PLUGIN_REGISTER () = { .version = "version string", .version_required = "requred version", .default_disabled = 1, .early_init = "early_init_function_name", }; Plugin will nor be loaded if .default_disabled is set to 1 unless explicitely enabled in startup.conf. If .verstion_required is set, plugin will not be loaded if there is version mismatch between plugin and vpp. This can be bypassed by setting "skip-version-check" for specific plugin. If .early-init string is present, plugin loader will try to resolve this specific symbol in the plugin namespace and make a function call. Following startup.conf configuration is added: plugins { path /path/to/plugin/directory plugin ila_plugin.so { enable skip-version-check } plugin acl_plugin.so { disable } } Change-Id: I706c691dd34d94ffe9e02b59831af8859a95f061 Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion2-0/+1186
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
t">void ipsec4_tunnel_extract_key (const ipsec4_tunnel_kv_t * k, ip4_address_t * ip, u32 * spi) { *spi = (u32) k->key; (*ip).as_u32 = k->key >> 32; } typedef struct ipsec6_tunnel_kv_t_ { /* * Key fields: remote ip and spi on incoming packet * all fields in NET byte order */ struct { ip6_address_t remote_ip; u32 spi; u32 __pad; } key; ipsec_tun_lkup_result_t value; } __clib_packed ipsec6_tunnel_kv_t; STATIC_ASSERT_SIZEOF (ipsec6_tunnel_kv_t, sizeof (clib_bihash_kv_24_16_t)); STATIC_ASSERT_OFFSET_OF (ipsec6_tunnel_kv_t, value, STRUCT_OFFSET_OF (clib_bihash_kv_24_16_t, value)); extern u8 *format_ipsec4_tunnel_kv (u8 * s, va_list * args); extern u8 *format_ipsec6_tunnel_kv (u8 * s, va_list * args); typedef struct ipsec_ep_t_ { ip46_address_t src; ip46_address_t dst; } ipsec_ep_t; #define ITP_MAX_N_SA_IN 4 typedef struct ipsec_tun_protect_t_ { CLIB_CACHE_LINE_ALIGN_MARK (cacheline0); index_t itp_out_sa; /* not using a vector since we want the memory inline * with this struct */ u32 itp_n_sa_in; index_t itp_in_sas[ITP_MAX_N_SA_IN]; u32 itp_sw_if_index; ipsec_ep_t itp_crypto; ipsec_protect_flags_t itp_flags; adj_index_t itp_ai; ipsec_ep_t itp_tun; ip_address_t *itp_key; } ipsec_tun_protect_t; #define FOR_EACH_IPSEC_PROTECT_INPUT_SAI(_itp, _sai, body) \ { \ u32 __ii; \ for (__ii = 0; __ii < _itp->itp_n_sa_in; __ii++) { \ _sai = itp->itp_in_sas[__ii]; \ body; \ } \ } #define FOR_EACH_IPSEC_PROTECT_INPUT_SA(_itp, _sa, body) \ { \ u32 __ii; \ for (__ii = 0; __ii < _itp->itp_n_sa_in; __ii++) { \ _sa = ipsec_sa_get(itp->itp_in_sas[__ii]); \ body; \ } \ } extern int ipsec_tun_protect_update (u32 sw_if_index, const ip_address_t * nh, u32 sa_out, u32 * sa_ins); extern int ipsec_tun_protect_del (u32 sw_if_index, const ip_address_t * nh); typedef walk_rc_t (*ipsec_tun_protect_walk_cb_t) (index_t itpi, void *arg); extern void ipsec_tun_protect_walk (ipsec_tun_protect_walk_cb_t fn, void *cttx); extern void ipsec_tun_protect_walk_itf (u32 sw_if_index, ipsec_tun_protect_walk_cb_t fn, void *cttx); extern u8 *format_ipsec_tun_protect (u8 * s, va_list * args); extern u8 *format_ipsec_tun_protect_index (u8 * s, va_list * args); extern void ipsec_tun_register_nodes (ip_address_family_t af); extern void ipsec_tun_unregister_nodes (ip_address_family_t af); extern void ipsec_tun_table_init (ip_address_family_t af, uword table_size, u32 n_buckets); /* * DP API */ extern ipsec_tun_protect_t *ipsec_tun_protect_pool; always_inline ipsec_tun_protect_t * ipsec_tun_protect_get (u32 index) { return (pool_elt_at_index (ipsec_tun_protect_pool, index)); } extern index_t *ipsec_tun_protect_sa_by_adj_index; always_inline index_t ipsec_tun_protect_get_sa_out (adj_index_t ai) { ASSERT (vec_len (ipsec_tun_protect_sa_by_adj_index) > ai); return (ipsec_tun_protect_sa_by_adj_index[ai]); } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */