Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: If33a7cc6c76147fd3ea9d8118370e7a508819b81
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
gcc8 introduced a new warning (Wstringop-truncation) which in our case
is being treated as error.
Disabling the warning globally might introduce bugs related to string
truncation which are not desired by the developer (e.g. bug).
Instead, this patch disables the warning only for those occurences
which have been verified to be non-bugs but the desired behaviour as per
developer will.
Change-Id: I0f04ff6b4fad44061e80a65af633fd7e0148a0c5
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
|
|
I suppose most API handlers do not use vm parameter so it has not
been a problem so far. Now vl_api_vnet_set_ip6_ethernet_neighbor()
was crashing when called from api trace replay because either of
ip_neighbor_add_del_t_handler() vnet_arp_set_ip4_over_ethernet()
need vm to be correct when it calls vlin_time_now() to update the
neighbor timestamp.
Change-Id: Iffb2084a7c90f92c4b86b339ea11800dd41117eb
Signed-off-by: John Lo <loj@cisco.com>
|
|
It should be possible to use vlib without the vlibmemory library, etc.
Change-Id: Ic2316b93d7dbb728fb4ff42a3ca8b0d747c9425e
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
also export per-node error counters
directory entries implement object types
Change-Id: I8ce8e0a754e1be9de895c44ed9be6533b4ecef0f
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
if you plan to put a hash into shared memory, the key sum and key
equal functions MUST be set to constants such as KEY_FUNC_STRING,
KEY_FUNC_MEM, etc. -lvppinfra is PIC, which means that the process
which set up the hash won't have the same idea where the key sum and
key compare functions live in other processes.
Change-Id: Ib3b5963a0d2fb467b91e1f16274df66ac74009e9
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Clean up default and vpp_api_test custom private api segment allocator
ring configurations.
Change-Id: I145b6d64ba0a6315b5ccb07909c8256eeb772146
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I008a4d7ad7160d1f07e7ceef712a5318a9368308
Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
|
|
Based on https://gerrit.fd.io/r/#/c/10920/
Updates service definition in stats.api with correct reply message names.
Change-Id: I3282bee5304e667e23bc1fab3f43d967a50d880d
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
|
|
This reverts commit f7b7fa53b7eaec81d8c00c1023fb7d01f1f9761f.
Change-Id: I87496342943248e94f01ada31459f387c0a3a610
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Change-Id: I7de987c30b263d43521e6280c5273f30b5f6e11c
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Clients cannot know at svm region detach time if the shm backing files
have been recreated (e.g., if vpp restarts) and therefore should not try
to unlink them. Otherwise, terminating clients attached to previous
instantiations of a re-allocated region end up making the new instance
un-mappable by removing its backing file.
Change-Id: Idcd0cab776e63fd75b821bc9f0fac58217b9ccbe
Signed-off-by: Florin Coras <fcoras@cisco.com>
|
|
- update segment manager and session api to work with both flavors of
ssvm segments
- added generic ssvm slave/master init and del functions
- cleanup/refactor tcp_echo
- fixed uses of svm fifo pool as vector
Change-Id: Ieee8b163faa407da6e77e657a2322de213a9d2a0
Signed-off-by: Florin Coras <fcoras@cisco.com>
|
|
This is a version of the VPP API generator in Python PLY. It supports
the existing language, and has a plugin architecture for generators.
Currently C and JSON are supported.
Changes:
- vl_api_version to option version = "major.minor.patch"
- enum support
- Added error checking and reporting
- import support (removed the C pre-processor)
- services (tying request/reply together)
Version:
option version = "1.0.0";
Enum:
enum colours {
RED,
BLUE = 50,
};
define foo {
vl_api_colours_t colours;
};
Services:
service {
rpc foo returns foo_reply;
rpc foo_dump returns stream foo_details;
rpc want_stats returns want_stats_reply
events ip4_counters, ip6_counters;
};
Future planned features:
- unions
- bool, text
- array support (including length)
- proto3 output plugin
- Refactor C/C++ generator as a plugin
- Refactor Java generator as a plugin
Change-Id: Ifa289966c790e1b1a8e2938a91e69331e3a58bdf
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
On reviece side svm queue only permits blocking and
non-blocking calls. This patch adds timed wait blocking
functionality which returns either on signal/event or
on given time out.
It also preserves the original behavior, so it will not
hurt client applications which are using svm queue.
Change-Id: Ic10632170330a80afb8bc781d4ccddfe4da2c69a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
|
|
Change-Id: Icde296e956eb89ea3a17d547f04a833916ec6440
Signed-off-by: Florin Coras <fcoras@cisco.com>
|
|
Fixes the remainig apis that explicitly check svm queue length.
Change-Id: I6055c7c50050affee3098e162e15fb12c205e5db
Signed-off-by: Florin Coras <fcoras@cisco.com>
|
|
This does not update api client code. In other words, if the client
assumes the transport is shmem based, this patch does not change that.
Furthermore, code that checks queue size, for tail dropping, is not
updated.
Done for the following apis:
Plugins
- acl
- gtpu
- memif
- nat
- pppoe
VNET
- bfd
- bier
- tapv2
- vhost user
- dhcp
- flow
- geneve
- ip
- punt
- ipsec/ipsec-gre
- l2
- l2tp
- lisp-cp/one-cp
- lisp-gpe
- map
- mpls
- policer
- session
- span
- udp
- tap
- vxlan/vxlan-gpe
- interface
VPP
- api/api.c
OAM
- oam_api.c
Stats
- stats.c
Change-Id: I0e33ecefb2bdab0295698c0add948068a5a83345
Signed-off-by: Florin Coras <fcoras@cisco.com>
|
|
Change-Id: I7487eb74b8deebff849d662b55a6708566ccd9ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
- separate client/server code for both memory and socket apis
- separate memory api code from generic vlib api code
- move unix_shared_memory_fifo to svm and rename to svm_fifo_t
- overall declutter
Change-Id: I90cdd98ff74d0787d58825b914b0f1eafcfa4dc2
Signed-off-by: Florin Coras <fcoras@cisco.com>
|
|
Change-Id: I2032b5fc8e1904005b8eb871b9be06d025ed9b71
Signed-off-by: Florin Coras <fcoras@cisco.com>
|
|
- add function to sock client that bootstraps shm api
- allow sock clients to request custom shm ring configs
Change-Id: Iabc1dd4f0dc8bbf8ba24de37f4966339fcf86107
Signed-off-by: Florin Coras <fcoras@cisco.com>
|
|
Queue RPC calls and send them from the main dispatch loop. As things stood,
if the vpp main input queue filled, worker threads could enter a
barrier-sync spin-wait in the middle of processing a frame. If thread
0 decided to recreate worker thread data structures, the worker thread(s)
could easily crash.
Legislate the problem out of existence by enqueueing RPC messages only
from the main dispatch loop. At that point, doing a barrier-sync wait
is perfectly OK.
Change-Id: I18da3e44bb1f29a63fe5f30cf11de732ecfd5bf7
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: Ib644a1840c5f24203b6968561f467fbe5e255055
Signed-off-by: Florin Coras <fcoras@cisco.com>
|
|
Change-Id: If4a128186a732266eb27b6aa3caf6f1feff449bf
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: If8fb5484b64a5b1c04e34573490fedcf63feabc9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
We need to push/pop the rx pthread's heap without affecting other
thread(s).
Search clib_per_cpu_mheaps, locate an unused slot. Duplicate the main
thread heap pointer in that slot, and set __os_thread_index
appropriately.
Miscellaneous cleanups. Print exec_inband results as a vector, instead
of as a format string. Don't bail out of vpp_api_test with results
pending, e.g. at the end of a vpp_api_test script. Even though vpp
will eventuallly garbage-collect them, We don't want to leave
allocated reply messages lurking in the api message allocation
rings...
Change-Id: I0e8a25d1ff0d3700249dc330d079db16c2fcbc55
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: Ife87f9b00f918ff1bb8c91c6f13ebe53a3555a12
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
Add one of these statements to foo.api:
vl_api_version 1.2.3
to generate a version tuple stanza in foo.api.h:
/****** Version tuple *****/
vl_api_version_tuple(foo, 1, 2, 3)
Change-Id: Ic514439e4677999daa8463a94f948f76b132ff15
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
- Coverity whines about a zero-length field not being initialized.
Change the struct setup to an initializer which will implicitly zero
all unused fields, and add the coverity notation that should stop
it whining. One or both of these should shut it up!
- Fix some incorrect use of ntohl that was tainting values; in these
cases htonl should have been used, and avoid a double-swap.
Change-Id: I00493a77eb23a0b8feb647165ee349e1e9d5cfdb
Signed-off-by: Chris Luke <chrisy@flirble.org>
|
|
Add a primary svm_region_t pointer to the api_main_t so we can always
find the primary region, even when processing an API message from a
memfd segment.
Change-Id: I07fffe2ac1088ce44de10a34bc771ddc93af967d
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
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>
|
|
- 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>
|
|
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>
|
|
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>
|
|
Change-Id: Id1a5da12b13d87bacfa81094f471b95db40c39be
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I717ce3cd7c867c155de149ec56623269d26d0ff7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
Add doxygen tags for show/clear commands
Change-Id: Ic939c561b15b0b720a8db1ecacc17e3d74419e1d
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Support logging to both syslog and elog
Also include DaveB is_mp_safe fix, which had been lost
Change-Id: If82f7969e2f43c63c3fed5b1a0c7434c90c1f380
Signed-off-by: Colin Tregenza Dancer <ctd@metaswitch.com>
|
|
Change-Id: I90c9d8e151cacf50a99ce76b7a589079303196e8
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
|
|
API clients would fail with an ASSERT (and core dump) whenever
the API shared memory segment could not be opened.
This returns an error value to the client's connect instead.
Change-Id: Id122a3a090b24b139c382ae09f341bde61fd2540
Signed-off-by: Ole Troan <ot@cisco.com>
|
|
svm.c - set default map region root path only if root path is not
already present
memory_shared.c - added option for tests to send memory region name
and root path in one variable, if so name and root path are
separated here and set to map region structure so find function
can find it properly
jvpp-registry.c - added parameters shmPrefix to be able pass +
removed sudo restriction
specific shared memory prefix that is used while starting
python tests(see framework.py)
JVppRegistyImpl - added option to specify shmPrefix
VppJNIConnection - added option to specify shmPrefix
Change-Id: I3f89f867fb9b20eef00fbd497cb0e41b25d6eab7
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Signed-off-by: Matej Perina <mperina@cisco.com>
|
|
- Clean up internal API client registration
- Add proxy server
- Add a reference count to the svm fifo
Change-Id: I5ace1c85497062ed412d26ae76a9e6741af1e984
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Florin Coras <fcoras@cisco.com>
|
|
This is preparation for new C API. Moving common stuff to separate
headers reduces dependency issues.
Change-Id: Ie7adb23398de72448e5eba6c1c1da4e1bc678725
Signed-off-by: Klement Sekera <ksekera@cisco.com>
|
|
- add option to preallocate fifos in a segment
- track active fifos with doubly linked list instead of vector
- update udp redirect test code to read fifo pointers from API call
instead of digging them up from fifo segment header
- input-node based active-open session generator
Change-Id: I804b81e99d95f8690d17e12660c6645995e28a9a
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dbarach@cisco.com>
|
|
Change-Id: I82c663bc0866c6c68ba354104b0bb059387f4b9d
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I9664214652229b663c3e3ba7406b4ede96bfb123
Signed-off-by: Damjan Marion <damarion@cisco.com>
|
|
Change-Id: I953ebb37eeec7de0c4a6b00258c3c67a83cbc020
Signed-off-by: Neale Ranns <nranns@cisco.com>
|
|
Change-Id: I72298aaae7d172082ece3a8edea4217c11b28d79
Signed-off-by: Dave Barach <dave@barachs.net>
|
|
Change-Id: I0755f731b1b01e6a1a231948d498c625a2c966b7
Signed-off-by: Dave Barach <dave@barachs.net>
|