summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-10-04dpdk: use vpp physmem allocator for dpdk buffersDamjan Marion2-63/+144
This allows us to have single contignuous allocation for DPDK buffers with single mmap FD, so buffer memory can be easily shared with diffrent process. As a consequence dpdk socket-mem is no longer in charge for allocating buffer memory, but still we need some space allocated for dpdk structures so default socket-mem is reduced form 256 to 64 MB. For a default of 16K buffers per numa node, physmem allocation is now 40MB, so basically this change reduces footprint from 256MB per socket to 48 (64 + 40). Change-Id: Ic8cfe83930a18411545b37a12b14aac89affd04f Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-10-04Dump of deag/lookup routes has is_drop=1 (VPP-995)Neale Ranns1-0/+2
Change-Id: I58772a83e22885a9ea8a7a981d2bcb4b31a050d2 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-10-04libmemif: memif_rx_burst fixJakub Grajciar1-2/+2
Change-Id: I2f488fef828df8915b57552567e1be79efe69700 Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
2017-10-04memif: crash on slave modeSteven1-0/+1
Crash was seen on recent image with this BT on top of the stack (gdb) bt full (mif=0x7fffb6226568) at /vpp/build-data/../src/plugins/memif/memif.c:297 ring = 0x0 <<<<<<<<<< i = 0 j = 0 buffer_offset = 65792 r = 0x7fffb5e59f80 alloc = {flags = 1, name = 0x7fffb449f965 "memif region", size = 4260096, numa_node = 0, addr = 0x7fff41dac000, fd = 11, log2_page_size = 12, n_pages = 1041} err = 0x0 __FUNCTION__ = "memif_init_regions_and_queues" The crash happened at this line. ring = memif_get_ring (mif, MEMIF_RING_S2M, i); ring=>head = ring->tail = 0; <===== Please note that the crash is caused by dereferencing NULL rinng. Put breakpoint into the function. I notice that mif->regions[0].shm is not initialized. (gdb) p mif->regions[0].shm $8 = (void *) 0x0 It looks like we forgot to set shm after clib_mem_vm_ext_alloc(). Add the missing cide and the crash is fixed. Change-Id: Ib722a6c241c77acfa8e33962106b57faa50e1ea7 Signed-off-by: Steven <sluong@cisco.com>
2017-10-04Update CSIT tests 170926 -> 171002Jan Gelety1-1/+1
- update of CSIT operational branch to be used for VPP-patch test Change-Id: I6331016b17b0811bf0ea1be03c5782428514a01a Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-10-04VPP-1001 - update AF Packet Driver to for modern kernelsAnton Ivanov4-10/+119
1. Add VNET headers support for checksumming - required to operate correctly on any recent Linux 2. Bypass QDISC on transmit - improves performance by ~ 5%. Enabled only if the macro is detected - apparently not present on archaic distributions. This still does not solve all issues with TSO - it can be fixed only by going to tpacket v3 and dynamic rx ring as well as significant changes in the TX (sendmmsg?). Change-Id: Iea14ade12586c0a8da49e6dd1012108a08bc85b3 Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
2017-10-04Add API support to dump IPsec SAsMatthew Smith3-0/+292
Add an API request message type to dump IPsec SAs. Either all IPsec SAs can be dumped or it can be limited to a single SA ID (numeric ID set at creation time - not an index). Add a handler for incoming messages with the new request type. Add an API response message type containing the data for an IPsec SA. Add VAT support for new message type. Change-Id: Id7828d000efc637dee7f988a87d3f707a8b466b7 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-10-03api: fix internal client registrationsFlorin Coras1-0/+2
Makes sure vlib_rp and shmem_hdr are initialized for internal registrations. They are needed for keepalive msg exchanges. Change-Id: I805dec2d2aa84b1efdc1fdd692fc1d94389b776e Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-03Update L2FIB entry timestamp only if BD aging enabled (VPP-1002)John Lo3-3/+6
Change L2 learning path so it update stale timestamp in MAC entry only if aging is enabled on the BD for the MAC entry. Change-Id: I7babe986ceef3c030d8ef9185076c42b405f7b0f Signed-off-by: John Lo <loj@cisco.com>
2017-10-03L2FIB,TEST:add max macs in event testeyal bari1-0/+22
Change-Id: Ied72d44f8695af524751ffc54196cc3ac1addc85 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-10-03tcp: updates to connection closing procedure (VPP-996)Florin Coras4-17/+63
- add separate TIME_WAIT time constant - fix output node for TIME_WAIT acks - ensure snd_nxt is snd_una_max after retransmitting fin - debugging improvements Change-Id: Ic947153346979853f2526824b229126e47aead86 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-03jvpp: added logs for sending and receiving event messages (VPP-982)Matej Perina5-0/+30
Change-Id: I47f9d12d934378f18c6f841b902af2a64ee7b187 Signed-off-by: Matej Perina <mperina@cisco.com>
2017-10-03Repair vlib API socket serverDave Barach89-1106/+2510
- Teach vpp_api_test to send/receive API messages over sockets - Add memfd-based shared memory - Add api messages to create memfd-based shared memory segments - vpp_api_test supports both socket and shared memory segment connections - vpp_api_test pivot from socket to shared memory API messaging - add socket client support to libvlibclient.so - dead client reaper sends ping messages, container-friendly - dead client reaper falls back to kill (<pid>, 0) live checking if e.g. a python app goes silent for tens of seconds - handle ping messages in python client support code - teach show api ring about pairwise shared-memory segments - fix ip probing of already resolved destinations (VPP-998) We'll need this work to implement proper host-stack client isolation Change-Id: Ic23b65f75c854d0393d9a2e9d6b122a9551be769 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-03Propagate duplicate IF addr add/del error up to API.Jon Loeliger3-8/+30
Identify and complain when the same IP prefix is assigned to two different SW interfaces: vpp# set int ip address TenGigabitEthernet6/0/0 1.2.3.4/32 vpp# set int ip address TenGigabitEthernet6/0/1 1.2.3.4/32 set interface ip address: Prefix 1.2.3.4/32 already found on interface TenGigabitEthernet6/0/0 Change-Id: I1aee1b6a7ddd00d3109a53d8e1b6ce97bf45e372 Signed-off-by: Jon Loeliger <jdl@netgate.com>
2017-10-03make test: Copy api_post_mortem.$$ file tmp test dir for archiving.Dave Wallace2-7/+13
Change-Id: I4baf89ef383dbc2f309081a6b56b13ebcb8fc2df Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-02L2-FIB:add mac learn events testEyal Bari3-56/+76
fixes an issue where events were not sent if BD doesn't enable mac aging Change-Id: Iddc53cb5c45e560633e6c5cff2731dccfc70ad5b Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-09-30make test: Create link to failed test dir on timeout.Dave Wallace2-1/+7
- Also change default coredump configuration from "coredump-size unlimited" to "full-coredump" Change-Id: Iefedc2636f2d9696b7575b34e91dd7be49f601fa Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-30make test: archive failed test data with build logs.Dave Wallace2-17/+32
- Fix invocation of compress_failed.sh - Fix compress_failed to copy compressed results files to $WORKSPACE/archives and return failure exit code. Failed test case data will be copied to logs.fd.io and found in the archives/<make test data dir>-FAILED directory in the build log link in the vpp-verify-master-ubuntu1604 jenkins job page. For example: https://logs.fd.io/production/vex-yul-rot-jenkins-1/vpp-verify-master-ubuntu1604/7353/archives/ Change-Id: Ife9a0737115e69c0a8441e3bb0133af1528d909b Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-29make test: fix/disable VAPI tests on centosKlement Sekera5-2/+33
Workaround old `check' library on centos. Disable building/running of C++ VAPI test as centos's gcc can't compile our C++ code (vapi.hpp) due to bug. Change-Id: If9da9c7f1bc076f7cdfb9bd3016dfe60a08afa36 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-28cdp/lldp: punt for no bufferSteven2-0/+6
When making a call to vlib_packet_template_get_packet(), it is possible to get back a NULL if the system runs out of buffer. This can happen when there is buffer leaks. But don't crash just because we run out of buffers, just punt. Change-Id: Ie90ea41f3dda6e583d48959cbd18ff124158d7f8 Signed-off-by: Steven <sluong@cisco.com>
2017-09-28C++ API: remove deprecated throw listsKlement Sekera1-8/+4
Change-Id: Ia58664438c9dc949884a794bd123555a13a02e6c Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-28drop python3 dependencyKlement Sekera4-29/+26
Change-Id: I99c2c1d0d5b96f33efdb58dd3a2897a752e65349 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-27Update package versionFlorin Coras1-1/+1
Change-Id: Ic9bc303b65c95a0e06f90c75b067056b0b11e654 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-28General documentation updatesChris Luke16-83/+117
- We now have several developer-focused docs, so create an index page for them. - Rework several docs to fit into the index structure. - Experiment with code highlighting; tweak the CSS slightly to make it slightly nicer to look at. Change-Id: I4185a18f84fa0764745ca7a3148276064a3155c6 Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-09-28tun/tap: Bad packets sent to kernel via tun/tap interfaceSteven2-22/+29
It was observed that under heavy traffic, VPP accidentally sent traffic with the wrong source and destination to the tun/tap interface. Traffic appears to be sent to the wrong direction. This problem is only seen when worker thread is configured. When worker thread is used, TX and RX may reside in different core. Yet both TX and RX threads are sharing the same global variable, namely iovecs without any mutex or memory barrier protection. This creates a race condition when heavy traffic is blasted to VPP, like 1000 pps. We could create a mutex or memory barrier to ensure atomic memory access. But why bother? It is a lot cheaper to just decouple the iovecs such that TX and RX have their own iovecs. Change-Id: I86a5a19bd8de54d54f32e1f0845bae6a81bbf686 Signed-off-by: Steven <sluong@cisco.com>
2017-09-27VPP-990 remove registered handler if control ping failsv18.01-rc0Matej Perina3-0/+14
Change-Id: I5ca5763f0dc0a73cc6f014b855426b7ac180f356 Signed-off-by: Matej Perina <mperina@cisco.com>
2017-09-27LISP: add API handlers for set/get transport protocolFilip Tehlar4-0/+194
Change-Id: Ib675164c475edcdbe3013df7b847adf5e050c53f Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-09-27VLAN support on host(af-packet) interface.Akshaya N1-3/+26
On host interface if a VLAN tagged packet is received, linux kernel removes the VLAN header from packet byte stream and adds metadata in tpacket2_hdr. This patch explicitely checks for the presense of VLAN metadata and adds it in VPP packet. Change-Id: I0ba35c1e98dbc008ce18d032f22f2717d610c1aa Signed-off-by: Akshaya N <akshaya@rtbrick.com>
2017-09-27Update vagrant centos config to CentOS 7.4Dave Wallace3-2/+9
Change-Id: I45c1227b53ba9e57b94f1bc68de939cd3ce9d619 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-27Fix: unnecesary uio binding for Mellanox NICSteve Shin1-1/+3
UIO binding is not required for Mellanox NIC and calling vlib_pci_bind_to_uio() should be skipped. Change-Id: I10ea457bc3c8d4be8117dec51d5bd940ee416a44 Signed-off-by: Steve Shin <jonshin@cisco.com>
2017-09-27Various fixes for issues found by Coverity (VPP-972)Chris Luke5-3/+25
174267: Revisit this string termination issue 174816: Add check for NULL when trace is enabled 177211: Add notation that mutex is not required here 177117: Added check for log2_page_size == 0 and returns an error if so 163697,163698: Added missing sw_if_index validation Change-Id: I5a76fcf6505c785bfb3269e353360031c6a0fd0f Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-09-27acl-plugin: take 2 at VPP-991 fix, this time with a test case which verifies it.Andrew Yourtchenko3-3/+42
The replacement of [] with pool_elt_at_index and subsequent fixing it was incorrect - it was equivalent to &[], since it returns a pointer to the element. I've added VPP-993 previously to create a testcase, so this commit partially fulfills that one as well. Change-Id: I5b15e3ce48316f0429232aacf885e8f7c63d9522 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-09-27make test: clean ext binaries when doing test-wipeKlement Sekera1-0/+1
Change-Id: I9f5212ee670ea91c6b35f1406c256d0687b9c6b5 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-27Update CSIT tests 1700906 -> 170926Jan Gelety1-1/+1
- update of CSIT operational branch to be used for VPP-patch test Change-Id: If582dc7c5e37bd3cda7ba4858e98fc504e2b7b1e Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-09-26Fix SUSE dependencies to contemplate both python and python3 scripts.Marco Varlese1-1/+1
Change-Id: Ib677955448833dfeb1291490340f5ea1e417213b Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-09-26tcp: update snd_nxt after congestion recoveryFlorin Coras2-9/+7
Change-Id: I2cf4c4850b9c3c093a7dce0cec89b9f710f69393 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-26Add thread-safe event signaller, use RPC where requiredDave Barach5-5/+73
Update ping code to use the new function Change-Id: Ieb753b23f8402cbe5667c22747896784c8ece937 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-09-26checkstyle: ignore old clang-format (centos)Klement Sekera1-2/+9
Change-Id: Iecf35bd9fd760856e32eb1c0c9542ffbed472379 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-26make test: don't recompile ext if not neededKlement Sekera1-4/+4
Skip recompilation of test binaries from test/ext if these are up-to-date. This speeds up repeated test runs. Change-Id: I96dbfafc372398e3d858d8419219ef35c47bd0f3 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-26jvpp: lowering verbosity level for jvpp testsMatej Perina2-56/+55
Change-Id: Ie38dad209cce6d546379b4a5e449b34fbcadf171 Signed-off-by: Matej Perina <mperina@cisco.com>
2017-09-26NAT: remove worker_by_in lookup hash table (VPP-992)Matus Fabian4-97/+30
Change-Id: I3873d3e411bf93cac82e73a0b8e3b22563aaf217 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-26acl-plugin: test: move the API calls to vpp_papi_provider.pyAndrew Yourtchenko4-152/+79
Change-Id: I1d3818027b8a1fcb1ec12016e3476b5c22a2d5a5 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-09-26Memory overwritten when using unformat %u (VPP-987)Aequitas3-19/+19
Change-Id: I7d8f807fb502d61688aa1dee25fa4edcbeb32f41 Signed-off-by: Aequitas <wang.junqi@zte.com.cn>
2017-09-25Fix Ubuntu java dependency regression.Dave Wallace1-0/+1
- introduced by e6f3b467 "Fix for ssl dependency on debian 9" Change-Id: If41e517b2a55d2028ade6671f407831cfcf205c4 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-25Vagrant fails if Vagrantfile is a symlink on Windows 10.Dave Wallace4-117/+131
- Revert Vagrantfile symlink to the default - Update README and env.sh Change-Id: Ib1a557b897e0217b162c31118a4c265769dd1760 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-25Refactor multi-host socket_test.sh for bare-metal.Dave Wallace2-18/+51
Change-Id: I4fcde6652e0c66315a453250c6e02cd32176833d Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-25tcp: do not sample rtt for retransmitted segmentsFlorin Coras3-81/+100
Change-Id: I365c31607332a944ef498369881332b515894ed7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-25acl-plugin: use vec_elt_at_index rather than pool_elt_at_index to access ↵Andrew Yourtchenko1-2/+2
vector elements bb7f0f644 aimed to fix the coverity issue has incorrectly replaced the previous [] access with pool_elt_at_index(), for an element of a vector, with predictably interesting result. VPP-991 has uncovered the issue. Change-Id: Ifd3fb70332d3fdd1c4ff8570372f394913f7b6c8 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-09-25Fix usage string for vatJerome Tollet1-1/+2
Change-Id: Idad65cbb3765500a66f1097126076a2c5fdb4f1b Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2017-09-25Fix sending GARP/NA on Bonded Interface Active/Backup Link Up/DownJohn Lo5-72/+101
For bonded interface in Active/Backup mode (mode 1), we need to send a GARP/NA packet, if IP address is present, on slave link state change to up or down to help with route convergence. The callback from DPDK happens in a separate thread so we need to make sure RPC call is used to signal the send_garp_na process in the main thread. Also need to fix DPDK polling so the slave links are not polled. Change-Id: If5fd8ea2d28c54dd28726ac403ad366386ce9651 Signed-off-by: John Lo <loj@cisco.com>