summaryrefslogtreecommitdiffstats
path: root/src/vlib
AgeCommit message (Expand)AuthorFilesLines
2017-04-01Clean up event log merge codeDave Barach1-1/+1
2017-03-31vlib: extend foreach_vlib_main macro to assert if workers are not parkedDamjan Marion2-12/+27
2017-03-28vlib: inline dispatch_node(...) (again)Damjan Marion2-11/+2
2017-03-22vlib: add description field in plugin registrationDamjan Marion2-5/+10
2017-03-22vhost: support interrupt modeSteven1-5/+8
2017-03-20vnet: add device-input threadplacement infraDamjan Marion1-10/+4
2017-03-1764 bit per-thread countersNeale Ranns2-172/+101
2017-03-17vlib: fix potential crash in dispatch_node ELOG_DATA callSteven1-2/+11
2017-03-16vlib: additional runtime_data checksDamjan Marion1-8/+14
2017-03-16vlib: make runtime_data thread-localDamjan Marion5-45/+103
2017-03-15No vector allocation during buffer copyNeale Ranns1-4/+1
2017-03-14vlib: poll pre_input nodes only on main threadDamjan Marion1-6/+7
2017-03-10Retire vpp_liteDamjan Marion1-0/+6
2017-03-10vlib: deduplicatee code in main and worker main loopDamjan Marion4-142/+116
2017-03-09vlib_mains == 0 special cases be goneDave Barach6-55/+65
2017-03-08vlib: add process restart cliDamjan Marion1-0/+20
2017-03-06Add support for unix { coredump-size <size> }.Klement Sekera1-0/+22
2017-03-02Clean up binary api message handler registration issuesDave Barach1-7/+24
2017-03-01VPP-598: tcp stack initial commitDave Barach2-1/+69
2017-03-01Fix buffer template copyDave Barach2-5/+30
2017-02-28vlib: add buffer cloning supportDamjan Marion3-200/+171
2017-02-27vlib: add VLIB_BUFFER_EXT_HDR_VALID flagDamjan Marion1-0/+2
2017-02-26Load plugins in alphabetical orderDave Barach1-9/+55
2017-02-24VPP-650: handle buffer failure in vlib_buffer_copy(...)Dave Barach1-1/+10
2017-02-22VPP-635: CLI Memory leak with invalid parameterBilly McFall3-34/+80
2017-02-22fix trace frame-queue unformat of indexMatus Fabian1-1/+1
2017-02-07VPP-630: Null pointer dereferences in vlib/unix/plugin.cOle Troan1-1/+1
2017-02-06vlib: remove algned/unaligned buffers schemeDamjan Marion4-250/+39
2017-02-05fix some 'stored but never read' warnings raised by clangGabriel Ganne2-6/+7
2017-02-03Plugin infrastructure improvementsDamjan Marion3-60/+318
2017-01-25[re]Enable per-Adjacency/neighbour countersNeale Ranns1-0/+14
2017-01-23binary-api debug CLI works with pluginsDave Barach1-2/+7
2017-01-17dpdk: remove duplicate code in buffers.cDamjan Marion2-52/+69
2017-01-14vlib: add buffer and thread callbacksDamjan Marion9-818/+469
2017-01-07plugin: add API to get pointer to symbol in different pluginDamjan Marion2-7/+26
2017-01-03vlib: merge libvlib_unix.so into libvlib.soDamjan Marion1-1/+1
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion63-0/+29819
format an uninitialized (u8 \*). Format implements a particularly handy user-format scheme via the "%U" format specification. For example: ```c u8 * format_junk (u8 * s, va_list *va) { junk = va_arg (va, u32); s = format (s, "%s", junk); return s; } result = format (0, "junk = %U, format_junk, "This is some junk"); ``` format\_junk() can invoke other user-format functions if desired. The programmer shoulders responsibility for argument type-checking. It is typical for user format functions to blow up if the va\_arg(va, type) macros don't match the caller's idea of reality. Unformat -------- Vppinfra unformat is vaguely related to scanf, but considerably more general. A typical use case involves initializing an unformat\_input\_t from either a C-string or a (u8 \*) vector, then parsing via unformat() as follows: ```c unformat_input_t input; unformat_init_string (&input, "<some-C-string>"); /* or */ unformat_init_vector (&input, <u8-vector>); ``` Then loop parsing individual elements: ```c while (unformat_check_input (&input) != UNFORMAT_END_OF_INPUT) { if (unformat (&input, "value1 %d", &value1)) ;/* unformat sets value1 */ else if (unformat (&input, "value2 %d", &value2) ;/* unformat sets value2 */ else return clib_error_return (0, "unknown input '%U'", format_unformat_error, input); } ``` As with format, unformat implements a user-unformat function capability via a "%U" user unformat function scheme. Vppinfra errors and warnings ---------------------------- Many functions within the vpp dataplane have return-values of type clib\_error\_t \*. Clib\_error\_t's are arbitrary strings with a bit of metadata \[fatal, warning\] and are easy to announce. Returning a NULL clib\_error\_t \* indicates "A-OK, no error." Clib\_warning(format-args) is a handy way to add debugging output; clib warnings prepend function:line info to unambiguously locate the message source. Clib\_unix\_warning() adds perror()-style Linux system-call information. In production images, clib\_warnings result in syslog entries. Serialization ------------- Vppinfra serialization support allows the programmer to easily serialize and unserialize complex data structures. The underlying primitive serialize/unserialize functions use network byte-order, so there are no structural issues serializing on a little-endian host and unserializing on a big-endian host.