summaryrefslogtreecommitdiffstats
path: root/src/vlib
AgeCommit message (Collapse)AuthorFilesLines
2018-11-20vlib: reset frame flags when frame is reusedDamjan Marion1-0/+1
Change-Id: I8f4843e7a961a1e6c3fd057554b31ae49fc9b328 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-20vlib: add vlib_buffer_enqueue_to_single_next(...) functionDamjan Marion1-0/+35
Change-Id: I485dd07ea0fe032bdd5990567578e73e9bcffe1e Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-20dhcp4:(VPP-1483) linearize chained packets before handlingEyal Bari2-1/+65
dhcp packets might (when flooded) arrive in chains of cloned buffers Change-Id: Ifddecd656b6a5d6ba8cd94184f5c021684e35548 Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-11-18add vlib_prefetch_buffer_data(...) macroDamjan Marion1-0/+2
Change-Id: Iba750a41262cc028ad0363fff78cc219e4a33538 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-17pcap-based dispatch tracerDave Barach3-2/+311
To facilitate dispatch trajectory tracing, vlib_buffer_t decoding, etc. through Wireshark Change-Id: I31356b9fa1f40cba8830aaf10a86a9fbb7546438 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach8-66/+68
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-13vlib:remove unused argumentEyal Bari2-4/+2
Change-Id: I88c3d3e516401bb1c84991515cd701c156ae19dd Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion4-6/+4
Typically we have scalar_size == 0, so it doesn't matter but vlib_frame_args was providing pointer to scalar frame data, not vector data. To avoid future confusion function is renamed to vlib_frame_scalar_args(...) Change-Id: I48b75523b46d487feea24f3f3cb10c528dde516f Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-08physmem: Add physmem map supportMohsin Kazmi1-3/+9
This patch adds support for mapping the virtual address to physical address and size of memory allocated. Change-Id: I7659a1881308e89b215c486fecd7c973076d0773 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-11-08vlib: use index to free suspended frameFlorin Coras1-4/+4
Avoids crash if suspended_process_frames grows. Change-Id: Id26ef0dd0dd001b997c531c4dec004e7e7989670 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-02vlib: define minimum chained buffer segment sizeDamjan Marion1-0/+11
Change-Id: I9b5f7b264f9978e3dd97b2d1eb103b7d10ac3170 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-01Move RPC calls off the binary API input queueDave Barach3-2/+12
Change-Id: I2476e3e916a42b41d1e66bfc1ec4f8c4264c1720 Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-10-26cj: cj dump crashSteven1-1/+1
Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault. 0x00007ffff670da53 in cj_dump_one_record (r=0x7ffff50f0fec) at /home/sluong/vpp3/vpp/src/vlib/unix/cj.c:138 138 (long long unsigned int) r->data[1]); (gdb) p *cjm $1 = {tail = 58645908, records = 0x7fffb64646ec, num_records = 512, enable = 1, vlib_main = 0x7ffff6953240 <vlib_global_main>} (gdb) p /x cjm $2 = 0x7ffff6953880 (gdb) p /x *cjm $3 = {tail = 0x37edd94, records = 0x7fffb64646ec, num_records = 0x200, enable = 0x1, vlib_main = 0x7ffff6953240} (gdb) cjm->tail is a 64 bit counter, not the total number of records. Dumping from 0 to cjm->tail can be a very large number of records which go beyond the limit. I believe we meant to dump from 0 to index. index has been set by this statement index = (cjm->tail + 1) & (cjm->num_records - 1); Change-Id: Ie1a8ba757598de9757accc1488577c15aa49726b Signed-off-by: Steven <sluong@cisco.com>
2018-10-25Revert "Keep RPC traffic off the shared-memory API queue"Florin Coras2-4/+0
This reverts commit 71615399e194847d7833b744caedab9b841733e5. There seems to be an issue with ARPs when running with multiple workers. Change-Id: Iaa68081512362945a9caf24dcb8d70fc7c5b75df Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-25pmalloc: support for 4K pagesDamjan Marion4-12/+35
Change-Id: Iecceffe06a92660976ebb58cd3cbec4be8931db0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-24vlib: Fix pci io bar read/write fd leakMohsin Kazmi1-0/+6
Few devices provide PCI bar region(s) through I/O. If any such device driver opens I/O "fd" to read and write, needs to close it, when pci device is going to be deleted. Change-Id: Iba104e56f76c6bf9ccd27bf2223bad39b1301763 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-10-24Keep RPC traffic off the shared-memory API queueDave Barach2-0/+4
Change-Id: Ib5c346641463768cf33eaf8cb5fab5b63171398d Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-23physmem coverity issuesDamjan Marion2-3/+3
Change-Id: Ie9ff9b751190632dfc4576e5cbb1987a4142af5e Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23vlib: alloc buffers on local numa, not on numa 1Damjan Marion1-1/+2
Change-Id: Icb8172238f735fd0825e474e16a006f1435e175c Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23vlib: Add support for pci io read/writeMohsin Kazmi2-31/+108
Change-Id: I9d96e7782a12c2e19eacbb75edb1fb450cf33bed Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-10-23vlib: reduce default buffer memory size to be below RLIMIT_MEMLOCKDamjan Marion1-1/+5
Change-Id: If36be24fa08e21c7718a1dced506a7f254dfb5cf Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23Numa-aware, growable physical memory allocator (pmalloc)Damjan Marion16-543/+292
Change-Id: Ic4c46bc733afae8bf0d8146623ed15633928de30 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23c11 safe string handling supportDave Barach15-48/+48
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-22vlib: pci improvementsDamjan Marion5-145/+202
- logging - pass vlib_main_t to all APIs - open vfio container only when needed Change-Id: I897e53e0af3f91c3a99f0c827401d1c0ec2e478a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-22vlib: introduce vlib_buffer_get_{pa,va,current_va,current_pa} inlinesDamjan Marion2-5/+20
Change-Id: I0b42ac6b05bc9910904a97924ea4bebc84507d4d Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-22X86_64 perf counter pluginDave Barach4-24/+105
Change-Id: Ie5a00c15ee9536cc61afab57f6cadc1aa1972f3c Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-19vppinfra: add atomic macros for __sync builtinsSirshak Das4-30/+14
This is first part of addition of atomic macros with only macros for __sync builtins. - Based on earlier patch by Damjan (https://gerrit.fd.io/r/#/c/10729/) Additionally - clib_atomic_release macro added and used in the absence of any memory barrier. - clib_atomic_bool_cmp_and_swap added Change-Id: Ie4e48c1e184a652018d1d0d87c4be80ddd180a3b Original-patch-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com> Reviewed-by: Steve Capper <steve.capper@arm.com>
2018-10-16Fix coverity issue for potentially overflowing of page sizeHaiyang Tan3-4/+4
Change-Id: I2779626d745badb63386efcf729da7a094a4f297 Signed-off-by: Haiyang Tan <haiyangtan@tencent.com>
2018-10-10Integer underflow and out-of-bounds read (VPP-1442)Neale Ranns1-4/+9
Change-Id: Ife2a83b9d7f733f36e0e786ef79edcd394d7c0f9 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-05vfio: don't display error if no pci devices are assigned to containerDamjan Marion1-3/+4
Change-Id: I21429ce084cfd39af6a9997b4c1e459f5a6ef672 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-05node_cli: Give the user a hint as to the problem.Paul Vinciguerra1-5/+15
tested with: DBGvpp# show node foo show node: unknown node name: 'foo' DBGvpp# show node error-drop node error-drop, type internal, state active, index 543 node function variants: ... DBGvpp# show node error-drop bar show node: unknown input 'bar' Change-Id: I896cee9e60028a189dce83666fa4d32a14983a7b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-03fix format error in show logging config outputJerome Tollet1-3/+6
Change-Id: Idc41a219db185b524f497b096eb71892b5f9ebf8 Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2018-10-01API / CLI event-log tracingDave Barach10-3339/+125
Add an "elog trace [api][cli][barrier]" debug CLI command. Removed the barrier elog test command. Remove unused reliable multicast code. Change-Id: Ib3ecde901b7c49fe92b313d0087cd7e776adcdce Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-01thread: Add show threads apiMohsin Kazmi4-58/+40
Change-Id: I3124238ab4d43bcef5590bad33a4ff0b5d8b7d15 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-30vlib: barrier sync elog tracing improvementsDave Barach3-135/+113
Change-Id: I2d3b8d5a7192ff68bee443a99346ecb807b2d833 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-27Add logging to vfio codeDamjan Marion2-3/+23
Change-Id: Iacdff0a5006a0617e3c9559ce7b258f26e256abb Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-27"show log": print wall-clock timeDave Barach1-1/+14
Change-Id: I36f42c03f778955dd543da6c878be090d0443922 Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-4/+4
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-19session: improve close procedureFlorin Coras1-0/+8
Change-Id: I6201a044e70ab6a58db8212960c57edc77c41f96 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-17STATS: Dynamically mapped shared memory segmentOle Troan5-16/+42
Move from using a hash to a vector with offsets into shared memory. Limit exposure of VPP data structures and include files to external stats library and applications. Change-Id: Ic06129f12d10cf4c4946a86d9bc734eacff2c7da Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-14vlib: introduce user flags in vlib_frame_tDamjan Marion3-16/+20
Those flags have local significance and they can be used for sending hints to the next node. Change-Id: Ic2596ee81c64cd16f96344365370e8fcdc465354 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12Add and enable u32x4_extend_to_u64x2_high for aarch64 NEON intrinsics.Sirshak Das1-1/+5
This is the high version of extendto. This function accomplishes the same task as both shuffling and extending done by SSE intrinsics. This enables the NEON version for buffer indexes to buffer pointer translation. Change-Id: I52d7bbf3d76ba69c9acb0e518ff4bc6abf3bbbd4 Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Steve Capper <steve.capper@arm.com> Reviewed-by: Yi He <yi.he@arm.com> Verified-by: Lijian Zhang <lijian.zhang@arm.com>
2018-09-09vlib: crash in linux_epoll_input_inline for accessing free file index [VPP-1412]Steven1-2/+31
Under rare scenario, epoll may still post an event to VPP although the file descriptor is already deleted via epoll_ctl (EPOLL_CTL_DEL) and the file descriptor is close. VPP tries to access the free file index entry and crash. The fix is to throw away the events which the file descriptor is already deleted. Change-Id: Ieca3a1873aecb28630c3abc42c40341f27c2faa7 Signed-off-by: Steven <sluong@cisco.com> (cherry picked from commit aec7297ba012e1fe4bbf85cdaec8e810aa476cea)
2018-09-07Improve NTP / kernel time change event handlingDave Barach1-2/+14
clib_time_verify_frequency(...) rejects clock frequency changes greater than 1%. vlib_worker_thread_barrier_sync_int (...) continuously checks that the barrier hold-down timer is not unreasonably far in the future. Change-Id: I00ecb4c20e44de5d6a9c1499fa933e3dd834d11a Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-09-07cmake: set packaging component for different filesDamjan Marion1-1/+5
Change-Id: I033a1f5cdb24f77462cb5ec90a62226d93f52925 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-07Silence warning over ignored return value (CID 187932)Chris Luke1-2/+2
- We deliberately ignore the return value. Change-Id: If467911b019e7336cf9dc6d4c95c2cd53a5af33f Signed-off-by: Chris Luke <chrisy@flirble.org>
2018-09-06Fix Telnet option processing issueChris Luke1-1/+8
- A check for the length of the buffer should have used the provided 'len' variable, not 'vec_len' since the buffer pointer may be within a vector, but not the start of one. 'vec_len' reports 0 in that case, causing premature exit from the options processing loop and a wait for further input before it checks the next option. - Also add TCP_NODELAY to CLI sockets to disable Nagle on TCP connections for a possible improvement in interactive response. Change-Id: Ie1f53c003ca7d66bed51f437d298183215bad38c Signed-off-by: Chris Luke <chrisy@flirble.org>
2018-09-03Deprecate old buffer replication schemeDamjan Marion3-64/+16
Change-Id: I1f54b994425c58776e1445c8d9fe142e7a644d3d Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-29STATS: stat_client updates.Ole Troan2-6/+7
New stat segment client library: vpp-api/client/stat_client.h New stat segment query app: vpp_get_stats [ls | dump | poll ] <pattern ...> Prometheus integration through: vpp_prometheus_export <pattern> Change-Id: I6f370cf599e9fcf066f22965a62d3a8acd529994 Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-28vlib: add 'show node' and 'set node function' CLIDamjan Marion3-35/+262
Change-Id: I084d7c9e34329f10b5fe45e0b157c4defe0f2811 Signed-off-by: Damjan Marion <damarion@cisco.com>