summaryrefslogtreecommitdiffstats
path: root/src/vlib
AgeCommit message (Expand)AuthorFilesLines
2018-05-31fix missing void pointer explicit type castZhiyong Yang1-1/+1
2018-05-31Add src/vlib/config.h.in templateDamjan Marion1-0/+21
2018-05-29Add VLIB_NODE_FN() macro to simplify multiversioning of node functionsDamjan Marion2-0/+48
2018-05-29Fixed vlib_buffer_clone with stale chained buffersYoann Desmouceaux1-2/+7
2018-05-19log: Validate the size of vec in vlib_logMohsin Kazmi1-0/+1
2018-05-19Disable vector code in vlib_buffer_enqueue_to_next if no msb mask functionDamjan Marion1-1/+1
2018-05-18Add vlib_buffer_enqueue_to_next inline functionDamjan Marion1-0/+115
2018-05-18session: add session process nodeFlorin Coras1-1/+3
2018-05-17Add buffer pointer-to-index and index-to-pointer array functionsDamjan Marion1-0/+143
2018-05-17vlib: Fix WARN-ING macro in functionMohsin Kazmi1-1/+1
2018-05-04Harmonize vec/pool_get_aligned object sizes and alignment requestsDave Barach1-0/+1
2018-04-27A bit of buffer metadata reshuffling to accommodate flow_idDamjan Marion2-19/+12
2018-04-26vlib: set log tap level <level> does not work for some keywordsSteven1-2/+2
2018-04-18vlib: logging improvementsDamjan Marion2-32/+74
2018-04-17Add logging supportDamjan Marion3-0/+737
2018-04-12Fixes for 'make UNATTENDED=yes CC=clang CXX=clang verify'Neale Ranns1-1/+2
2018-04-09features: don't break linked list, create separate one for arcDamjan Marion1-9/+11
2018-04-09plugins: unload plugin if early init failsDamjan Marion8-2/+111
2018-04-04memif: zero copy slaveDamjan Marion1-0/+24
2018-03-29Coverity fixes (VPP-1204)Chris Luke1-1/+2
2018-03-27vlib: gcc-7 -O3 uninitialized valuesDamjan Marion1-5/+5
2018-03-27vlib: make cloned structures cacheline alignedDamjan Marion2-13/+24
2018-03-26vlib: add support for vfio no-iommu modeDamjan Marion4-33/+51
2018-03-26plugin: Add plugin 'default' disable/enableMohsin Kazmi2-0/+11
2018-03-16cli: make q work againFlorin Coras1-0/+8
2018-03-16Fix a long-latent bi=0 bug in vlib_buffer_add_dataDave Barach2-2/+2
2018-03-14vlib: internal buffer manager reworkDamjan Marion6-251/+170
2018-03-13Rationalize plugin symbol error reportingDave Barach1-1/+1
2018-03-09Correct address calculation for VPP-1168Lee Roberts1-1/+1
2018-03-09dpdk: move DPDK vfio hack to dpdk pluginDamjan Marion3-48/+3
2018-03-07fix physmem mappingsDamjan Marion1-0/+2
2018-03-06vlib: avoid crash if fill_free_list returns 0 buffersDamjan Marion1-1/+2
2018-03-05physmem: keep only one physmem_mainDamjan Marion6-9/+10
2018-03-05vlib: add functions to dynamically open/close PCI deviceDamjan Marion2-3/+126
2018-03-05vlib: vlib_buffer_free_internal optimizationsDamjan Marion1-53/+88
2018-03-05vlib: vfio code reworkDamjan Marion8-221/+406
2018-03-05vlib: rework PCI INTx supportDamjan Marion2-96/+75
2018-03-04vlib: add PCI MSI-X interrupt support (vfio only)Damjan Marion2-6/+197
2018-03-04vlib: map pci region by using vfio FD when vfio is usedDamjan Marion2-46/+88
2018-03-04vlib: fix vlib_pci_get_device_info on when not running as rootDamjan Marion1-4/+2
2018-02-26vlib: use vfio fd for accessing PCI config spaceDamjan Marion1-32/+29
2018-02-26vlib: add vlib_buffer_free_from_ringDamjan Marion1-0/+26
2018-02-26vlib: fix formatting in pci_config.hDamjan Marion1-103/+111
2018-02-18vlib: fix pci initDamjan Marion1-2/+1
2018-02-07Refactor vlib_buffer flagsDamjan Marion3-108/+119
2018-02-06vlib: epoll on worker threadsDamjan Marion3-41/+158
2018-02-05Fix ip4/6_reass_main.ip4/6_reass_expire_node_idx used before setDave Barach1-0/+2
2018-02-02vlib_buffer_clone: allow client to request the maximum number of clones; 256Neale Ranns1-12/+50
2018-02-01IPv4/6 reassemblyKlement Sekera1-0/+62
2018-01-31vlib: allocating buffers on thread-x and freeing them on thread-y causesSteven2-11/+10
p">} static void fake_install (char *chroot_path, u8 *add_value) { svmdb_client_t *c; u8 *v = 0; u8 **values = 0; u8 *oldvalue; u8 *value; int nitems = 0, i; serialize_main_t m; c = svmdb_map_chroot(chroot_path); oldvalue = svmdb_local_get_vec_variable (c, "installed_sw", 1); if (oldvalue) { unserialize_open_data (&m, oldvalue, vec_len (oldvalue)); nitems = unserialize_likely_small_unsigned_integer (&m); for (i = 0; i < nitems; i++) { unserialize_cstring (&m, (char **)&value); vec_add1 (values, value); } vec_free (v); } nitems++; value = format (0, "%s%c", add_value, 0); vec_add1 (values, value); fformat (stdout, "Resulting installed_sw vector:\n"); serialize_open_vector (&m, v); serialize_likely_small_unsigned_integer (&m, vec_len (values)); for (i = 0; i < vec_len (values); i++) { fformat (stdout, "%s\n", values[i]); serialize_cstring (&m, (char *)values[i]); } v = serialize_close_vector (&m); svmdb_local_set_vec_variable (c, "installed_sw", v, sizeof (v[0])); svmdb_unmap (c); for (i = 0; i < vec_len (values); i++) vec_free (values[i]); vec_free (values); } static void sigaction_handler (int signum, siginfo_t *i, void *notused) { u32 action, opaque; action = (u32)(uword) i->si_ptr; action >>= 28; opaque = (u32)(uword) i->si_ptr; opaque &= ~(0xF0000000); clib_warning ("signal %d, action %d, opaque %x", signum, action, opaque); } static void test_reg (char *chroot_path, u8 *vbl) { svmdb_client_t *c; svmdb_notification_args_t args; svmdb_notification_args_t *a = &args; struct sigaction sa; memset (&sa, 0, sizeof (sa)); sa.sa_sigaction = sigaction_handler; sa.sa_flags = SA_SIGINFO; if (sigaction (SIGUSR2, &sa, 0) < 0) { clib_unix_warning ("sigaction"); return; } memset (a, 0, sizeof (*a)); c = svmdb_map_chroot(chroot_path); a->add_del = 1 /* add */; a->nspace = SVMDB_NAMESPACE_STRING; a->var = (char *) vbl; a->elsize = 1; a->signum = SIGUSR2; a->action = SVMDB_ACTION_GET; a->opaque = 0x0eadbeef; svmdb_local_add_del_notification (c, a); (void) svmdb_local_get_string_variable (c, (char *)vbl); a->add_del = 0; /* del */ svmdb_local_add_del_notification (c, a); svmdb_unmap (c); } static void unset_vec (char *chroot_path, u8 *vbl) { svmdb_client_t *c; c = svmdb_map_chroot(chroot_path); svmdb_local_unset_vec_variable (c, (char *)vbl); svmdb_unmap (c); } static void dump_vecs(char *chroot_path) { svmdb_client_t *c; c = svmdb_map_chroot(chroot_path); svmdb_local_dump_vecs (c); svmdb_unmap (c); } static void crash_test(char *chroot_path) { svmdb_client_t *c; c = svmdb_map_chroot(chroot_path); clib_warning ("Grab region mutex and crash deliberately!"); c->db_rp->mutex_owner_pid = getpid(); c->db_rp->mutex_owner_tag = -13; pthread_mutex_lock(&c->db_rp->mutex); abort(); } static void map_with_size (char *chroot_path, uword size) { svmdb_client_t *c; c = svmdb_map_chroot_size (chroot_path, size); svmdb_unmap (c); } int main (int argc, char **argv) { unformat_input_t input; int parsed =0; u8 *vbl=0, *value=0; char *chroot_path = 0; u8 *chroot_path_u8; uword size; f64 vr; unformat_init_command_line (&input, argv); while (unformat_check_input (&input) != UNFORMAT_END_OF_INPUT) { if (unformat (&input, "get-string %s", &vbl)) { get_string (chroot_path, vbl); vec_free(vbl); parsed++; } else if (unformat (&input, "set-string %s %s", &vbl, &value)) { set_string (chroot_path, vbl, value); vec_free(vbl); vec_free(value); parsed++; } else if (unformat(&input, "unset-string %s", &vbl)) { unset_string (chroot_path, vbl); vec_free(vbl); parsed++; } else if (unformat(&input, "dump-strings")) { dump_strings(chroot_path); parsed++; } else if (unformat(&input, "unset-vec %s", &vbl)) { unset_vec (chroot_path, vbl); vec_free(vbl); parsed++; } else if (unformat(&input, "dump-vecs")) { dump_vecs(chroot_path); parsed++; } else if (unformat (&input, "test-vec %s", &vbl)) { test_vec(chroot_path, vbl); // vec_free(vbl); parsed++; } else if (unformat (&input, "vlib-vec-rate %f", &vr)) { test_vlib_vec_rate(chroot_path, vr); parsed++; } else if (unformat (&input, "test-reg %s", &vbl)) { test_reg(chroot_path, vbl); parsed++; } else if (unformat (&input, "crash-test")) { crash_test (chroot_path); } else if (unformat (&input, "chroot %s", &chroot_path_u8)) { chroot_path = (char *) chroot_path_u8; } else if (unformat (&input, "fake-install %s", &value)) { fake_install (chroot_path, value); parsed++; } else if (unformat (&input, "size %d", &size)) { map_with_size (chroot_path, size); parsed++; } else { break; } } unformat_free (&input); if (!parsed) { fformat(stdout, "%s: get-string <name> | set-string <name> <value>\n", argv[0]); fformat(stdout, " unset-string <name> | dump-strings\n"); fformat(stdout, " test-vec <name> |\n"); fformat(stdout, " unset-vec <name> | dump-vecs\n"); } exit (0); }