Compare commits

...

402 Commits

Author SHA1 Message Date
Florin Coras 7ea28045aa 17.10 change default branch in gitreview
Change-Id: Icd2cc7e328719b3964dfe344caf8ed9858283661
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-27 14:11:15 -07:00
Matej Perina 75a17ecddc VPP-990 remove registered handler if control ping fails
Change-Id: I5ca5763f0dc0a73cc6f014b855426b7ac180f356
Signed-off-by: Matej Perina <mperina@cisco.com>
2017-09-27 20:55:50 +00:00
Filip Tehlar a4980b8f3e LISP: add API handlers for set/get transport protocol
Change-Id: Ib675164c475edcdbe3013df7b847adf5e050c53f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-09-27 18:27:46 +00:00
Akshaya N 535f0bfe02 VLAN support on host(af-packet) interface.
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-27 18:22:37 +00:00
Dave Wallace d51020cdfc Update vagrant centos config to CentOS 7.4
Change-Id: I45c1227b53ba9e57b94f1bc68de939cd3ce9d619
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-27 17:54:10 +00:00
Steve Shin 45c40dbb2c Fix: unnecesary uio binding for Mellanox NIC
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-27 17:12:44 +00:00
Chris Luke 879ace3d3b Various fixes for issues found by Coverity (VPP-972)
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-27 17:08:08 +00:00
Andrew Yourtchenko 987abe9eeb acl-plugin: take 2 at VPP-991 fix, this time with a test case which verifies it.
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-27 16:07:20 +00:00
Klement Sekera a61d125198 make test: clean ext binaries when doing test-wipe
Change-Id: I9f5212ee670ea91c6b35f1406c256d0687b9c6b5
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-27 15:46:30 +00:00
Jan Gelety 891c94d5d3 Update CSIT tests 1700906 -> 170926
- 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-27 14:20:05 +00:00
Marco Varlese 625a9fac50 Fix SUSE dependencies to contemplate both python and python3 scripts.
Change-Id: Ib677955448833dfeb1291490340f5ea1e417213b
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-09-26 22:25:07 +00:00
Florin Coras 84275e9655 tcp: update snd_nxt after congestion recovery
Change-Id: I2cf4c4850b9c3c093a7dce0cec89b9f710f69393
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-26 19:03:00 +00:00
Dave Barach 69128d0209 Add thread-safe event signaller, use RPC where required
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-26 17:17:09 +00:00
Klement Sekera 8a398bbae2 checkstyle: ignore old clang-format (centos)
Change-Id: Iecf35bd9fd760856e32eb1c0c9542ffbed472379
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-26 16:11:31 +00:00
Klement Sekera d94c3e5b3c make test: don't recompile ext if not needed
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-26 15:41:50 +00:00
Matej Perina 6912a051c4 jvpp: lowering verbosity level for jvpp tests
Change-Id: Ie38dad209cce6d546379b4a5e449b34fbcadf171
Signed-off-by: Matej Perina <mperina@cisco.com>
2017-09-26 14:43:59 +00:00
Matus Fabian 7865b5c8a4 NAT: remove worker_by_in lookup hash table (VPP-992)
Change-Id: I3873d3e411bf93cac82e73a0b8e3b22563aaf217
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-26 01:29:05 -07:00
Andrew Yourtchenko 51d2651e4a acl-plugin: test: move the API calls to vpp_papi_provider.py
Change-Id: I1d3818027b8a1fcb1ec12016e3476b5c22a2d5a5
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-09-26 07:49:08 +00:00
Aequitas fc4510bbdb Memory overwritten when using unformat %u (VPP-987)
Change-Id: I7d8f807fb502d61688aa1dee25fa4edcbeb32f41
Signed-off-by: Aequitas <wang.junqi@zte.com.cn>
2017-09-26 05:22:28 +00:00
Dave Wallace f91fe3b060 Fix Ubuntu java dependency regression.
- introduced by e6f3b467 "Fix for ssl dependency on debian 9"

Change-Id: If41e517b2a55d2028ade6671f407831cfcf205c4
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-25 22:10:02 +00:00
Dave Wallace d4c623eea4 Vagrant fails if Vagrantfile is a symlink on Windows 10.
- Revert Vagrantfile symlink to the default
- Update README and env.sh

Change-Id: Ib1a557b897e0217b162c31118a4c265769dd1760
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-25 22:09:19 +00:00
Dave Wallace 3d67449de5 Refactor multi-host socket_test.sh for bare-metal.
Change-Id: I4fcde6652e0c66315a453250c6e02cd32176833d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-25 22:07:52 +00:00
Florin Coras f1762d6fa8 tcp: do not sample rtt for retransmitted segments
Change-Id: I365c31607332a944ef498369881332b515894ed7
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-25 19:23:24 +00:00
Andrew Yourtchenko 95524c3a2e acl-plugin: use vec_elt_at_index rather than pool_elt_at_index to access 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-25 18:40:07 +00:00
Jerome Tollet 0c6fb53028 Fix usage string for vat
Change-Id: Idad65cbb3765500a66f1097126076a2c5fdb4f1b
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2017-09-25 16:21:00 +00:00
John Lo 7e9743aef9 Fix sending GARP/NA on Bonded Interface Active/Backup Link Up/Down
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>
2017-09-25 16:07:37 +00:00
Dave Barach 905c14af2b Add binary API documentation
Change-Id: Id1a5da12b13d87bacfa81094f471b95db40c39be
Signed-off-by: Dave Barach <dave@barachs.net>
2017-09-25 09:17:33 -04:00
Matus Fabian 41fef50d5d NAT: session number limitation to avoid running out of memory crash (VPP-984)
Change-Id: I7f18f8c4ba609d96950dc1f833feb967d4a099b7
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-25 07:01:57 +00:00
Jakub Grajciar ba3c4e88c1 libmemif: Jumbo frames data/buffer length fix
Change-Id: Icadf1c28b4ab712a210a8e037200ab29d6c53fe4
Signed-off-by: Jakub Grajciar <grajciar.jakub@gmail.com>
2017-09-23 23:24:49 +00:00
Marco Varlese dc33d4ccb3 openSUSE build fix
* Fixed package dependency
* Fixed bash unary operation error

Change-Id: I782dda8ffd807931241fa6034c110f5fedbeca8e
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-09-22 20:53:59 +00:00
Dave Barach b66201f761 Fix vpp "unix interactive" when running under emacs + gdb
In this specific corner-case setup, ioctl (0, TIOCGWINSZ) returns
window height = 0 and width = 0. Rather than declaring the terminal to
be non-interactive, set the window size parameters to 80 x 24.

Change-Id: If66f5f0883f1940518ec1c6e26228c9bb6f32852
Signed-off-by: Dave Barach <dave@barachs.net>
2017-09-22 13:39:07 -04:00
Yoann Desmouceaux 35df2e1dc9 vhost-user: fix link-up status
When changing the admin state of a vhost-user interface, do not put it
in link-up mode if the interface is not actually ready.

Change-Id: Idbc631a7126efa79d199909f9e7656d21bd412ca
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2017-09-22 16:02:23 +00:00
Andrew Yourtchenko 9969a3274b acl-plugin: remove the clib_warning "ACL enabling..."
It was useful for debugging once upon a time...
but time to say goodbye to it...
Also remove the warning printed when sending ACL details.

Change-Id: I43b2537e176556831eb7ff34b25c9068aa05ee27
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-09-22 10:49:31 +00:00
Eyal Bari c125eccc10 IP-MAC,ND:wildcard events,fix sending multiple events
wildcard ND events publisher was sending the last event mutiple times

Change-Id: I6c30f2de03fa825e79df9005a3cfaaf68ff7ea2f
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-09-22 01:55:33 +00:00
Chris Luke 03add7f5b5 vppctl,cli: Improve non-interactive vppctl (VPP-944)
Short version: Make vppctl behave as expected when run
from scripts, or without a controlling terminal, and
especially when using it with VPP commands on its
command line ("non-interactively").

In particular, prevent the welcome banner and VPP CLI
prompt from being sent by VPP when being used in these
ways.

vppctl
------

- Improve vppctl's detection of non-interactive sessions.
- Pass non-interactiveness in the terminal type telnet option
  as a value distinct from "dumb" (which means non-ANSI capable.)
- Make tty setup handling more robust.
- Only send non-interactive command once we've sent the
  terminal type, to ensure correct event sequence; we need
  the VPP cli session to be in line-by-line mode.
- Ignore stdin when it looks something like /dev/null.
- Skip NUL bytes received from VPP.

VPP CLI
-------

- Detect "non-interactive" terminal types and set session
  parameters accordingly.
- Add an "interactive" flag that controls whether the welcome
  banner and CLI prompt are sent.
- Detect if telnet options processing switched us into line
  mode and act accordingly for the rest of the current input
  buffer. This was causing the command string to be echoed
  by the CLI editor code.
- For non-interactive sessions, send a NUL byte after the
  input buffer has been processed. This is because vppctl
  depends on seeing traffic before it will try to close the
  session; a command with no output would cause it to hang.
  NUL bytes are ignored by all decent terminals, but we have
  vppctl strip them out anyway.
- Prevent certain commands from running in non-interactive
  sessions since they manipulate interactive-related features.
- For interactive sessions, quench the prompt that prints on
  VPP shutdown.
- Detect and handle socket errors in the CLI; sessions were
  leaking.
- Pevent SIGPIPE from ever being raised; handle EPIPE instead.
  We don't need VPP to die just because a socket closed just
  before we try to write to it!
- Add a command to dump a list of current CLI sessions; mostly
  this was to detect session leakage, but it may have some
  general utility.

Change-Id: Ia147da013317180882c1d967b18eefb8519a55fb
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-09-21 22:54:33 +00:00
Matus Fabian ed3c160983 NAT: remove worker_by_out lookup hash table (VPP-989)
Change-Id: Ibcd2cf22348ae5a72770a8f8ad25cbe8df7fd390
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-21 19:10:58 +00:00
Anton Ivanov e6f3b46794 Fix for ssl dependency on debian 9
Change-Id: I32f46c5a6f0e43e7f3e38b05d9607d43faf41501
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
2017-09-21 16:10:48 +00:00
Thomas F Herbert 5349f94d99 Unpack into temporary directory with longer name.
JIRA VPP-498

This commit is a fix so downstream builds in Centos and
RHEL mock environment will work.  This is a workaround
for a bug in the debugedit code in rpm-build package 4.13
and earlier.

Change-Id: Ia6361f7487c5afe9948a2d2fe929942ba5b9c0f1
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-09-21 14:09:01 +00:00
Florin Coras 0e4956869b session: store tep port in net order
Change-Id: Ie3a99f09f44ec081d9b88a213bdb8d987fb462de
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-20 17:50:48 +00:00
Dave Barach 392206e55a Improve API message handler re-registration check
Change-Id: Iedcea2fb45052852666b91a21eed011f5593313d
Signed-off-by: Dave Barach <dave@barachs.net>
2017-09-20 15:52:47 +00:00
Filip Tehlar 649296428b LISP: add debug cli for neighbor discovery
Change-Id: Ib5d335d6130617d6135615c6c8fa8deaac971331
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-09-20 15:51:32 +00:00
Yoann Desmouceaux 561ae0a635 CLI: fix segfault when browsing an empty history
When one starts VPP, types a command, presses up rather than enter,
then types a new command, unix_cli_line_process_one() segfaults.
This is due to cf->cursor not being reset upon pressing up if the
history is empty.

Change-Id: Ie503f20a9cb551e735abb8b0f4feb8c0006d2b61
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2017-09-20 14:40:49 +00:00
Yoann Desmouceaux 6b297aa1f5 TCP: fix "tcp src-address" command with IPv6
When given a single IPv6 address, the "tcp src-address" command incorrectly
infers the end of the range by copying sizeof(ip4_address_t) bytes from the
given address.

Change-Id: I100d5c6674d3a3980b8c018588988bdd32ff7269
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2017-09-20 13:46:26 +00:00
Pierre Pfister 7fe51f3e3e tcp: add option to punt traffic
Until now, if the stack didn't find a connection for a packet, it sent
back a reset. With the punt option enabled, packets are now enqueued to
error-punt where they can be handed off to the host os.

Change-Id: I12dea8694b8bd24c92b0d601412928aa7b8046cb
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2017-09-20 13:43:36 +00:00
Thomas F Herbert 440751b918 Use openssl 1.0 compat RPM for Fedora 26 and newer.
This is just a workaround until VPP is compatible with OpenSSL 1.1.

JIRA: VPP-569

Change-Id: I8d2a113dc9400fd7e8e6850de5d91f40380455ce
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-09-20 13:40:04 +00:00
John Lo 609707ea53 Fix DHCP client so it works for worker threads
Fix dhcp_client_for_us() function to utilize rpc_call_main_thread
to call vlib_process_signal_event() to ensure proper handling
irrespective of it being called in main thread or worker thread.

Added ASSERT to vlib_process_sinal.. path to make sure it is called
in main thread.

Change-Id: I4109cc049d8e4225d896ce492ce201011dc9c911
Signed-off-by: John Lo <loj@cisco.com>
2017-09-20 11:50:49 +00:00
Pierre Pfister 1bfd37295f Add ip6-local feature arc
ip4-local feature arc existed but not ip6-local one.

This patch also adds node name to the 'show ip local' command and fixes
a minor include issue in vnet/ip/ip4.h file.

Change-Id: I9bb8a7159917d58f89afcce974680de20d946a70
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2017-09-20 11:49:08 +00:00
Matus Fabian 4619e19cf0 NAT: don't call ipfix rpc when disabled (VPP-988)
Change-Id: Id98b523f7b20f82291a34e73762978fa65e24140
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-20 09:08:25 +00:00
Matus Fabian 092b3cd59f NAT: move session and user lookup tables to per thread data (VPP-986)
Change-Id: I41a51bb36e31e05c76fef0b34fe006afbee27729
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-20 06:47:20 +00:00
Dave Barach f22f07dec9 format_sockaddr: add trivial support for AF_LOCAL sockets
There isn't anything useful to print. Return a unique name since the
unix cli uses the returned string to create a node name.  Node names
must be unique, or vpp will quit abruptly.

Change-Id: I8f85ae8fececdbfd26c729bc32c2c2007c06d1ea
Signed-off-by: Dave Barach <dave@barachs.net>
2017-09-19 20:23:52 +00:00
Klement Sekera dc15be2ca7 Add C++ API
Change-Id: Iff634f22d43470e2dc028387b3816257fd7b4156
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-19 20:06:08 +00:00
Florin Coras 9d063047eb session/tcp: improve preallocated segment handling
- add preallocated segment flag
- don't remove pre-allocated segments except if application detaches
- when preallocating fifos in multiple segments, completely fill
  a segment before moving to the next
- detach server application from segment-managers when deleting app
- batch syn/syn-ack/fin (re)transmissions
- loosen up close-wait and time-wait times

Change-Id: I412f53ce601cc83b3acc26aeffd7fa2d52d73b03
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-19 19:10:29 +00:00
Neale Ranns caac350076 Treat label=0 as an invalid next-hop-via-label
Change-Id: I831226111d26f5c8a795e0773e23fddcddfb1613
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-09-19 19:01:54 +00:00
Filip Tehlar 058799951d LISP: support for neighbor discovery
Change-Id: I0f1a051dd3b5786dc7c457bc6fc7ce4fcd0f530c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-09-19 16:00:51 +00:00
Matthew Smith 02e14b526d Set RX sw_if_index on decrypted routed IPsec buffers
For routed IPsec, set the RX sw_if_index on inbound packets
to the index of the IPsec interface. When a packet is
decrypted into a new buffer, bring along the RX sw_if_index
of the encrypted packet to the new buffer.

Change-Id: I093e9d37def2082c8d2f1deb96b1c5b97126e023
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-09-19 15:31:08 +00:00
Neale Ranns 44f8131081 Fix MPLS table create CLI
Change-Id: I1f3c0f879f636e587aa518c41e5ad99af65129a7
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-09-19 15:23:22 +00:00
Klement Sekera 8f2a4eafea Add new C API
Change-Id: I717ce3cd7c867c155de149ec56623269d26d0ff7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-19 12:23:44 +00:00
John Lo f4215a65cb Implement VXLAN encap tx checksum offload
Checksum offload is implemented in VXLAN encap over both IPv4 and
IPv6. It is enabled, however, only for VXLAN over IPv6 because UDP
checksum is needed only for IPv6 and optional for IPv4.

Change-Id: Ib879f4f6da7346ba5e079d321c1dfd630f5058b8
Signed-off-by: John Lo <loj@cisco.com>
2017-09-19 10:46:50 +00:00
Pavel Kotucek 057704ebb5 ACL plugin enable macip for ip4/ip6 traffic
Plus fixed problem with acl heap.

Change-Id: I3d91db549ebe4595f1dab9b8780f90722540024b
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-09-19 07:24:02 +00:00
Alberto Rodriguez-Natal 8d66f9d3f8 Remove associated lisp-gpe entries when removing lisp local mapping.
Change-Id: Ifda4d22c9d1de210165932a0996f75cc8428ae7a
Signed-off-by: Alberto Rodriguez-Natal <natal@cisco.com>
2017-09-19 06:29:05 +00:00
Chris Luke b2bcad6238 Fixes for issues Coverity has reported (VPP-972)
177117: fstat() returns -1 on error; the code is
        checking for any positive value instead
175142: final return could never be reached; simple
        refactoring
175235,175236: Warning suppressed with an explicit
        cast to (void)
174817: Final return couldn't be reached; is
        is_in_order is 0 then 'rv' is already returned
        above
172095,172093: If is_is_set does not get set to 1,
        then return 0 has already been invoked
174405: Re-kill this (nothing sets rv)
171136: Looks like a cmd line flag to set test_bytes
        was missing; added it, and refactored the
        argc/argv processing to avoid two other
        potential segv's
176813: Add range checking for term width/height.
        First stab at a reasonable range is 1-512
        for both.
175350: Fix implicit casting in shift operation
174272: Not a c+p error; try using a coverity
        annotation to ignore it
174273,175320: Annotated FORWARD_NULL

Change-Id: I58d0f860fc2209f59f8d1b6b344d631b8d429ace
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-09-18 18:26:04 +00:00
Eyal Bari 2019748a0e L2BD,ARP-TERM:fix arp query report mechanism+test
previous mechanism was emitting duplicates of last event, when handling multiple arp queries.
tests:
* arp events sent for graps
* duplicate suppression
* verify no events when disabled

Change-Id: I84adc23980d43b819261eccf02ec056b5cec61df
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-09-18 13:51:52 +00:00
Pavel Kotucek bb7f0f644a ACL-plugin: fix coverity issue
Fix coverity CIDs 176805, 176806, 176811, 176812

Change-Id: I73591c922307e7a98d38d5d92ebf37c8b2ff0145
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-09-18 12:54:41 +02:00
Dave Wallace 1948161b65 Add multi-vm Vagrantfile for vcl-test.
- Existing Vagrantfile is symbolic link to the
  default Vagrantfile.
- In order to run the multi-host vcl test,
  change Vagrantfile -> Vagrantfile.vcl_test
- Fix socket_test.sh & vppcom bugs.

Change-Id: I965b7f799135c86e989c08bf6c5909677ef38dea
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-17 00:30:20 +00:00
Damjan Marion a0a10830fc dpdk: display EAL init args on startup
Change-Id: I83ea1eae73cb41353cacd1c1b910339d10900502
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-09-16 07:11:48 +00:00
Florin Coras 2f9b0c05fc dpdk: cli to check for buffer leakage
Use buffer pre_data and existing buffer trace trajectory code to
find out dpdk buffer leakages.

Change-Id: I26a5d8bd2f23d01cb6070ffc3ddcc6d3d863b575
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-15 20:56:49 +00:00
Matej Perina 3e233678f1 jvpp: add vpe_pid to ConnectionInfo
ConnectionInfo now contains pid of vpp process
pid is aquired through initial control ping during
connection creation


Change-Id: I68457770e07792d11c47bc7d8cbd0d2fd722d9b4
Signed-off-by: Matej Perina <mperina@cisco.com>
2017-09-15 20:19:03 +00:00
Damjan Marion 01914ce457 vppinfra: add clib_mem_vm_ext_alloc function
Change-Id: Iff33694fc42cc3bcc73cf1372339053a6365039c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-09-15 16:34:50 +00:00
Billy McFall ce41a5c803 VPP-958: RPM Update wipes out local changes to 80-vpp.conf
Changed the %config to %config(noreplace) for the two files in the
vpp.spec file that use it, 80-vpp.conf and startup.conf. Any local
changes to these files will now remain. If a newer version of the file
is published, the new version will be copied over as {filename}.rpmnew,
and the changes will not be applied without manual intervention.

Change-Id: I00b2c7abca20bc33f82479374dd184fc57a9abc5
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2017-09-15 13:57:51 +00:00
Jerome Tollet 50570ecef6 Update of free text tag patch for BD
Change-Id: Ia886ff2bfa2cf33ffbaa35ec89494d4300ec2769
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2017-09-15 10:46:31 +00:00
Jakub Grajciar b467b2a02b libmemif: Jumbo frames support
Change-Id: I2b316358dcd2de7168a860541bcca35c3dd44649
Signed-off-by: Jakub Grajciar <grajciar.jakub@gmail.com>
2017-09-15 08:33:43 +00:00
dongjuan d5b1b85d2e Modify return value of snat_out2in_lb(VPP-985)
in order to trace session_index

Change-Id: I4433155fbe21635f8a997523e2c7900c6a7569af
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
2017-09-15 10:21:07 +08:00
Damjan Marion f49921f73f clib_socket: add sendmsg / recvmsg with ancillary data support
Change-Id: Ie18580e05ec12291e7026f21ad874e088a712c8e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-09-14 11:31:05 +00:00
Matus Fabian daf5162f10 NAT: fixed bug in snat_alloc_outside_address_and_port (VPP-981)
generated random ports overlap between threads

Change-Id: I7a13785e3f98b87e475426b0bd7f6bf2d9c1336c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-13 23:00:53 -07:00
Keith Burns (alagalah) 831fb59f2e Stats refactor
- added per-interface simple/combined counters
- refactored fib/nbr API to use common registration scheme
- refactored "want_stats" and "want_interface" to use
  per interface registration scheme
- fixed issues with SEGV when client disconnects abruptly.

Change-Id: Ib701bd8e4105d03548259217bfc809bd738b7c72
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-09-14 02:56:46 +00:00
Jakub Grajciar 7c5c40db2a Shared memory packet interface (memif) library
Change-Id: I5097462ae85acd705f19e92517c01094dba7565f
Signed-off-by: Jakub Grajciar <grajciar.jakub@gmail.com>
2017-09-13 20:12:54 +00:00
Florin Coras a4393be1a0 gpe: initialize fib index for native forward entries
Change-Id: I972e6e645c3ae9cba4bb2b4e32c0272dfd67e87b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-13 17:39:19 +00:00
Neale Ranns 2297af016d Add a name to the creation of an IP and MPLS table
Change-Id: I4b4648831551519b2ffb6f93255d28a4b8726c22
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-09-13 17:31:13 +00:00
Dave Barach 49fe046e43 API message table inspection utilities
Add doxygen tags for show/clear commands

Change-Id: Ic939c561b15b0b720a8db1ecacc17e3d74419e1d
Signed-off-by: Dave Barach <dave@barachs.net>
2017-09-13 17:28:43 +00:00
Steven 9641f011da devices: Fix coverity discovered 9/13/2017
Missing a break statement in the case

Change-Id: I1b1e198748343bc116ee0eaf9012abc3be15c40a
Signed-off-by: Steven <sluong@cisco.com>
2017-09-13 17:27:45 +00:00
flyingeagle23 c4a51546de lb_vip_command_fn param redundancy when unformat ip address(VPP-977)
Change-Id: I92de5b9ed42cda6c0438b8dc71892d322b642a70
Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
2017-09-13 17:26:56 +00:00
Ole Troan aeedf2665c STATS: Refactor missed adding messages to CRC dictionary.
Change-Id: I0d74856d4fd999dd9ca5886b8375ab8dd700b8a9
Signed-off-by: Ole Troan <ot@cisco.com>
2017-09-13 17:22:18 +00:00
flyingeagle23 01ffc0c1a3 nat lb: del lb static mapping existed vec mem leak(VPP-983)
Change-Id: Id7306b432a33bb0fa594b6949e65ca528d8c0916
Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
2017-09-13 17:19:55 +00:00
Dave Barach 0eacfa3268 VPP-972: fix coverity warnings in the stats scraper
Change-Id: I8843e57105c6c29bcdaf1e6e3bf8e9caf6bfd2ec
Signed-off-by: Dave Barach <dave@barachs.net>
2017-09-13 10:04:20 -04:00
Ole Troan 68ec940a46 VPP-960: Python API add more information in exception for invalid arguments to API calls.
Change-Id: I266eef8419fd98b9b900573ac9b032a62600ab86
Signed-off-by: Ole Troan <ot@cisco.com>
2017-09-13 07:20:53 +00:00
Thomas F Herbert 4b0ac82a73 Add option to build without multi-buffer crypto.
JIRA VPP-498

This patch also allows RPMs to be built without multi-
buffer crypto for some RPM based downstream distros that
don't have sufficiently new nasm or don't have an USA
export license for multi-buffer crypto.

The default is to build WITH multi-buffer crypto
for x86-64. This patch allows optional building without
multi-buffer crypto.

To build without multi-buffer crypto, set the AESNI
environment variable to n.
To build rpm packages without multi-buffer crypto,
build the rpms with the option turned off.

make build AESNI=n

or..

make pkg-rpm --without aesni

---How to test this patch on a Centos build.---

Build as above and verify that nasm isn't executed during
the build process.
vpp may be installed and the dpdk plugin may be inspected to
verify that the multi-buffer code isn't present.

Change-Id: I8c5cfd4cdd9eb2b96772a687eaa54560806e001b
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-09-12 18:42:32 +00:00
Damjan Marion d9226b25f1 physmem: remove debug leftovers
Change-Id: I5a5dc0794d3398e749b64b07dfd1e2fc2230089b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-09-12 15:34:17 +02:00
Matus Fabian 624b8d9807 NAT: fixed bug in snat_alloc_outside_address_and_port (VPP-981)
Change-Id: I6c5eccd4193c44604da3fd27c108defe71b38a4b
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-12 13:24:27 +00:00
Florin Coras 4eeeaaf5e8 tcp: horizontal scaling improvments
- do not scale syn-ack window
- fix the max number of outstanding syns in builtin client
- fix syn-sent ack validation to use modulo arithmetic
- improve retransmit timer handler
- fix output buffer allocator leakeage
- improved debugging

Change-Id: Iac3bc0eadf7d0b494a93e22d210a3153b61b3273
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-12 11:41:10 +00:00
Steven 2504ac699e devices: Display VhostEthernet instead of UnknownEthernet for dpdk net_vhost driver
Added a new macro VNET_DPDK_PORT_TYPE_VHOST_ETHER for dpdk net_vhost driver
to display VhostEthernet instead of UnknownEthernet.

Change-Id: Ie407d83ebbbd60e4d11be79f0ebc44e2867a5f3b
Signed-off-by: Steven <sluong@cisco.com>
2017-09-12 11:40:29 +00:00
Shachar Beiser 6c333cecd6 net/mlx5: fix warning message
Add support for Mellanox provider id and vendor id

Change-Id: Ib2451e69fbe949f01bcb1ee556aa3020da225610
Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
2017-09-12 11:38:21 +00:00
flyingeagle23 6a58f4a896 Fix issue in nat Bisearch algorithm (VPP-980)
Change-Id: I39b1d1ec6fb9a10e2a0e67d36b01c0bf2522d07f
Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
2017-09-12 11:36:05 +00:00
Andrew Yourtchenko cada5a92fa acl-plugin: add startup-config section "acl-plugin" and heap/hash parameters
This adds the ability to tweak the memory allocation parameters of the ACL plugin
from the startup config. It may be useful in the cases involving higher limit
of the connections than the default 1M, or the high number of cores.

Change-Id: I2b6fb3f61126ff3ee998424b762b6aefe8fb1b8e
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-09-12 09:20:04 +00:00
flyingeagle23 e8efd7d16f nat lb mapping command existed array out of bounds(VPP-979)
Change-Id: Id1dce0c2eebd4097bc17842f050453b76a94eb70
Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
2017-09-12 09:04:46 +00:00
Pavel Kotucek c29940c58d ACL-plugin add "replace" semantics for adding a new MacIP acl
Change-Id: Ia5c869b2d8b8ad012b9e89fb6720c9c32d9ee065
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-09-12 08:38:25 +00:00
Neale Ranns 6b3a8eff76 replace uint32_t with u32
Change-Id: I6cab79c266837a8731adcf78c9e093dfa6be0ead
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-09-11 19:19:56 +00:00
Florin Coras 2d3dbc45d6 arp/glean: fix hash computation
Change-Id: Ifef8a9328bb865f6ddb041bafe3699153f89755a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-11 19:15:11 +00:00
Colin Tregenza Dancer eb1ac1732f Recombine diags and minimum barrier open time changes (VPP-968)
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>
2017-09-11 11:44:44 +00:00
Steven a19e1054b5 memif: mode ip is not settable from binary API
While mode ip is supported via the CLI for creating a memif interface,
it is not settable from the binary API due to missing code.

While at it, update the help usage to include the missing keyword secret.

Change-Id: Ia9c71f4017210a5e1733ce4992fbb566b7d20c1a
Signed-off-by: Steven <sluong@cisco.com>
2017-09-11 10:15:43 +00:00
Neale Ranns 1500254bee FIB table add/delete API
part 2;
  - this adds the code to create an IP and MPLS table via the API.
  - but the enforcement that the table must be created before it is used is still missing, this is so that CSIT can pass.

Change-Id: Id124d884ade6cb7da947225200e3bb193454c555
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-09-11 10:14:36 +00:00
Brian Brooks a7191840be Improved arm64 chip detection
Use ARMv8 Main ID Register (exposed thru /proc/cpuinfo) to identify
the CPU implementor and part number. For further details, see the
ARMv8 ARM D7.2.66.

Change-Id: I2b0d0b165cda4ab9fc57c645af90e9e354b73f44
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Song Zhu <song.zhu@arm.com>
2017-09-11 10:13:42 +00:00
Matus Fabian b2d2fc7f58 NAT: fixed hairpinning for in2out translation as an output feature (VPP-976)
Test whether the hairpinning flag is set only for packets from NAT inside interface.

Change-Id: I4a4fdd2084a76a70ce9dfe3e2b8332c02fa2eccd
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-10 22:17:47 -07:00
Damjan Marion 56dd5438b0 move unix_file_* code to vppinfra
This will allow us to use this code in client libraries without vlib.

Change-Id: I8557b752496841ba588aa36b6082cbe2cd1867fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-09-09 20:11:03 +00:00
Damjan Marion 816122e303 physmem: make fake allocation non-fatal if we cannot pick numa node
Change-Id: I563c043ed82e3ef199fc3d47931108f31cc01728
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-09-08 20:10:36 +00:00
Keith Burns (alagalah) 516bcfe904 gitignore update for IDE
Change-Id: I95096e8d507f9bcb0f808d0da0355655b474d29a
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-09-08 20:07:48 +00:00
dongjuan 01e078fff9 Initialize ip4_reass_lock of map_main to zero (VPP-975)
Change-Id: I0f58100a944e36f5b530101178303d4595b3207f
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
2017-09-08 18:19:28 +00:00
Gabriel Ganne 555d920301 add apr-devel to rpm dependency list for centos-7
Error mesasge:
...
rpmbuild -bb \
  --define "_topdir /home/gannega/vpp" \
  --define "_version 17.10" \
  --define "_release rc0~269_g030ab48" \
  vpp.spec
error: Failed build dependencies:
        apr-devel is needed by vpp-17.10-rc0~269_g030ab48.x86_64

Change-Id: I7c09b65dcc9e57cae3da396c0165b8a4c85a8c2b
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-09-08 18:13:44 +00:00
Damjan Marion 3b64d6334b vlib: move linux-specific code to vlib/linux
Change-Id: Id79d2c2be7a98e15416a537c890a8f2dd6d4464d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-09-08 15:24:50 +00:00
Marco Varlese 2234983112 PUNT: Missing include for readv()
The missing header include was generating a compile-time error;
src/vnet/ip/punt.c:460:10: error: implicit declaration of function 'readv'

Change-Id: I3f74294e7824ea3602b8d416c86fdada1aac1906
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-09-08 15:23:10 +00:00
Steven d6042d4f1e memif: fix coverity warnings as of 9/7
1. coverity complains about "buffer not null terminated" for strncpy because we
pass the size of the destination to the call which is equal to the true size
of the destination. We subtract 1 for the size to accommodate the null like all
other places are already doing it.

2. Add a check to tx_queues in memif_interface_tx_inline to avoid "divide by zero".

3. To avoid null pointer dereference in memif_create_if, change the goto done
rather than goto error and spit a more meaningful error rather than silent about it.

4. Shuffle a line to avoid "check after use" in vl_api_memif_delete_t_handler.

Change-Id: Icba7ecd5362c012a48ac35795d31aab356617420
Signed-off-by: Steven <sluong@cisco.com>
2017-09-08 12:46:10 +00:00
Pavel Kotucek 932f74196d ACL-plugin MACIP ACLs tests
Change-Id: Ie40c837358454cfe9475cb2c14fdf20b24fa6602
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-09-08 05:51:24 +00:00
Andrew Yourtchenko a546ef96a8 acl-plugin: add hitcount to applied hash-acl entries
Add a counter incremented upon the ACL check,
so it is easier to see which kind of traffic
is being checked by the policy, add the corresponding
output to the debug CLI "show acl-plugin tables" command.

Change-Id: Id811dddf204e63eeceabfcc509e3e9c5aae1dbc8
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-09-08 05:44:53 +00:00
Dave Wallace 3079a64e19 Fix socket_test.sh vagrant based multi-host tests.
Change-Id: I8ef75a0c702098030c6814c127d3443820122327
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-08 05:42:13 +00:00
Chris Luke ab7b8d93cf Fixes for issues reported by Coverity (VPP-972)
Change-Id: I25238debb7081b4467aec4620dfdef33fbef3295
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-09-08 02:17:27 +00:00
Keith Burns (alagalah) 8a19f12a0c Allow individual stats API and introduce stats.api
- want_interface_simple_stats
- want_interface_combined_stats
- want_ip4|6_fib|nbr_stats

Change-Id: I4e97461def508958b3e429c3fe8859b36fef2d18
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-09-07 22:12:31 +00:00
Damjan Marion 49d66f1f42 vlib physmem rework
This patch adds supprot support for multiple numa-aware physmem regions.

Change-Id: I5c69a6f4da33c8ee21bdb8604d52fd2886f2327e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-09-07 16:09:21 +00:00
Filip Tehlar d630713d73 LISP: add neighbor discovery and CP protocol separation APIs
Change-Id: Ia2fc4621f0e199b0d02ac4d2104b54bdb49c14dd
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-09-07 15:56:34 +00:00
Filip Tehlar 111a5cea6f LISP: Add APIs for enable/disable xTR/P-ITR/P-ETR modes
Change-Id: Ieeb3b7eaabb568180320fe54d3eae2d26f3e4704
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-09-07 15:55:52 +00:00
Marco Varlese 7ba443706b The missing variable (added with this patch) was causing the build on AARCH64
platforms to default to lib (instead of lib64) when not explicitely defining
the --libdir through the configure script.

This patch fixes that.

Change-Id: Ia4c152e0f40acab7f098885d672ff9385f57b0fe
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-09-07 13:41:12 +00:00
Steven bd8a611c7e Devices: Set interface rx-mode may cause SIGSEGV with nonexistent queue
When I type in set interface rx-mode with a nonexistent queue, I got a crash with the following
traceback. It looks like the vm is NULL when vlib_node_get_runtime is called.

DBGvpp# sh int rx
Thread 0 (vpp_main):
  node dpdk-input:
    TenGigabitEthernet5/0/0 queue 0 (polling)
    TenGigabitEthernet5/0/1 queue 0 (polling)
    TenGigabitEthernet7/0/0 queue 0 (polling)
    TenGigabitEthernet7/0/1 queue 0 (polling)
  node vhost-user-input:
    VirtualEthernet0/0/2 queue 0 (adaptive)
DBGvpp# set interface rx-mode VirtualEthernet0/0/2  queue 1 polling

Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.
0x00007ffff6d4e0bc in vlib_node_get_runtime (vm=0x0, node_index=125)
    at /home/sluong/vpp/build-data/../src/vlib/node_funcs.h:92
92	  vlib_node_t *n = vec_elt (nm->nodes, node_index);
(gdb) where
    at /home/sluong/vpp/build-data/../src/vlib/node_funcs.h:92
    at /home/sluong/vpp/build-data/../src/vlib/node_funcs.h:112
    vnm=0x6f0fa0 <vnet_main>, hw_if_index=7, queue_id=1, mode=0x7fffb62099e8)
    at /home/sluong/vpp/build-data/../src/vnet/devices/devices.c:307
    hw_if_index=7, queue_id=1, mode=VNET_HW_INTERFACE_RX_MODE_POLLING)
    at /home/sluong/vpp/build-data/../src/vnet/interface_cli.c:1192
    vm=0x7ffff7b9d440 <vlib_global_main>, input=0x7fffb6209ef0,
    cmd=0x7fffb61d5d14)
    at /home/sluong/vpp/build-data/../src/vnet/interface_cli.c:1288
    vm=0x7ffff7b9d440 <vlib_global_main>,
    cm=0x7ffff7b9d630 <vlib_global_main+496>, input=0x7fffb6209ef0,
    parent_command_index=18)
    at /home/sluong/vpp/build-data/../src/vlib/cli.c:588
    vm=0x7ffff7b9d440 <vlib_global_main>,
    cm=0x7ffff7b9d630 <vlib_global_main+496>, input=0x7fffb6209ef0,
    parent_command_index=12)

The fix is to add a check for vec_len(hw->input_node_thread_index_by_queue)
and vec_len (hw->rx_mode_by_queue) to reject the command if the queue_id is
out of bound. While at it, I notice inputting queue_id=-1 is being interpreted
as all queues. An easy fix is to not overload the queue_id variable with -1 to
mean something else.

Change-Id: Id70ec3e7d06ccc67635e6d28ef53420bdac4a988
Signed-off-by: Steven <sluong@cisco.com>
2017-09-07 13:39:21 +00:00
Andrew Yourtchenko 92dc12a01b test: factor out "L4_Conn" into a class within util.py (VPP-931)
It seems a useful abstraction for the purposes of writing
fine-grained tests, to be able to create a "connection" object
which would be bound to two VPP interfaces, and hold some
information about the state, allowing to send the packets
back and forth with minimal amount of arguments.

Change-Id: Idb83b6b82b38bded5b7e1756a41bb2df4cd58e3a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-09-07 13:38:56 +00:00
Matus Fabian 7d6412e66d NAT: fixed bug in snat_get_worker_out2in_cb (VPP-832)
Change-Id: Id9c977634a1259865e3403ba0d90aecaca85207d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-07 13:38:36 +00:00
Jan Gelety 20754e6667 Update CSIT tests 170814 -> 170906
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I23c6b5cb9bab6e295ff145531eabc2d51df49a94
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-09-07 13:38:15 +00:00
Andrew Yourtchenko 6be72cd89a acl-plugin: match index set to first portrange element if non-first portrange matches on the same hash key (VPP-937)
Multiple portranges that land on the same hash key will always report the match
on the first portrange - even when the subsequent portranges have matched.
Test escape, so make a corresponding test case and fix the code so it passes.

(the commit on stable/1707 has erroneously mentioned VPP-938 jira ticket)

Change-Id: Idbeb8a122252ead2468f5f9dbaf72cf0e8bb78f1
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit fb088f0a20)
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-09-07 11:33:06 +00:00
Ole Troan 4802632dd1 Punt socket: Fix coverity error for pathname length mismatch between API and sun_path.
Change-Id: I69d67707540e075afe7bad0a70e57d9d80b1bc8e
Signed-off-by: Ole Troan <ot@cisco.com>
2017-09-07 10:54:02 +00:00
Dave Wallace 70ec09dfab Add fd/socket name to clib_socket_* error msgs.
Change-Id: Ifcc9df04e7b224dfc9e9be53a30df5bbccbe05b4
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-07 10:50:06 +00:00
Dave Wallace 33e002b168 Fix session connect_* api message handling.
Change-Id: If7fd125989c90240de12953658d10007b9eb4f07
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-07 08:18:46 +00:00
Jerome Tollet 4830414138 Support for bridge domain free text tag
Change-Id: I9a75fdafd0c1d87b6f071fda5b77ff5f6b79deb7
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2017-09-07 07:48:53 +00:00
Florin Coras d05c155e34 make test: disable L2BD Multi-instance test 5
Change-Id: Iba44aec60a74ada5add41ecf00b25dc44f3ad3a3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-07 02:56:33 +00:00
Dave Wallace 19296116be Set uid/gid on ssvm segment file.
Change-Id: I482bb9654f4dfe240bace5c2b61056cfd04cf018
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-06 22:35:52 +00:00
Dave Barach 91f3e744a3 Improve "show segment-manager segments"
Clean up private-segment fifo preallocation

Change-Id: I53c630ed81d48f2832a204992d73635536926983
Signed-off-by: Dave Barach <dave@barachs.net>
2017-09-06 18:30:55 +00:00
Chris Luke 2951d901a5 Fixes for issues raised by Coverity (VPP-972)
Change-Id: I4b1f27b95d67d48b7a13750ff8754c344ed7afa7
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-09-06 16:29:49 +00:00
Matus Fabian 704018cf11 NAT: Destination NAT44 with load-balancing (VPP-954)
added load-balancing static mappings with unequal load support

Change-Id: Ie505e41f24d46f812b94dd28bdafe3dc170a6060
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-09-06 08:49:25 +00:00
Sergio Gonzalez Monroy 030ab4815f dpdk/ipsec: fix setup when using master core only
Change-Id: I62b7aa896dfe218358f11a5197b1228a3dd67152
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-09-06 04:44:26 +00:00
Pierre Pfister 9a244bb5e4 Add pidfile cmdline option
Change-Id: Ibaa61b624eb6683b1be6901a7b29f5f73aad27b2
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2017-09-05 18:10:40 +02:00
Colin Tregenza Dancer 215961829c Refork worker thread data structures in parallel (VPP-970)
Change the rebuilding of worker thread clone datastructures
to run in parallel on the workers, instead of serially
on main.

Change-Id: Ib76bcfbef1e51f2399972090f4057be7aaa84e08
Signed-off-by: Colin Tregenza Dancer <ctd@metaswitch.com>
2017-09-05 13:33:51 +00:00
Ole Troan f7a55ad74c PUNT socket: External control plane processes connected via UNIX domain sockets.
An external (to VPP) process can register (over the VPP binary API) to
receive control plane packets over a UNIX domain socket. The packets are
prepended with a packet descriptor containing meta-data (if_index of
interface, etc).

Currently only UDP is supported.

The socket supports sending of packets/frames as well.
The sent packet is prepended with a descriptor, telling VPP to
route the packet (via ip4-lookup, ip6-lookup) or as an pre-formed
Ethernet frame that is sent directly to interface-output.

The intended use case for this is for an external DHCP client or
a RIP implementation.

New configuration option:

punt { socket <socket path> }

To register use the punt_socket API message.

TODO:
  - Add support for pre-routing. I.e send L3 packet to given
    TX interface, but do ARP/ND (ip[46]-rewrite)
  - Add test scripts
  - Support for abstract names (starting with \0)
  - Add rate limiting (COP)
  - Support for other protocols, e.g. IPv6 ND

Change-Id: I4a0afc8020deebb3d9d74686dde694ee5bcb8d0f
Signed-off-by: Ole Troan <ot@cisco.com>
2017-09-05 12:07:22 +00:00
Filip Tehlar 809bc74b5b LISP: re-fetch mapping before it expires
Change-Id: I0581a1bddad55d8d573c546ec84b0b2760abab3d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-09-04 12:13:55 +02:00
John Lo dbfa574a1d Improve L2FIB PDR/NDR performance (VPP-963)
1. Limit MAC entry update per l2-learn call to reduce update burst
   when wall clock advance to the the next minute so all MAC time
   stamps are behind current time needing update.
2. Optimize l2-learn node fast path code sequence.
3. Invalidate cache_key when update MAC entry.
4. Change L2 learn hit counter to L2 learn hit-update counter.
5. Increase L2FIB table memory size to 512MB to fit 4M entries
6. Set MAC learn limit at 4M entries

Change-Id: I3075ee8fb59645a56850126bac2e3e6d341cef4d
Signed-off-by: John Lo <loj@cisco.com>
2017-09-03 01:14:19 +00:00
Marco Varlese edfa2fddf8 The build system still builds the DPDK plugin when the option
vpp_uses_dpdk is set to "no" in build-data/platforms/vpp.mk causing the
build to fail.

This patch addresses that issue.

Change-Id: Icc1aaa508e730c9b8715119e1259e4c82f974048
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-09-01 14:46:23 +00:00
Dave Barach b7f1faa7fb Add fixed-size, preallocated pool support
Simply call pool_init_fixed(...) before using the pool. Note that
fixed, preallocated pools live in individually-mmap'ed address
segments, except for the free element bitmap. A large fixed pool can
exceed 4gb.

Fix tcp buffer allocator leak, remove broken assert

Change-Id: I4421082e12a77c41c6e20f7747f3150dcd01fc26
Signed-off-by: Dave Barach <dave@barachs.net>
2017-09-01 14:17:53 +00:00
Ole Troan 774b217916 VPP-959: Python API require minimum CFFI version.
Change-Id: I328689b7d4efe6017412de43630a5e9f3633dd71
Signed-off-by: Ole Troan <ot@cisco.com>
2017-08-31 21:42:00 +00:00
Sergio Gonzalez Monroy 324ad39c1d dpdk/ipsec: update doc regarding startup.conf
Change-Id: Ie449072ab1efec081235b508f1def60a1287ff5f
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-08-31 21:40:18 +00:00
Steven 49a04b9545 vhost: Disallow interrupt mode config if driver opts out interrupt support
According to the spec, supporting interrupt mode from the driver is optional,
not a must. When interrupt mode is configured on the interface, we should
check to make sure that the driver didn't opt out for the kickfd support and
reject the configuration if it did.

Change-Id: I7d3dbaddde65458e1a6a802754a3768ae8685a0e
Signed-off-by: Steven <sluong@cisco.com>
2017-08-31 20:48:25 +00:00
Thomas F Herbert da78c85c55 Add explicit check for Fedora.
Change-Id: I0a5aece190ccc82f0f840e3bc75e1d27433f5b47
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-08-31 12:31:52 -04:00
Damjan Marion 3ea5eeb352 Do arithemtric comparison in Makefile without using bc
Change-Id: I245f56814ba3911b832e7450d42c58f235bc6dc2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-31 12:05:47 +00:00
Damjan Marion 1211beb572 Revert "add bc to dependency list"
Adding new dependency is not right solution to this problem.

This reverts commit e58c93b276.

Change-Id: I08f2af5cf9c26c4302b0dbaccebbb52f0614f80f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-31 12:05:33 +00:00
Dave Barach c8ef08ac63 Fix BIHASH_KVP_CACHE_SIZE == 0 case
Setting the bucket-level LRU cache size to zero removes the
bucket-level LRU cache code.

Change-Id: Idf2e63d0d508675e957366515863766f79a3479c
Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-08-31 12:02:49 +00:00
Brian Brooks 9746552e98 Native arm64 build: dpdk/Makefile change
With this change, the status of `make build':

  Huawei D02, Linux 4.4.0, gcc 5.4.1 - success
  AMD Seattle, Linux 4.4.6, gcc 5.3.1 - compiler ICEs
  Cavium ThunderX, Linux 4.4.49, gcc 5.4.0 - success

Before:

  Huawei D02, Linux 4.4.0, gcc 5.4.1 - fail
  AMD Seattle, Linux 4.4.6, gcc 5.3.1 - fail
  Cavium ThunderX, Linux 4.4.49, gcc 5.4.0 - success

Change-Id: I49db34a33f9ca0725c7511d4f796706892b5b2da
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
2017-08-31 10:46:07 +00:00
dongjuan 9d9265899e Fix vent_data memory leak in function run_ping_ip46_address (VPP-966)
Change-Id: I05d0c8310aa86480a3d283f45e115284c4b4ebd5
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
2017-08-31 10:22:57 +00:00
Damjan Marion c67787be51 Set runtime_path properly when running non-root
non-root users should use /run/user/$PID/...

Change-Id: I1ca136df7a339eff193ed9c9a396d6965b192d0e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-31 07:33:37 +00:00
ShenJibiao 203c079483 Free memory the 'rpaths' pointers, that may incur memory leaks(VPP-965).
Change-Id: I2732c02b97f4602162638bbcf3ab46521c2782da
Signed-off-by: ShenJibiao <shen.jibiao@zte.com.cn>
2017-08-31 14:02:46 +08:00
Keith Burns (alagalah) 9e482bb9bc Improvements to socket_test.sh script
Change-Id: I10c59dc32edb7336a56722b1de8cca1d0ae31c60
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-08-31 01:41:05 +00:00
Gabriel Ganne e58c93b276 add bc to dependency list
replace $(echo "..." | bc) by `echo ... | bc` as they do not seem to
behave the same way.

Change-Id: Ib8f13f0c8213aaae89d65559427e01bc40f4e8d1
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-08-30 19:44:56 +02:00
Damjan Marion b6a8ed7fa0 Thread safe internal buffer manager, take two
First attempt to make internal buffer manager thread safe was not
succesfull, so trying again. This time with more testing.

Change-Id: I01b8385a9c26d233934a3339255ea4bd31c865ac
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-30 16:27:59 +00:00
Florin Coras 50958959b5 tcp: re-enable persist timer if no data available to send
Additionally, flush rx fifos for closed sessions.

Change-Id: If2cc563fbda0451e7572650e98b15f0a694a0ff9
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-30 13:15:32 +00:00
Dave Barach e3434397f2 Offload prep calls needed for IP and UDP checksum offload pkts
Change-Id: I9b29bcff348bddfb49b1c38b1d409249e37bb075
Signed-off-by: Dave Barach <dave@barachs.net>
2017-08-30 08:14:58 -04:00
Steven 978788903b vhost: Cache qsz_mask instead of qsz in vhost_user_vring_t
In the data path, we grab qsz from vhost_user_vring_t to compute
qsz_mask and store it in a stack variable to use on many occasions.
We never use qsz for any meaningful purpose. It is more useful to
cache qsz_mask in vhost_user_vring_t to avoid the needless computation
in the data path.

Change-Id: Idf4d94a9754d5c75c899f1f4f59602275b9904a6
Signed-off-by: Steven <sluong@cisco.com>
2017-08-30 06:56:39 +00:00
Hongjun Ni a894434e30 Fix static mapping lookup issue for NAT plugin
Change-Id: Ic99d1db5360f69126b23bb2b78f29d6404cbbae9
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-08-29 21:24:56 +00:00
Hongjun Ni 2bd3f8a525 Fix some issue of comment and help for nat feature
Change-Id: I9233e427b5f8874492fefb2bfe7c1ab329e366b2
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-08-29 20:41:44 +00:00
Keith Burns (alagalah) 0edbef74f0 Add .pybuild to gitignore
Change-Id: I4467a30ec1beff67a0517619296f1a27589ff55b
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-08-29 19:06:13 +00:00
Florin Coras c87c91d8b0 session: segment manager improvements
- cleanup connects segment manager even if first
- fix segment manager allocation for listen sessions
- improve handling of process private segments (mheaps/main heap)
- added segment manager cli

Change-Id: Ic2ca97c3622ab2286d5fb5772aeb57680e64f769
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-29 18:53:11 +00:00
Gabriel Ganne 78d5abea85 silence makefile warning on ubuntu
shell error on ubuntu when OS_VERSION_ID == 16.04:
/bin/sh: 1: [: Illegal number: 16.04

Change-Id: I8db55f751ad7fb677a6565cbbce93a9bc08060b7
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-08-29 17:19:59 +02:00
Marco Varlese 47501da34f Fix for bootstrap crash when VPP compiled with gcc-7
See issue VPP-964

Change-Id: I2aed5abdc02e47e7bb5b0ce78cb6589a1ce7302f
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-08-29 15:07:19 +00:00
Pierre Pfister 50b60ebcc3 Flowprobe: Fix flow start time and hash computation
Upon hash collision, the flow start time was not reset.
The hash computation techniques (crc32 or xxhash) also both
had bugs which are now fixed.

Change-Id: I94d72997f34018d1699324264f7dded2a5cbd776
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2017-08-29 12:27:44 +00:00
Steven 4ba75f5446 vhost: Remove operation mode in the API
create/delete/modify vhost_user APIs no longer support the operation mode
(polling/interrupt/adaptive). They are now done via the generic interface.

Change-Id: I9e9bd503f9b56c953ecd2b271b3e2007da20c72a
Signed-off-by: Steven <sluong@cisco.com>
2017-08-28 11:34:47 -07:00
Thomas F Herbert bd8e242024 Add Build Requirements from Makefile to spec file.
JIRA: VPP-498

Changes to build to help with downstream distro builds
for Fedora, Centos and RHEL distros.
Add nasm, automake, libtool, byacc, bison and flex.
Remove libconfuse and dependencies.
Remove epel-release rpm and dependencies.
Add conditionals to work around Python 2 packaging
inconsistency in Fed 25.
Add numactl to rpm requirements.

Change-Id: Ia39f8b931dc87e42df56414d38662eb33c7a4ca7
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-08-26 18:27:06 -04:00
Matej Perina d05282983a jvpp: adding debug usage into test documentation
added debug version commands to Readme files for example tests

Change-Id: Icc5d5cdd33efb6d7c7512c7a78e22d9dc3d31fdc
Signed-off-by: Matej Perina <mperina@cisco.com>
2017-08-25 22:08:26 +00:00
Dave Barach d84ba85c00 TCP horizontal scaling
- Remove frame handoff support machinery. We haven't used it in a long
  time.
- Configuration support for the local endpoints bihash table
- Drop lookup failure packets in tcp46_syn_sent

Change-Id: Icd51e6785f74661c741e76fac23d21c4cc998d17
Signed-off-by: Dave Barach <dave@barachs.net>
2017-08-25 22:04:28 +00:00
Damjan Marion 206b2d4342 dpdk: bump to dpdk 17.08, remove support for dpdk 17.02
Change-Id: I674fb1212e48693939045523df085326a4dd1809
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-25 20:27:38 +00:00
Klement Sekera fcbf44448b make test: separate test discovery code
Separating test discovery code to it's own script file has the
advantage of easily doing e.g. listing of all existing tests.

Change-Id: I80dc280263cc7e33e7e13cb0d48b39bf08ece24d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-25 18:05:17 +00:00
Andrew Yourtchenko 6d157c2f91 acl-plugin: warning printed when acl_add_replace already applied ACLs (complete the fix for VPP-935)
The fix for VPP-935 missed the case that hash_acl_add() and hash_acl_delete() may be called
during the replacement of the existing applied ACL, as a result the "applied" logic needs
to be replicated for the hash acls separately, since it is a lower layer.

Change-Id: I7dcb2b120fcbdceb5e59acb5029f9eb77bd0f240
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit ce9714032d)
2017-08-25 17:07:07 +00:00
Florin Coras 1f152cd6fa tcp: retransmit and multi-buffer segment fixes and improvements
- set session state as closed on session manager delete
- enable retransmit as opposed to persist timer after persist timer completes
- properly discard buffer chain bytes when new data overlaps ooo
  segments
- don't use rxt bytes in snd space estimate used on tx path

Change-Id: Id9cab686e532e5fe70c775d5440260e8eb890a9f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-25 16:39:42 +00:00
Marco Varlese 27de761048 Fixed the SUSE dependency on libnuma
Change-Id: I0de13c7fac91c7fc2fcbc9e765ae37720a583aaf
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-08-25 16:32:52 +00:00
Hongjun Ni c847368bc4 Use Quad-loop to improve gtpu-encap performance
Change-Id: I440fae09e77502392af5cde45dd9c532afa5d976
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-08-25 16:27:56 +00:00
Matej Perina d135c19a1f jvpp: introducing callback api and future api tests for all plugins (VPP-591)
test can be run with:
make test TEST=test_jvpp

memory_shared.c:
declaring and assigning variable in if statement
makes it usage outside statement impossible. Looks like memory
space assigned to variable declared in statement is freed when
statement ends
svm.c:
- fixed case when root path can have a "/" at beggining
- added option for test to operate over shared memory space
with /vpe-api name and not create new one with name consisting of
root path and region name which would require root permisions

Change-Id: Iff1170dc6a5c1be134c152f2757c7ab9b919a8ed
Signed-off-by: Matej Perina <mperina@cisco.com>
2017-08-25 16:26:17 +00:00
Sergio Gonzalez Monroy acdc306093 dpdk: required changes for 17.08
DPDK 17.08 breaks ethdev and cryptodev APIs.

Address those changes while keeping backwards compatibility for
DPDK 17.02 and 17.05.

Change-Id: Idd6ac264d0d047fe586c41d4c4ca74e8fc778a54
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-08-25 14:24:53 +00:00
tjanciga ffef404ad8 Fix crash when TCP client using VPP host stack connects first
VPP is crashing without this fix if there is not any server
using VPP host stack and client attemts to connect.

Change-Id: I672977f78180bbc5ba9259116b2e165363463ccd
Signed-off-by: tjanciga <tomas.janciga@pantheon.tech>
2017-08-25 12:48:29 +00:00
Andrew Yourtchenko 81d1e27eed vl_api_sw_interface_set_mtu_t_handler: fix assert in vnet_get_hw_interface
The handler was calling the routines with sw_if_index instead of hw_if_index,
fix that by an extra call to vnet_get_sw_interface, and check that the interface
type is VNET_SW_INTERFACE_TYPE_HARDWARE before proceeding.

Change-Id: I4a6f65f44e250ecdb2b72d2693c9d7db5a52b966
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 778df28c2a)
2017-08-25 07:33:51 +00:00
Damjan Marion 57d963f88b Make VPP runtime directory configurable
New startup config command:

unix {
	runtime-dir /run/vpp
}

Also, adds recursive mkdir funtion for use in deifferent places
like cli-config socket path and dpdk hugepage directory path.

Change-Id: I1446ceab9c220c25804e73a743a3ebb383450124
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-24 19:49:09 +00:00
Dave Wallace d48e9763bf Fix initialization bug in sock_test_client
Change-Id: Ieeae23a81f6f747b96c2a115bd8a62e8962428cd
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-24 15:22:26 +00:00
Matus Fabian c60cbde78a NAT64: Fix error message typo (VPP-961)
Change-Id: Ieb81c5e157e342cbb532bd65f3b64059e5838691
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-08-24 15:21:53 +00:00
Marek Gradzki 5c04ad0960 jvpp: use (*env)->ExceptionClear before calling (*env)->ExceptionOccurred
Change-Id: I6cca455ead986cb8a507c84957a97a40b733b16c
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-24 14:56:50 +00:00
Matus Fabian c6e8c5c658 NAT64: Fix CLI typo (VPP-961)
Change-Id: I99e2766a118754387c9f238fc1b46057ee8a23e7
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-08-23 22:08:22 -07:00
Florin Coras c940f095f6 tcp: add tcp.api.h to nobase include
Change-Id: Idcd78a21f4f2b6c1223123b5cc50a470ccd57e83
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-23 11:25:10 -07:00
Marek Gradzki af3d9771db Remove unused retval from gpe_native_fwd_rpath type definition
Change-Id: I89a10204454aeea07412289b153ba50d6a15498c
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-23 14:47:25 +00:00
Florin Coras 56494e9c09 gpe: add l2 lb counters
Change-Id: I81b3fc6266ad02239b6f1a216adc283efdcf0dce
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-23 13:21:33 +00:00
Matus Fabian 2ba92e32e0 NAT: Rename snat plugin to nat (VPP-955)
Change-Id: I30a7e3da7a4efc6038a91e27b48045d4b07e2764
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-08-23 07:42:10 +00:00
Dave Wallace cfc997ef3d Fix vl_map_shmem() root_path dangling reference.
Change-Id: I90c9d8e151cacf50a99ce76b7a589079303196e8
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-23 05:10:42 +00:00
Ed Warnicke c900ccc34c Enabled gid vpp in startup.conf to allow non-root vppctl access
Change-Id: I1ca9736dbefc9c284f5176de176fcc3dd1bfcd82
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2017-08-23 04:05:49 +00:00
Andrew Yourtchenko beb50d425d acl-plugin: Recreate the bihash_40_8.h in the proper place
Change-Id: I30a3df53bc5fe5ab991a657918eb502bd2913440
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-08-22 20:02:34 +00:00
Damjan Marion adcf45217d dpdk: fix Cavium ThunderX support
Change-Id: Id5812448917ce52984d5a778d5b304c448a752e7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-22 15:04:39 +00:00
Keith Burns (alagalah) 6f67049e41 Update gitignore for DPDK files
Change-Id: I6c4e76d8a030ec5fafc8167873cc1471913a1e88
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-08-22 14:57:05 +00:00
John Lo e531f4cb57 Increase default MAC learn limit and check it in learn-update path
1. Increase default MAC learn limit from 1M to 8M entries.
2. Check MAC learn limit in MAC learning update path.
3. Allow disable of want_l2_macs_events to set MAC learn limit
4. Other minor cleanups

Change-Id: I62438440937b5fa455e16f4a2e4d910277753395
Signed-off-by: John Lo <loj@cisco.com>
2017-08-22 14:30:18 +00:00
Damjan Marion 87318463aa policer: remove unused code
This is causing compiler error with gcc 7.

Change-Id: Ia65ee9d80ab263c79e82ad805e5cc5a12af91f85
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-22 11:17:57 +00:00
Kris Michielsen 910744394f SRv6 tests
Change-Id: Ib1d2fc5a83d9d007a0468591a73881675f1bec9b
Signed-off-by: Kris Michielsen <kmichiel@cisco.com>
2017-08-22 11:12:34 +00:00
Damjan Marion 5f22f4ddde dpdk: define MACHINE before it is used
This fixes build on non-x86 platforms like arm64.

Change-Id: I7ff5df92f89e34c27889d82f35924dc28cde8c39
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-22 00:42:18 +00:00
Damjan Marion 3600b67e4f ping: remove unnecesary x86 intrinsics #include
This include file is present only on x86 so it breaks non-x86 builds.

Change-Id: I6406b0b36f207b684535961545e95dbba707d267
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-22 00:41:42 +00:00
Damjan Marion 844e0eba77 dpdk: disable tun/tap PMD
Beside the fact that we don't need it, it fails to build on ARM64.

Change-Id: Iefae8bf234b588d8005df5e053b9152b6611929c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-21 22:27:08 +02:00
Neale Ranns 43161a8733 PPPoE usses a midchain adjacency stack on an interface-tx DPO
1) introduce an interface-tx DPO. This is a simple wrapper around a sw_if_index. enhance DPO stacking functions to allow per-instance next-nodes and hence allow children to stack onto the interface per-instance tx node and not on 'interface-output'.
2) update PPPoE code to use ta midchain stack on a interface-tx DPO of the encap-interface. This remove the need for pppoe_encap node (which is replaced by the adj-midchain-tx) and interface-output node is no longer used (see above). Since PPPoE encap node is no longer needed, the PPPoE seesion does not need to be retrieved in the data-path, hence the cahce misses are removed.

Change-Id: Id8b40f53daa14889a9c51d802e14fed7fba4399a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-21 04:07:00 -07:00
pragash 352829f538 Fixed ip add bug for ip6 with review comments
Change-Id: Ie1fba1a32020775444c7b1ed800e8559b54691ff
Signed-off-by: pragash <pxv3620@rit.edu>
2017-08-19 10:46:50 -04:00
Florin Coras e87216fedd session: fix multi-buffer segments
Change-Id: I0e22c85ea570b934b9c78dc5e86d86d690bdae5e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-18 21:21:20 +00:00
Florin Coras af8c8e5d95 gpe: fix sub-interface hash lookup
Change-Id: Ice6b3818ee24c7c248bf61e4d6c1ef2a85cb8fb1
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-18 21:12:18 +00:00
Ole Troan b0856b432b Python API: Fix error message typo.
Change-Id: Icb67797a91a5929e57a08b79adeca226fee09de3
Signed-off-by: Ole Troan <ot@cisco.com>
2017-08-18 17:57:39 +00:00
Ole Troan 3cdc25ffba API: More gracefully fail when opening shared memory segment fails.
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>
2017-08-18 16:46:30 +00:00
Keith Burns (alagalah) 8ea8916bb8 IP4_FIB stats API not indexing after FIB changes - VPP-951
Change-Id: I9ec36ee82ddd8f2f7a551b458e19b2fbae4aa7e7
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-08-18 16:45:36 +00:00
Jan Gelety b17f4c3ca7 Update CSIT tests 170731 -> 170814
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I09c8551e47dc78567e591ace1e552d3c534e5aab
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-08-18 13:27:40 +00:00
Florin Coras 3d2a914762 feature: exit on misconfigured features (VPP-915)
Change-Id: Ifa11f356d727b69cb121a2bf4cfb9d87883f545d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-18 12:58:09 +00:00
Neale Ranns 0714541603 Use correct msg ID in the sw-interface-event from TAP and VHOST
Change-Id: I0124fa264f7f390fc7cd9722da59be03116831c5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-18 12:50:41 +00:00
Pavel Kotucek dafd20b08a Fix vpp crash when adding macip acl
When adding at least two different types of MACIP acl vpp crash.

Change-Id: Ibbc76b94015311945be081fe0d8af71cf0672332
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-08-18 12:35:13 +00:00
Pavel Kotucek f77e913549 Fix small issues in ACL api
Enable IP address without prefix length, if not given use max (32/128)
Parse correctly type of acl (ipv4).

Change-Id: I3d5d6b45037c9e0f95d2d112ae584f006c6cb4d1
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-08-18 12:34:43 +00:00
Andrew Yourtchenko 71bb05454c acl-plugin: time out the sessions created by main thread too (VPP-948)
In multithread setup the main thread may send packets,
which may pass through the node with permit+reflect action.
This creates the connection in lists for thread0,
however in multithread there are no interupt handlers there.

Ensure we are not spending too much time spinning in a
tight cycle by suspending the main cleaner thread
until the current iteration of interrupts is processed.

Change-Id: Idb7346737757ee9a67b5d3e549bc9ad9aab22e89
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit c1ff53f25d)
2017-08-18 10:53:22 +00:00
Klement Sekera 8712ada6c3 make test: fix broken passing of return value
Change-Id: I2cb83caaf55ca9a29c06d71c6d20f8273ec062b3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-18 10:34:39 +00:00
Dave Wallace 30fb4a2f43 Fix socket_test.sh to run iperf3 in docker.
Change-Id: I47018fee4283b7b257f16e21b82bf7e497a7d985
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-17 16:30:11 -04:00
Dave Barach 3bbcfab119 TCP source address automation
- v6 support
- Non-default VRF ID collection
- Break up ip source address list into CLI + API-friendly functions
- Automate proxy arp / proxy nd configuration
- Automate local adjacency insertion
- Binary API support

Change-Id: Iede31184f65cc1ec8c414447d2d60a1334e3fe15
Signed-off-by: Dave Barach <dave@barachs.net>
2017-08-17 17:24:25 +00:00
Klement Sekera f413bef135 make test: collect symlinks to failed tests
Compress files in temporary directories of failed tests and symlink
the directories under /tmp/vpp-failed-unittests location - preparation
for jenkins archivation. Automatically cleanup the directory at start
of test run.

The compression is performed only when environment variable
COMPRESS_FAILED_TEST_LOGS is set to one of "yes", "y", "1".
This is set in verify target, but left unset by default, so when
invoking make test by hand, files won't be compressed.

Change-Id: I84c8f1c6aa79aa9c0b753357022b1f195f17a283
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-17 14:44:05 +00:00
Ole Troan 6bf177ce81 Python API: VPP-947 Empty chroot_prefix fails on encode()
Change-Id: Ide2cdc456f3ab3219930fb8e423b871810469cdc
Signed-off-by: Ole Troan <ot@cisco.com>
2017-08-17 13:21:27 +00:00
Marek Gradzki 89b931fdf9 jvpp: suppress unwritten fields warrning found in DTO's hashCode
DTOs fields are initialized by generated JNI code, so
we can safely ignore FB.UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD.

Coverity uses FindBugs to analyse Java code,
so it should be possible to suppress some of the
issues that are false positives or intentional.

Change-Id: I1375f6123e3eb44db44065d603d9d81726161acb
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-16 18:13:25 +00:00
Florin Coras 20a14b9eac ip4: cleanup ip local
Change-Id: I4f751b0181f25ec6c4abd3a9c7b0386d80743b3a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-16 16:50:08 +00:00
root c9d1c5b6b3 tcp: fix v6 sessions
Change-Id: Ia6dd5e948b17b2f3866fe70838eabb09e35415e1
Signed-off-by: Dave Barach <dbarach@cisco.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-16 16:47:44 +00:00
Matus Fabian ab9a59c19a SNAT: Make proto optional in nat64_bib_dump (VPP-942)
make proto optional in nat64_bib_dump and nat64_st_dump

Change-Id: Idd102ce2b1555d38783fd22c84e46b4c48570edc
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-08-16 15:56:32 +00:00
Neale Ranns d292ab1e0f No context in SW interface event
At this pointin the game, events do not have an associated context. they have the client_index and pid instead.

Change-Id: I5052cab78f710bba630a61d2390acbaa1b3813ab
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-16 13:32:39 +00:00
Florin Coras 0e9c33bb5f tcp: improve builtin http server
Additionally:
- remove opaques from stream_session_t
- ensure first segment manager is only used once per app.

Change-Id: I143d1fdb8effc88815ef969b78122ba3ac29e06e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-16 13:28:27 +00:00
Pavel Kotucek 4f80b81d4a Add missing counters for P2P ethernet interfaces
Change-Id: I9d172d70f645fea5005abced73ca2700e640263a
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-08-16 12:18:22 +00:00
Matus Fabian f8cd581744 NAT64: Fallback to 3-tuple key for non TCP/UDP sessions (VPP-884)
Change-Id: I4cafc8291725feb499355092bd429433e649b5b2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-08-16 08:36:43 +00:00
Dave Wallace 6d5c4cdbcc VCL: copy complete ip addr to/from vpe-api buf.
Change-Id: I951e051278e775a7ecdaa88af812f535727baa92
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-16 05:53:58 +00:00
Marek Gradzki 5da27c260e jvpp: move JVppReply's id out of synchronized block
Should make Coverity stop thinking we try to synchronize reply.context.

Change-Id: I97169e46b9c8f594836d6beb75b9f42dfc6e5bad
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-16 01:31:00 +00:00
Neale Ranns 24b170aac5 Support proxy ARP on mirrored TAP interfaces
When VPP has an interface whose address is also applied to a TAP
interface on the host, then VPP's TAP interface will be unnumbered
to the 'real' interface and do proxy ARP from the host.
the curious aspect of this setup is that ARP requests from the host
will come from the VPP's own address.

Change-Id: Ia238790e1034ba3cd3facdab29387b65a31525f2
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-15 16:37:21 +00:00
Andrew Yourtchenko e9ab1c0b4a acl-plugin: don't attempt to delete the ACLs on interface deletion if ACL plugin heap is not initialized
With the addition of the own heap, the delete routines called from interface deletion
callback may attempt to initialize the ACL plugin heap. This is obviously not
a desirable condition - so, return early from the callback if the ACL plugin
heap has not been initialized yet - there is for sure nothing to clean up.

Change-Id: I08a6ae725294016ff5824189ade91c288e2c473b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-08-15 15:00:59 +00:00
Pavel Kotucek 8dc802062b IPv6 local-address for P2P ethernet interfaces
Change-Id: I87d3cb5754843f38593e92f60a39af2e5241d1cf
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-08-15 13:57:41 +00:00
Billy McFall e9bac6953d VPP-939: Update CLI Helptext for rx-placement commands
The CLI commands were change from 'set/show interface placement' to
'set/show interface rx-placement', but the associated help text was not
updated. On the 'set interface rx-placement', some of the parameters
were renamed, which was confusing when looking at the documentation for
help.

While in the file interface_cli.c, cleaned up several other CLI
commands. There are still other commands in the file that need
addressing.

Change-Id: Ifdc357c73ad9f3362133c495217b5a6b3a411eab
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2017-08-15 12:34:51 +00:00
Florin Coras ab0289a85c tcp: state machine improvements
- Add SYN_RCVD timeout
- Fix FIN_WAIT_1 to CLOSING transition

Change-Id: I42ca7fc087f6fdfae15bd7a6175dd3226ed341c7
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-15 12:33:31 +00:00
Marco Varlese 8ddd518f9a Previous version was still downloading, unpacking and building IPSEC / AES
libraries.

This patch addresses the misbehaviour.

Change-Id: I41f1ece3ca21c5a8f2c95533ed3d77a535233ea6
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-08-15 11:00:53 +00:00
Marek Gradzki af09551335 coverity: remove dependency on uint32_t in fib_test.c
Fixes make build-coverity

Change-Id: I5cf6992224f18b8e8770d365c42b3e759dc93f73
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-15 10:23:14 +00:00
Matus Fabian 6912628261 SNAT: fix overlapping address space test
change address/network of the second interface within VRF 10

Change-Id: Iab9772a419fb3e8f1a193756bdaa68cd8cdbb121
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-08-14 23:39:58 -07:00
Dave Wallace d69f4f416d Fix VCL LD_PRELOAD lib location in socket_test.sh
- Use VCL_LDPRELOAD_LIB_DIR env. var if set.
- Default to /usr/local/lib where it will be installed.
- Change library name to libvcl_ldpreload.so.0.0.0

Change-Id: I4fc30b581c8406c5895f875d859aa44bb9ef19b5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-14 23:50:05 +00:00
Florin Coras 82d3ec8b51 TCP: Update time_now once per burst
Change-Id: I58089d7a9867ede9d8a36b2aea62edef04cb5b81
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-14 21:26:32 +00:00
Neale Ranns 28ab9cc13b FIB table add/delete API only
commit only the addition of the .api definition and their invocation through VAT so CSIT can use it

Change-Id: Id510f14b1ce007fe5e92120507ea34100652fc64
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-14 17:57:20 +00:00
Florin Coras 2245c0fe25 TCP: update builtin server/client cli help
Change-Id: I224ef3ce1c4ac2ade5ba733a42c78b7ba5c0040e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-14 16:55:53 +00:00
Klement Sekera db4e84cf2f make test: properly handle ctrl-c
Change-Id: Iab88886ebc1582626813777ea45ce97fc8e36443
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-14 15:21:43 +00:00
Marek Gradzki 3214dc3823 jvpp: ignore messages if callback method is missing (VPP-548)
Change-Id: I6a06dbcd8339bd6645a6b02ae70154aa0885dcf8
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-14 14:39:16 +00:00
Sergio Gonzalez Monroy 4aef5b78e7 dpdk: force libdir for isa-l crypto library
Depending on the OS, the default libdir might change.

RHEL/Ubuntu:
libdir={exec_prefix}/lib

OpenSUSE:
libdir={exec_prefix}/lib64

Change-Id: I5f1672e5815ad821e6ac5fff95de5232ab735b67
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-08-14 14:31:16 +00:00
Marco Varlese 3a079ce282 Added MD5SUM for DPDK 17.08 tarball as a first step towards migration
Change-Id: Ic73b857c4e3d5a3f695e93924de5a5bed0af5019
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-08-14 14:30:10 +00:00
Sergio Gonzalez Monroy 6be3255d46 dpdk: cleanup unused build option *_uses_dpdk_cryptodev_sw
Change-Id: I62939592bd3cb151e02c55a3f1ee6e7d1ce469cb
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-08-14 14:24:31 +00:00
Jan Srnicek 5beec81360 jvpp: make shm_prefix configurable (VPP-591)
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>
2017-08-14 12:19:31 +00:00
Neale Ranns 0117d24a1f default update adjacency function deos not return multicast adjacency
by not returning a multicast adjacency type when requested, but instead returning a nbr type, the mcast adj was never correctly deleted. hence when reused the adjacency object was not realocated from the pool and when it was freed a second time a crash occured.

Change-Id: Ia74ae3e889db0dfba8ec3c6a0cccfef215587ff6
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-13 09:08:38 +00:00
Florin Coras 44fe506ff3 LISP: fix fid nsh address formatting
Change-Id: I912fa53c02c720901c9fb253550790829107de39
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-12 20:02:19 +00:00
Klement Sekera 3f6ff19a30 make test: fix broken DEBUG=gdb* options
Change-Id: I5d80982eeab78a629760f567eda3b1539d96e3a8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-12 09:19:34 +00:00
Florin Coras b2215d6b0d Fix tcp multi buffer segments retransmission
- Fix tcp/udp sw checksum computation
- Fix allocation of multi buffer tcp segments for retransmits
- Send FIN only if/when tx fifo is empty

Change-Id: I2e43a14b87a72c9e547b4339b9a51811cf5732c4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-11 16:03:19 +00:00
Hongjun Ni 755e41e457 Fix IP fragment-id and offset issue in LB-GRE4
Change-Id: Ic1c440b2594c3ec4cdc75730069f16432cdb9587
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-08-11 07:04:14 +00:00
Filip Tehlar 6f9f6f3f28 LISP: fix wrong reply message in map_register_fallback_threshold call
Change-Id: I0011c211908db6067f918fbaaa7d6863191d5bd3
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-08-11 02:58:56 +00:00
Neale Ranns a07bd70800 Dedicated SW Interface Event
Change-Id: I06a10a4291e61aec3f1396d2514ed6fe3901897a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-11 02:58:30 +00:00
Neale Ranns e8bad978a1 the automatic addition of IP address to the magic TAP interface should only happen for one table
Change-Id: I99d3e9227c33ee42b90e4842080960fcc6c03913
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-11 02:55:13 +00:00
Dave Wallace 543852a46c Add VPP Communications Library (VCL)
- VCL library
- client/server test application
- test script (make test integration tbd)
- gdb command file templates
- vppcom test config file

Change-Id: I21eab7aa09b4e5dc3412acf5c2eab07415c2fc0f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-11 02:50:51 +00:00
Andrew Yourtchenko 7faab8d3a5 acl-plugin: add the debug CLI to show macip ACLs and where they are applied (VPP-936)
When looking at resource utilisation, it is useful to understand
the interactions between the acl-plugin and the rest of VPP.
MACIP ACLs till now could only be dumped via API,
which is tricky when debugging. Add the CLIs to see
the MACIP ACLs and where they are applied.

Change-Id: I3211901589e3dcff751697831c1cd0e19dcab1da
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit f2cfcf676e)
2017-08-11 01:15:52 +00:00
Chaoyu Jin 913b873066 Fix memory leaks found in policer code.
2nd commit is to fix style failures.
3rd commit is to remove unneccesary change based on review comment.

Change-Id: I4d54d25c27e037b9d0438f8af416cf113763dc6d
Signed-off-by: Chaoyu Jin <chjin@cisco.com>
2017-08-10 21:41:23 +00:00
Dave Barach 1b1dfb110a Add tcp, session-layer MAINTAINERS file entries
Change-Id: I6c89383738624b8b18645b6c93c3025604ac538e
Signed-off-by: Dave Barach <dave@barachs.net>
2017-08-10 14:58:13 -04:00
Florin Coras bae851fcab Fix LISP cp buffer leakage
Change-Id: Id7e0f967cc510f0b45f043f74493854083ac67ae
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-10 18:32:51 +00:00
Andrew Yourtchenko 4eed4568b3 acl-plugin: add MAINTAINERS entry
Change-Id: I681eca4897f8dba7e85fdbcbb7e03d1d9ef29224
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-08-10 17:24:32 +00:00
Andrew Yourtchenko faef07fdd0 acl-plugin: hash lookup bitmask not cleared when ACL is unapplied from interface (VPP-935)
The logic in hash ACL bitmask update was using the vector
of ACLs applied to the interface to rebuild the hash lookup mask.
However, in transient cases (like doing group manipulation with
hash ACLs), that will not hold true. Thus, make
a local copy of for which ACL indices the hash_acl_apply
was called previously, and maintain that one local
to the hash_lookup.c file logic.

Change-Id: I30187d68febce8bba2ab6ffbb1eee13b5c96a44b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 1de7d70444)
2017-08-10 16:23:45 +00:00
Dave Barach 818eb54de0 Improve the svm fifo allocator
- Round up requested fifo size to the next power of two
- Maintain per-segment power-of-two freelists
- Allocate fifos in chunks, to amortize alignment overhead
- Detach builtin test client application after each run
  so we can use different fifo sizes each time
- Be more suspicious of session / application indices

Useful prep work for dynamically resizing fifos. As far as the svm
fifo code is concerned, it's OK to set fifo->nitems anywhere in the
interval: [0, 1<<(fifo->freelist_index) + FIFO_SEGMENT_MIN_FIFO_SIZE]

It's unlikely that setting nitems below the path MTU will work out
very well...

Change-Id: Idad73a027dfb7412056cb02988b77e300fa7e8a7
Signed-off-by: Dave Barach <dave@barachs.net>
2017-08-10 14:34:31 +00:00
Andrew Yourtchenko ef5dd4f2ae acl-plugin: avoid crash in multithreaded setup adding/deleting ACLs with traffic (VPP-910/VPP-929)
The commit fixing the VPP-910 and separating the memory operations
into separate heaps has missed setting the MHEAP_FLAG_THREAD_SAFE,
which quite obviously caused the issues in the multithread setup.
Fix that.

Also, add the debug CLIs
"set acl-plugin heap {main|hash} {validate|trace} {1|0}"
to toggle the memory instrumentation, in case we ever need it
in the future.

Change-Id: I8bd4f7978613f5ea75a030cfb90674dac34ae7bf
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit e6423bef32)
2017-08-10 13:56:31 +00:00
Klement Sekera fa3eb7a993 make test: bump default test timeout to 10 minutes
Change-Id: I25d88966376d712ff61f29227a45880a59e8ecf2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-10 06:50:50 +02:00
Neale Ranns 9104a40aeb MPLS tunnel - multiple labels on the CLI - fix cut and paste robot errors
Change-Id: I675af62d9c0c9cf2e340bf19e902695861d4e4b5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-10 08:53:06 +00:00
Matthew Smith 66c0adf1ea VPP-933 VPP crashes when deleting an ARP entry
When attempting to delete an ARP entry on an interface
that hasn't had any ARP entries added yet, VPP was
retrieving an array element at an index that was out of
bounds and trying to dereference it.

Change-Id: Id141d3bfd8378dd8dd63f43b0b4b41461c285a4f
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-08-09 19:31:30 -05:00
Klement Sekera 909a6a1eb9 make test: detect hung tests
Run tests in a forked process with a set of pipes to communicate
keep-alives and overall result. This allows us to detect when e.g.
vpp dies mid-API call causing the test to hang waiting for response
(which will never come since vpp died).

Support setting a (per test case) TIMEOUT make test option to set timeout,
with a default timeout of 120 seconds.

Example - fail the test suite if any test-case fails to finish within
300s:

make TIMEOUT=300 test

Change-Id: I0d04f26a7232968f4bf043adf5d5b508f5018717
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-10 00:14:59 +00:00
Dave Barach 52851e6aa9 TCP proxy prototype
- 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>
2017-08-10 00:13:08 +00:00
Andrew Yourtchenko b639b59337 acl-plugin: all TCP sessions treated as transient (VPP-932)
The packet that was creating the session was not tracked,
consequently the TCP flags seen within the session record
never got the value for the session to get treated as
being in the established state.

Test-escape, so add the TCP tests which test the
three phases of the TCP session life and make them all pass.

Change-Id: Ib048bc30c809a7f03be2de7e8361c2c281270348
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 754370f1b5)
2017-08-10 00:05:03 +00:00
Sergio Gonzalez Monroy 618f7b003e dpdk: only build SW crypto for x86_64 platforms
Change-Id: If559747ad59c82c81d15734f27e15548eca0962b
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-08-09 20:47:35 +00:00
Neale Ranns 024064d0a9 PPPoE: use DPO protos in FIB entry path add/remove
Change-Id: I6ac10ec0adf179b86f97269bbce2a7fd8796e72a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-09 05:35:02 -07:00
Hongjun Ni 62f9cdd82c Add PPPoE Plugin
Supports 64K PPPoE sessions

This plugin adds three graph nodes:
1) pppoe-input for PPPoE decapsulation
2) pppoe-encap for PPPoE encapsulation
3) pppoe-tap-dispatch for control plane process

Below is the configuration to make PPPoE CP and DP work:
vim /etc/vpp/startup.conf
tuntap {
  enable
  ethernet
  name newtap
}

create pppoe tap tap-if-index 1

//Configure it after a subscriber's PPPoE discovery and PPP link establishment succeeds:
create pppoe session client-ip 100.1.2.1 session-id 1 client-mac 00:11:01:00:00:01

show pppoe fib
show pppoe session

Change-Id: I73e724b6bf7c3e4181a9914c5752da1fa72d7e60
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-08-09 07:41:11 +00:00
Neale Ranns f73d0e2ea6 Allow multiple MPLS output labels to be passed on the CLI
Change-Id: Ib5af105e32b6b0df86923e189ab6bf6ee59de5b9
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-09 02:04:32 +00:00
Neale Ranns a3a3a9dedd ARP reply: use interface to build rewrite string
Change-Id: I488965e78d0b3291af4c82902098ca666317a22e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-09 02:02:25 +00:00
Neale Ranns da78f957e4 L2 over MPLS
[support for VPWS/VPLS]
- switch to using dpo_proto_t rather than fib_protocol_t in fib_paths so that we can describe L2 paths
- VLIB nodes to handle pop/push of MPLS labels to L2

Change-Id: Id050d06a11fd2c9c1c81ce5a0654e6c5ae6afa6e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-08 17:25:00 +00:00
Thomas F Herbert b60f4965bf Create source rpm.
Use actual file name for tarball.
Includes required modifications in spec file for unpacking srpm.
Spec file source references actual dist tarball name
so it matches the revision and release while building from srpm.

JIRA: VPP-498

Change-Id: I8b55a69f060b7864527b94d8c5b0a2ebccc306b1
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-08-08 15:29:11 +00:00
Andrew Yourtchenko 80cb2584c3 acl-plugin: fix a misplaced return (VPP-910)
It was uncaught by make test because the corresponding tests are not there yet - part of 17.10 deliverables

Change-Id: I55456f1874ce5665a06ee411c7abf37cd19ed814
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 58013b7350)
2017-08-08 13:27:04 +00:00
Neale Ranns de9fbf43d2 MAC IP ACL interface list dump (as an alternative to the get/reply)
Change-Id: I2e71aef1aa745e85ad3234b0b708cdc50f335a75
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-08-08 13:18:02 +00:00
Andrew Yourtchenko a5e614f76f acl-plugin: rework the optimization 7383, fortify acl-plugin memory behavior (VPP-910)
The further prolonged testing from testbed that reported VPP-910
has uncovered a couple of deeper issues with optimization from
7384, and the usage of subscripts rather than vec_elt_at_index()
allowed to hide a couple of further errors in the code.
Also, the current acl-plugin behavior of using the global
heap for its dynamic data is problematic - it makes
the troubleshooting much harder by potentially spreading
the problem around.

Based on this experience, this commits makes a few changes to fix
the issues seen, also improving the serviceability of the acl-plugin
code for the future:

- Use separate mheaps for any ACL-related control plane
operations and separate for the hash lookup datastructures,
to compartmentalize any memory-related issues for the ACL plugin.

- Ensure vec_elt_at_index() usage throughout the hash_lookup.c file.

- Use vectors rather than raw memory for storing the "ordinary" ACL rules.

- Rework the optimization from 7384 to use a separate tail pointer
rather than overloading the "prev" field.

- Make get_session_ptr() more conservative and adjust is_valid_session_ptr
accordingly

Change-Id: Ifda85193f361de5ed3782a4acd39622bd33c5830
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit bd9c5ffe39)
2017-08-08 09:43:53 +00:00
Filip Tehlar 7048ff1e3a LISP: Map-server fallback feature
Change-Id: I1356296e1a85b5d532f45ba70572b2184ac3f6fb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-08-07 14:53:56 +00:00
Klement Sekera 94384e4d3a make test: kill all remaining subprocesses on exit
This change introduces a wrapper script which kills all processes in
the same process group as itself (with the exception of the script).
Using this script to run the unit tests should prevent stale processes
left behind in some cases (e.g. when test framework crashes).

Change-Id: If3b9201c06b87fa6be095721436893207d09b5e4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-07 14:53:17 +00:00
Filip Tehlar 5391e19c9c LISP: fix map register TTL reply handler, VPP-926
Change-Id: I0c638ad5dabc035b4b7de3b9befbe2c8ba7b0b66
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-08-05 03:07:19 +00:00
Matej Perina 63a46fc9be jvpp: provide more detailed exception logs (VPP-436)
Error descriptions provided in api_errno.h are never used,
only error tag/name and number make it to enum vnet_api_error_t
so new macro is introduced in jvpp_common.c to extract message
according to error number and passed to VppCallbackException
constuctor.

Change-Id: If2a687752807d7250d9226987583df00f151e87f
Signed-off-by: Matej Perina <mperina@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-08-04 20:00:47 +00:00
Neale Ranns 5c994c15d8 don't truncate the interface name in 'sh ip arp'
Change-Id: Ifb17bae98ae1362078889d40e2369d58997bd92c
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-08-04 06:22:23 -07:00
Hongjun Ni e1bf572999 Initialize vxlan-gpe bypass mode
Change-Id: I2a75357d49a971818c8d96d56d184c5d01fbc775
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-08-04 09:07:34 +00:00
Matus Fabian 7801ca29b8 SNAT: fix address and port allocation for multiple worker threads (VPP-925)
There is a chance to allocate the same outside address and port.
Assign a block of port numbers to each worker.

Change-Id: I6ef7dc0aab4834705f4e6097c362940d18d747e8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-08-04 08:21:27 +00:00
Thomas F Herbert 33129bb9a3 Fix nasm deps for Fedora.
Fedora 24 and 25 distro already includes nasm 2.12 but Centos does not as yet.

Change-Id: I060ea8b7b7892ac8444d850398ed1c9100631fbc
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-08-04 07:12:06 +00:00
Andrew Yourtchenko 22d32d916f acl-plugin: multicore: CSIT c100k 2-core stateful ACL test does not pass (VPP-912)
Fix several threading-related issues uncovered by the CSIT scale/performance test:

- make the per-interface add/del counters per-thread

- preallocate the per-worker session pools rather than
  attempting to resize them within the datapath

- move the bihash initialization to the moment of ACL
  being applied rather than later during the connection creation

- adjust the connection cleaning logic to not require
  the signaling from workers to main thread

- make the connection lists check in the main thread robust against workers
  updating the list heads at the same time

- add more information to "show acl-plugin sessions" to aid in debugging

Change-Id: If82ef715e4993614df11db5e9afa7fa6b522d9bc
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 8e4222fc7e)
2017-08-03 17:00:35 +00:00
Neale Ranns 808c5b21c2 DHCP Client: receive unicast ACKs
despite VPP DHCP client setting neither ciaddr nor giaddr and setting the broadcast bit (see RFC 2131 section 4.1) some DHCP servers will still send a unicast DCHPACK. So as not to drop this VPP must have both 1) a receive FIB entry for the OFFERED IP adress and 2) a 'don't drop me because of uRPF' FIB entry for the DHCP server's address.

Change-Id: I167d858deb45629318cbdccf5bf67d971730a42f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-03 17:00:31 +00:00
John Lo 8d00fff8df Add support for API client to receive L2 MAC events
Added APIs want_l2_macs_events and l2_macs_event to allow an API
client to receive notification events from VPP for MAC learned
or aged in L2FIB. Only one API client is allowed for L2 MAC events.

The want_l2_macs_events API allow caller to specify MAC learn
limit, event scan delay and max number of MACs that can be included
in a event message. These parameters should be choosen properly as
to not have too many MAC events sent by VPP and overwhelm the API
share memory. They can all be left as 0's so VPP will setup reasonable
defaults which are: 1000 learn limit, 100 msec scan delay and 100
MACs per event message.

If want_l2_macs_events is never called, VPP learning and aging
should behave as before except that MAC entries provisioned by API
or CLI will not be aged, even if it is not set as static_mac. These
non static MACs, however, can be overwritten by MAC learning on a
MAC move as a leared MAC. Only learned MACs are subject to aging.

Change-Id: Ia3757a80cf8adb2811a089d2eafbd6439461285c
Signed-off-by: John Lo <loj@cisco.com>
2017-08-03 08:45:32 +00:00
jerryian a825c8bf5c gtpu bypass function doesn't work (VPP-924)
Change-Id: I80183f7d984ed6ed2e3405d1bb65fe761a29bc81
Signed-off-by: jerryian <gu.jian1@zte.com.cn>
2017-08-03 08:30:30 +00:00
Filip Tehlar 1e553a0038 LISP: make TTL for map register messages configurable
Change-Id: I38e1c6a6b033e12ef3f4345a1deff73fa4adbea0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-08-02 17:10:14 +00:00
Pavel Kotucek 5780898e5b Fix vpp crash sending arp or probing neighb (VPP-917)
VPP crash when trying to send arp message or to probe neighbor over
interface with IP address but without hw address (local0 and tunnels
- vxlan, gre, ...)

Change-Id: I08a1c97d3ea913fc11b2886cf73b2ccc31356664
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-08-02 16:06:30 +00:00
Dave Barach ac0c96bc56 Fix ip checksum offload, move badly-placed ASSERT
Change-Id: I5e04d618c4b4987edc64f6d82fd0a81b8362dbb0
Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-08-02 14:13:08 +00:00
Damjan Marion 34da892b41 memif: construct interface name out of socket file idx and intf id
Change-Id: Ib4de018a84e9c94df26a8870bf1b04e26204ace1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-02 13:26:38 +00:00
Marco Varlese 024e23ddd9 Added NASM package to support SW crypto
Change-Id: Idd6614b80e456eb40c760024b563ffd0e5c313ec
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-08-02 13:16:19 +00:00
Jan Gelety 83d8fdabca Update CSIT tests 170724 -> 170731
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I3ec322a71764d6d3e8aaeeabd4464fd6bde2880e
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-08-02 13:04:37 +00:00
Florin Coras 66b11318a1 Fix tcp tx buffer allocation
- Make tcp output buffer allocation macro an inline function
- Use per ip version per thread tx frames for retransmits and timer
  events
- Fix / parameterize tcp data structure preallocation
- Add a couple of gdb-callable show commands
- Fix local endpoint cleanup

Change-Id: I67b47b7570aa14cb4634b6fd93c57cd2eacbfa29
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2017-08-02 01:49:39 -07:00
Florin Coras fdbc38249a Make ip csum configurable in vlib buffer functions
Also fixes csum computation for lisp control plane 4o6 encapsulated control
messages.

Change-Id: I991e0b5c0d16dc51e0b5bdc79e1d752270b34765
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-08-02 00:03:45 +00:00
Neale Ranns a0a908f1df FIB path weight incorrect in dump (VPP-922)
Change-Id: I655f41878ca3595681d0255782b0faba01c9824b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-01 21:50:15 +00:00
Neale Ranns 42e6b097e0 Tests for recursive load-balancing with no choices.
Change-Id: I90bb3369576741d03628a818ffa63cc99d6e4c98
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-08-01 15:36:26 +00:00
Pavel Kotucek 15ac81c16f P2P Ethernet
Change-Id: Idb97e573961b3bc2acdeef77582314590795f8c3
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-08-01 14:44:13 +00:00
Eyal Bari 5b311202b8 SPAN/API:enable L2 dump
Change-Id: Icea1dff33aae35a85ae1a7ed1900a0abb3fe4b6b
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-08-01 02:32:53 +00:00
Dave Wallace b88566498a ssvm->name must be a vector containing a c-string.
Change-Id: I14a97a7fdd000da62d2ed4bea71f55ee34a21311
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-07-31 13:33:11 -04:00
Matej Perina 84f2882476 jvpp: moving current tests to separate folder marked as examples
Change-Id: Ib1a13e0a6cba69aba7a26e1bd52f4c55c4ccc027
Signed-off-by: Matej Perina <mperina@cisco.com>
2017-07-31 15:10:21 +00:00
Eyal Bari 942402b020 CLI:add l2 input/outut to "sh int features"
Change-Id: If608bbc7f4c8b0d5c3a237098a20279e407c82d3
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-31 13:10:02 +00:00
Florin Coras 91d341c260 Fix fib_path encoding (VPP-921)
Change-Id: I4c3b22c333b052d068f1a5977e9d4e38471693d6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-07-31 08:21:08 +00:00
Eyal Bari 4a7d50ee8d SPAN/CLI:fix disable + add errors
Change-Id: I3c697615698b622a2484df43fb78980be9b7ae98
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-31 00:58:48 +00:00
Florin Coras 68810624f8 Make tcp active open data structures thread safe
- Cleanup half-open connections and timers on the right thread
- Ensure half-open connection and transport endpoint pools are thread safe
- Enqueue TX events to the correct vpp thread in the builtin client
- Use transport proto in transport connections instead of session type

Change-Id: Id13239a206afbff6f34a38afa510fe014e4b2049
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2017-07-30 15:04:26 +00:00
Mohammed Hawari 03a6213fb5 ping: fixing wrong value when there are worker threads
- the echo_reply_node is now notifying the cli process on the main thread/vlib_main
- the timestamp for the icmp reply is now acquired in the echo_reply_node and not in the cli process to avoid an off by 10ms error (see 【vpp-dev】delay is error in ping with multi worker thread)

Change-Id: I21d37002b0376b4f2ccab08d8f04c2f2944b9b39
Signed-off-by: Mohammed Hawari <mhawari@cisco.com>
2017-07-27 22:10:26 +00:00
Damjan Marion c418e4ac7c Fix interface reuse when running multithreaded
Node function pointer was not set on all node runtimes causing crash if
new interface is different type.

Change-Id: I4661fe883befc6cd3fc6dfc14fd44f6fa5faf27c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-27 10:50:58 +00:00
Damjan Marion 6b0f589283 Thread safe internal buffer manager
Change-Id: I45845b952aa42a854e1c2c396b85f905de987020
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-27 10:50:34 +00:00
Steven 2ee2d57c3a vhost: debug vhost-user command needs better error checking on the syntax (VPP-916)
The syntax for debug vhost-user is
debug vhost-user <on | off>

However, currently the code does not reject the invalid command such as below
debug vhost-user
debug vhost-user on blah
debug vhost-user off blah

The fix is to enforece the correct syntax and reject the command when invalid
option is entered.

Change-Id: I1a04ae8ddb6dd299aa6d15b043362964e685ddde
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 6a4de2764d)
2017-07-27 08:12:31 +00:00
Thomas F Herbert 5b75b6b73b Use relative path to vpp.service.
This change is necessary to avoid breaking builds from source rpm.

JIRA: VPP-498

Change-Id: I876572ff75f88e22bf8012cabb1bde7e6d3c925a
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-07-27 08:11:52 +00:00
Florin Coras 7c35f191eb Fix lisp udp checksum
Change-Id: I16c3f5a97c45e504eec94ce131e854d7da9cd0e3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-07-26 14:43:15 +00:00
JingLiuZTE 30af5da752 VPP-905: Wrong define used in function start_workers.
Change-Id: I6a5faebb63e9360cebfcfb1bc3f3c0eb6b15e937
Signed-off-by: JingLiuZTE <liu.jing5@zte.com.cn>
2017-07-26 14:41:25 +00:00
Neale Ranns c3fbd95660 17.07 Release Note
Change-Id: Iffbfffac1c508b000451e9f0e0b688d80785f7f5
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit f4f635e7c0)
2017-07-26 10:38:02 +00:00
John Lo 7d4a22cdea Add sample config of bonded interface in startup.conf template
Change-Id: I3985befbdd2a1a1a0e9473095034d0da7e5c32ed
Signed-off-by: John Lo <loj@cisco.com>
2017-07-25 12:46:16 +00:00
Florin Coras 04e5344a35 Cleanup/refactor session layer code
Change-Id: Ica99e8cb919fca6b069c37c969d60e8ccc2c6bf9
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-07-25 11:17:20 +00:00
Matus Fabian f8d84901e4 SANT: fib_table unlock (VPP-918)
Change-Id: Ie0ad3671e3f4b55cd0f14601b6fed9ee2a1cbec0
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-07-25 09:11:06 +00:00
Jan Gelety 50b81e0703 Update CSIT tests 170626 -> 170724
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I5837921208bfdfe604c187c103e78b0924d802b9
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-07-24 14:19:14 +00:00
Eyal Bari 001fd406df SPAN:add l2 mirror
added span feature nodes for l2-input / l2-output

Change-Id: Ib6e0ce60d0811901b6edd70209e6a4c4a35cd8ff
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-24 08:21:52 +03:00
John Lo beb0b2e346 Improve L2 Input/Output Feature Infrastructure and Usage
Simplify L2 output feature infra to unify with L2 input feature
infra using the newly improved feature bitmap mechanism.
Updated all L2 features to use the more efficient infra functions.

Change-Id: If8f463826b0af0717129befe92a27ea8cfc40449
Signed-off-by: John Lo <loj@cisco.com>
2017-07-23 14:03:41 +00:00
Dave Barach 858c06fac6 Atomic bucket lock
Change-Id: I84908b9ad30d7555024e98b69ed37b111f31c27a
Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-07-23 00:55:13 +00:00
Florin Coras 6534b7aa13 Improvements to tcp rx path and debugging
- Increment rcv_nxt for fin packets
- Call tcp_segment_rcv only if buffer has data
- Parse rcv opts before deleting half-open connection
- Fix initial rcv_wnd
- Improved event logging

Change-Id: I9b83c04f432c4cec832c480b03e534deff02c3b1
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-07-21 19:20:09 -04:00
Matus Fabian 161c59c75c SNAT: in2out translation as an output feature hairpinning (VPP-913)
Change-Id: I3790739683c6090ffb2aefb4758bd4275856c09a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-07-21 03:46:47 -07:00
Andrew Yourtchenko faee17e8b8 acl-plugin: assertion failed at hash_lookup.c:226 when modifying ACLs applied as part of many (VPP-910)
change 7385 has added the code which has the first ACE's "prev" entry within the linked list of
shadowed ACEs pointing to the last ACE, in order to avoid the frequent linear list traversal.
That change was not complete and did not update this "prev" entry whenever the last ACE was deleted.
As a result the changes within the applied ACLs which caused the calls to hash_acl_unapply/hash_acl_apply
may result in hitting assert which does the sanity check. The solution is to add the missing update logic.

Change-Id: I9cbe9a7c68b92fa3a22a8efd11b679667d38f186
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 45fe739915)
2017-07-20 21:48:31 +00:00
Damjan Marion fb3288fe56 Fix coverity issue introduced with IP checksum offload commit
Change-Id: Ib5ad1369678389534426902ce698bccf7a6d9ec2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-20 21:47:57 +00:00
Dave Wallace 503766955c Prevent double freeing of first segment manager.
Change-Id: I27d7cb4c4e142f29a0c3c3ff85dd1f581970abfc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-07-20 21:45:00 +00:00
Thomas F Herbert 8d48722b09 Enable build from dist tarball independent of git.
This is necessary for downstream builds from
source rpm.

JIRA: VPP-498

Change-Id: I30ea51a19b153dc35ececbbca79b940fe4e3bc8a
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-07-20 20:10:09 +00:00
Matus Fabian 93d84c9fc2 SNAT: in2out translation as an output feature (VPP-903)
in2out translation as an output feature on the outside interface (postrouting)

Change-Id: I32c0311be09bdf102b9a0885b8b89c7588cb558f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-07-20 06:56:07 +00:00
Eyal Bari b12ac56c44 L2FWD:move vec_validate out of access function
Change-Id: Id9737b6aa2b6fe3032f4627dfdbd2ea728cc3fb1
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-20 00:24:21 +00:00
Dave Barach 908a5ea6e2 Add a bihash prefetchable bucket-level cache
According to Maciek, the easiest way to leverage the csit "performance
trend" job is to actually merge the patch once verified. Manual
testing indicates that the patch improves l2 path performance. Other
use-cases are TBD. It's possible that we'll need to back out the patch
depending on what happens.

Change-Id: Ic0a0363de35ef9be953ad7709c57c3936b73fd5a
Signed-off-by: Dave Barach <dave@barachs.net>
2017-07-19 23:25:43 +00:00
Dave Barach c4423229e2 Fix IP checksum offload metadata setup
Change-Id: Idf4f8b02337551670d6b7ce1a03799de9c53d19a
Signed-off-by: Dave Barach <dave@barachs.net>
2017-07-19 16:01:44 +00:00
Klement Sekera 60c1223acb make test: improve console output messages
Remove the word derp and replace it with a proper, more gramatically
correct message.

Change-Id: I04fd44cc67dace1a31ca48fc8ce67b246162ba79
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-07-18 20:52:47 +00:00
Neale Ranns 57b5860f01 FIB path preference
Paths are given a preference, lowest value is 'best'. Only paths that are up are up contribute to fprwarding - that's unchanged. What's new is that of the path's that re up only those that have the best preference contribute. A poor man's primary and backup. It's not true primary/backup function because the FIB must converge before the lower preference paths are used.

Change-Id: Ie4453c4a7b1094c6c2b51fe1594b8302103bb68e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-07-18 20:46:29 +00:00
Neale Ranns 51822bf07a DHCP client option 61 "client_id"
the existing seeting of client_id to a VPP version number was unused and so overridden

Change-Id: If9ebea936336f1fcca8d07e67186c95f8f8f0ccd
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-07-18 19:05:03 +00:00
Neale Ranns a2fbf6ba0e DHCP client - remove interface address when DHCP de-configured
Change-Id: I63c59e3c13859b51999d283774f7783ef0a6a5ed
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-07-18 19:01:00 +00:00
Dave Barach 2c0a4f407f TCP/UDP checksum offload API
Change-Id: I2cb6ce4e29813f6602b14e6e61713fb381fbcef8
Signed-off-by: Dave Barach <dave@barachs.net>
2017-07-18 17:05:01 +00:00
Eyal Bari 758137a7b7 TEST:add l2bd nd term tests
Change-Id: I67633175d50a70a0b8ae4f85c659b93070f8e1fb
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-18 15:02:29 +00:00
Dave Wallace d756b35032 Fix unlinking of /dev/shm files.
- api-segment prefix not used when unlinking shm files
- unlink root region on exit if no clients referenced
- stale reference to freed segment name
- don't add fake client to /db unless CLIB_DEBUG > 2
- turn off the gmond plugin
- clean up unused vars in vpp/api

Change-Id: I66451fcfd6ee64a12466c2d6c209050e3cdb74b7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2017-07-17 21:00:52 -04:00
Dave Barach 365a2b8510 Adjust replication context to match vnet_buffer(b)
Fixes a coverity warning, albeit not a serious issue.

Change-Id: I0fa28342ac4b222c1ba7f7f2befde455fd42d682
Signed-off-by: Dave Barach <dave@barachs.net>
2017-07-16 18:51:35 +00:00
Florin Coras 3eb5062b40 Fixes and improved tcp/session debugging
- Fix rx sack option parsing
- Add session sack scoreboard tracing and replaying
- Add svm fifo tracing and replaying
- Scoreboard/svm fifo ooo segment reception fixes
- Improved overall debugging

Change-Id: Ieae07eba355e66f5935253232bb00f2dfb7ece00
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-07-15 17:43:40 +00:00
Damjan Marion 213b5aae86 vnet_buffer_t flags cleanup
Change-Id: I123eccea98abafeb31f25d2a162501e2eded60d4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-14 15:41:57 +00:00
Damjan Marion 072401e809 Introduce l{2,3,4}_hdr_offset fields in the buffer metadata
To save space in the first cacheline following is changed:

- total_length_not_including_first_buffer moved to the 2nd cacheline.
This field is used only when VLIB_BUFFER_TOTAL_LENGTH_VALID and
VLIB_BUFFER_NEXT_PRESENT are both set.

- free_list_index is now stored in 4bits inside flags, which
allows up to 16 free lists. In case we need more we can store index
in the 2nd cachelin

Change-Id: Ic8521350819391af470d31d3fa1013e67ecb7681
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-14 15:39:24 +00:00
Andrew Li 0f09b77778 flowprobe: Fixed assert error with less than 1 second passive timer
When passive timer has less than 1 second left, it'll be forcifully
changed to 0 when converting from f64 to u64. As a result the
assertion will fail at the beginning of the passive timer start
fuction. This commit fixed this bug by adding a check of the delta.

Change-Id: I899b6e0ab4967dcecc821daf7e812dbbc90969ce
Signed-off-by: Andrew Li <zhaoxili@cisco.com>
2017-07-14 13:54:31 +00:00
Sergio Gonzalez Monroy 3b12cdc59c dpdk: update build
Current optional DPDK PMDs are:
- AESNI MB PMD (SW crypto)
- AESNI GCM PMD (SW crypto)
- MLX4 PMD
- MLX5 PMD

This change will always build DPDK SW crypto PMDs and required SW crypto
libraries, while MLX PMDs are still optional and the user has to build
required libraries.

Now the configure script detects if any of the optional DPDK PMDs were
built and link against their required libraries/dependencies.

Change-Id: I1560bebd71035d6486483f22da90042ec2ce40a1
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-07-14 13:04:44 +00:00
Igor Mikhailov (imichail) 19e9d954bd VPP-895 multi-thread: fix vpp crash on show runtime
In multi-threaded model (e.g. 1 main and 1 worker threads),
after an ethernet interface is deleted (e.g. vhost-user interface),
'show runtime' command produces garbled output and sometimes
leads to vpp crash.

The reason is because vlib_node_rename() frees and reallocates node's
'n->name' vector, however the change is not propagated into copies
of the node on worker threads.

Change-Id: Ibf22422913b7f2df22f70f3b2fe8dafd34c1dd06
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
(cherry picked from commit 02989064e4)
2017-07-13 22:17:53 +00:00
Chris Luke a2522f6fd5 dpdk: fix dpdk_buffer_pool_create name
- vnet_buffer_pool_create should probably be named
  dpdk_buffer_pool_create since that is what it does.
- Its prototype should also be in a DPDK plugin header, not in
  vlib/buffer_funcs.h, since the implementation is in the plugin
  and nobody else should be calling it.

Change-Id: I7ba259afa4b888bc94f3ad257305e286b41e7370
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-07-13 19:24:43 +00:00
Christophe Fontaine e2d40b8158 Use clib_crc32c_uses_intrinsics instead of __SSE4_2__
clib_crc32c is not limited to x86 platforms.

Change-Id: I5f6d5fdd4af80f9fe696d3317453fa58760df1db
Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
2017-07-13 14:34:25 +00:00
Christophe Fontaine 38cfe98d4e Fix typo for non x86 platforms.
Change-Id: Ic31b388cb972fb5f8a3fc42a5412401c3ee3e487
Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
2017-07-13 14:34:02 +00:00
John Lo b2fd6cb586 Fix crash with worker threads on 4K VXLAN/BD setup (VPP-907)
Cleanup mapping of interface output node for the l2-output node
when interface is configured to L2 or L3 modes. The mapping is
now always done in the main thread as part of API/CLI processing,
instead of initiate mapping in the forwarding path which can be
in the worker threads.

Change-Id: Ia789493e7d9f5c76d68edfaf34db43f3e3f53506
Signed-off-by: John Lo <loj@cisco.com>
(cherry picked from commit bea5ebf205)
2017-07-13 11:52:24 +00:00
Kristina Nevolnikova 8ae1873a3f Decrease steps necessary to upgrading RPM packages fixed
in %postun part and not call sysctl when VPP package is
upgrading provide by condition for sysctl --system
in %post part.

Change-Id: I549803864699e4a81cf589befe296d585e1c6d2b
Signed-off-by: Kristina Nevolnikova <knevolnikova@frinx.io>
2017-07-12 22:06:39 +00:00
Damjan Marion 10ae76627b Deprecate support for flattened output nodes
Change-Id: Id117e219146d9994340fb38c00233ea67db8929b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-12 21:12:36 +00:00
Damjan Marion 690d26c6b9 dpdk: prefetch 2nd cacheline of rte_mbuf during tx
Change-Id: I0db02dd0147dbd47d4296fdb84280d0e7d321f3c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-12 10:14:10 +00:00
Dave Barach 2c25a62cc1 Horizontal (nSessions) scaling draft
- Data structure preallocation.
- Input state machine fixes for mid-stream 3-way handshake retries.
- Batch connections in the builtin_client
- Multiple private fifo segment support
- Fix elog simultaneous event type registration
- Fix sacks when segment hole is added after highest sacked
- Add "accepting" session state for sessions pending accept
- Add ssvm non-recursive locking
- Estimate RTT for syn-ack
- Don't init fifo pointers. We're using relative offsets for ooo
  segments
- CLI to dump individual session

Change-Id: Ie0598563fd246537bafba4feed7985478ea1d415
Signed-off-by: Dave Barach <dbarach@cisco.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-07-11 15:40:19 +00:00
Eyal Bari 8af1b2fdec L2INPUT:fix features mask cailculation
Change-Id: I84cea7530b01302a0adeef95b4924f54dc2e41ec
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-11 14:59:30 +00:00
Damjan Marion e1f08898ae memif: avoid double buffer free
Change-Id: I902f54618c4e1f649af11497c1cb10922e43755a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-11 12:05:19 +02:00
Matus Fabian 3bb5baf9f2 SNAT: fixed bug in fallback to 3-tuple key for non TCP/UDP sessions
Change-Id: I1c4d5f92ec841b1cfe1a33eab4bb94e4001d0411
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-07-11 07:48:57 +00:00
Eyal Bari 75e2f2ac39 API:fix arp/ND event messages - remove context
context causes the message to be treated as a reply by the python API

Change-Id: Icf4d051a69f5a2cb9be5879accfe030ebcd650a8
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-10 19:39:21 +00:00
Damjan Marion 04a7f05e91 vlib: store buffer memory information in the buffer_main
Currently, buffer index is calculated as a offset to the physmem
region shifted by log2_cacheline size.

When DPDK is used we "hack" physmem data with information taken from
dpdk mempool. This makes physmem code not usable with DPDK.

This change makes buffer memory start and size independent of physmem
basically allowing physmem to be used when DPDK plugin is loaded.

Change-Id: Ieb399d398f147583b9baab467152a352d58c9c31
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-10 19:35:57 +00:00
Alexander Kotov 28160f3848 VPP-904: fixes zero length CLI parameters parse
Change-Id: I21fbc9aff2b97a8b3f4cbed202c00b6d84557a6e
Signed-off-by: Alexander Kotov <kot@yandex.ru>
2017-07-10 17:03:19 +00:00
Damjan Marion e2b3493029 memif: mask interrupts on startup if we are in the polling mode
Change-Id: Ief02eb1109a1bc463665d9747e9fa4e0c0e3d7e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-10 16:24:16 +00:00
Damjan Marion 191a1a407e vlib: fix issues with PCI handling code
- PCI devices not properly discovered
- vlib_pci_bus_master_enable () not working

Change-Id: I7433ab1b19b890b8900635b43037b9a2017a1921
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-10 15:42:27 +02:00
Chris Luke bb18ee6f1c format: Check for NaN when rendering doubles
- The result of 0.0/0.0 was being rendered as a lot of
  zeroes in the integer portion, as in this example:

  DBGvpp# show physmem
  0: 16 objects, 576k of 582k used, 3k free, 0 reclaimed, 2k overhead,
  16380k capacity
       alloc. from small object cache: 0 hits 0 attempts (0.00%) replacements 0
       alloc. from free-list: 0 attempts, 0 hits (0.00%), 0 considered (per-attempt 0.00)
       alloc. from vector-expand: 16
       allocs: 16 73643.06 clocks/call
       frees: 0 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.00 clocks/call

- Add two macros to vppinfra/math.h that use compiler builtins to check
  for NaN and Infinity and then use them in format_float().

Change-Id: Iccc03997e6e33d6b888d1e7e20cd78df0cfd02e8
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-07-09 14:43:17 -04:00
Ole Troan 4df9716515 API: Add Python3 support to vpp_papi.py
Change-Id: I0657b3f7578eb1b4d9a1ecabc14dc0f0e4647c65
Signed-off-by: Ole Troan <ot@cisco.com>
2017-07-08 23:11:43 +00:00
Steve Shin 042a621b90 lldp packet transmission on a bonded interface
LLDP packets are dropped at interface output node if each slave's link
is configured as the LLDP interface. The admin state is configured and
managed by the bonded interface, so slave link's state is down by default.
The checking for the admin state UP should be ignored for the slave link.

Change-Id: I06ca250f42fcb8cc50e0ea3a3817a2c5b56865df
Signed-off-by: Steve Shin <jonshin@cisco.com>
2017-07-08 14:00:49 +00:00
Eyal Bari 9a1ae1ac76 ETH:optimized double is_tagged check
a double version of is_tagged, uses "free lanes" in _mm_cmpeq_epi16
to check a second tag

this code was not yet tested for performance

Change-Id: I640017e1cc75c85a33d196ee911a7e4a512d9849
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-07 16:40:01 +00:00
Matus Fabian 7968e6cad5 SNAT: Fallback to 3-tuple key for non TCP/UDP sessions (VPP-884)
Change-Id: I4868ff6e81c579b29d3ea066976ae145f8b83e9e
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-07-07 07:04:42 +00:00
Dave Wallace 7b749fe890 Unlink /dev/shm files on application detach.
Change-Id: Ieb5522cd5cb27bcbce808d4cd6df5248716da43c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-07-06 23:28:27 +00:00
Neale Ranns 4729b1ec83 DHCP complete event sends mask length
Change-Id: I4a529dfab5d0ce6b0bbc0ccbbd89c6b109dbf917
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-07-06 20:52:58 +00:00
Ole Troan 1d7d2ab718 VPP-902: LISP-CP: Wrong size in one_l2_arp_entries_get message.
Change-Id: I56bf6b46527f9465d78ed7c08b6e216e50c135ec
Signed-off-by: Ole Troan <ot@cisco.com>
2017-07-06 17:15:08 +00:00
Damjan Marion 9b2cca99e2 dpdk: add FiftyGigabitEtherenet interface support
Change-Id: Ied8b26179cdf4add34440a9c396cb821716cfb8e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-06 13:29:46 +00:00
Steven 9d6d9894b1 devices: show interface rx-placement displays the wrong information (VPP-894)
show interface rx-placement somtimes displays the wrong interface names.
This happens when there exists subinterfaces in VPP.

The problem is due to the function show_interface_rx_placement_fn is calling
format_vnet_sw_if_index_name with hw_if_index instead of sw_if_index.

VPP has the concept of sw_if_index and hw_if_index. Each serves a different
purpose. When there is no subinterfaces, both hw_if_index and sw_if_index
may happen to have the same value. But don't count on it. When the API calls
for sw_if_index, we must pass the sw_if_index although the hw_if_index has
the same type which the compiler does not catch. Passing hw_if_index for an
API which requires sw_if_index may have an unpredictable result such as
described in the VPP-894 and sometimes it may even crash if the particular
index does not exist.

Change-Id: I76c4834f79b88a1c20684fcba64f14b2da142d77
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit bafa4d0484)
2017-07-06 13:27:25 +00:00
Chris Luke 475674ee5a unix: mkdir VPP_RUN_DIR before opening a socket in it
Change https://gerrit.fd.io/r/#/c/7230/ added a Unix domain
CLI socket in the default startup.conf; however unless you
had previously run VPP with the DPDK plugin enabled the
directory that it is created in. /run/vpp, would not exist
and startup would fail. This directory is typically hosted
in a tmpfs ramdisk and is thus ephemeral.

This patch adds a function that attempts to mkdir VPP_RUN_DIR
and uses it in both the DPDK plugin and the CLI code if the
CLI socket is to be created in that directory.

Change-Id: Ibbf925819099dce2b5eb0fa238b9edca1036d6fd
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-07-06 13:26:23 +00:00
Damjan Marion 31e59d9b01 vppinfra: revert clib_memcpy optimization
Looks like some compiler versions are producing wrong code when we are
copying 9-16 bytes so reverting back to the original code.

Change-Id: I74b5fa54a3b01f6288648f1cb0926030edd3b26f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-07-06 13:25:46 +00:00
John Lo 8b81cb4335 Send GARP/NA on bonded intf slave up/down if in active-backup mode
If a bonded interface is in active-backup mode and configured with
IPv4 and/or IPv6 addresses, on slave interface link up/down, send
a GARP packet if configured with an IPv4 address and an unsolcited
NA if configured with an IPv6 address. These packets can help with
faster route convergence in the next hop router/switch.

Change-Id: I68ccb11a4a40cda414704fa08ee0171c952befa2
Signed-off-by: John Lo <loj@cisco.com>
2017-07-06 13:24:26 +00:00
Billy McFall f6e3ad0f5e VPP-900: VPP is released under the Apache 2.0 License (ASL 2.0). Update RPM specfile to reflect the proper license.
Change-Id: I9e8d1643ea65afd91a0cd5ad9545248575e32617
Signed-off-by: Billy McFall <bmcfall@redhat.com>
(cherry picked from commit 01d2b4b13a)
2017-07-05 19:56:17 +00:00
Chris Luke 7447d07719 Buffer name inconsistently used a cstring/vec (VPP-901)
Spotted in the output of CLI command "show buffers", the name field
sometimes had trailing garbage, the hall sign of a string not being
terminated. In this case it was being inconsistently used as a cstring
or a vec.

- CLI printf needs %v to print the vec srring
- vlib_buffer_create_free_list_helper tried to use
  clib_mem_is_heap_object() to detect a vec object, wheras it should
  use clib_mem_is_vec()

Change-Id: Ib8b242a0c5a18924b8af7e8e1432784eebcf572c
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-07-05 17:23:41 +00:00
Steve Shin 99a0e60eb6 Add API support for LLDP config/interface set
Add API methods to configure LLDP and set interface to enable/disable.
Also add port description TLV for LLDP.

Change-Id: Ib959d488c2ab8a0069f143558871f41fcc43a5d3
Signed-off-by: Steve Shin <jonshin@cisco.com>
2017-07-05 00:56:54 +00:00
Andrew Yourtchenko a016216753 acl-plugin: VPP-897: applying of large number of ACEs is slow
When applying ACEs, in the new hash-based scheme, for each ACE
the lookup in the hash table is done, and either that ACE is added
to the end of the existing list if there is a match,
or a new list is created if there is no match.

Usually ACEs do not overlap, so this operation is fast, however,
the fragment-permit entries in case of a large number of ACLs
create a huge list which needs to be traversed for every other
ACE being added, slowing down the process dramatically.

The solution is to add an explicit flag to denote the first
element of the chain, and use the "prev" index of that
element to point to the tail element. The "next" field
of the last element is still ~0 and if we touch that
one, we do the linear search to find the first one,
but that is a relatively infrequent operation.

Change-Id: I352a3becd7854cf39aae65f0950afad7d18a70aa
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 204cf74aed)
2017-07-04 11:59:14 +00:00
Eyal Bari c86e592f9a TEST:add L2BD arp term tests
Change-Id: I42414da9663ecfc8dfe5baf3e6615cf3b9b02e22
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-07-04 11:57:35 +00:00
Andrew Yourtchenko 130a75384f acl-plugin: fix acl plugin test failing sporadically (VPP-898)
The "acl_plugin" tests has one of the tests sporadically fail with the following traceback:

r.reply.decode().rstrip('\x00') UnicodeDecodeError: 'ascii' codec can't decode byte
0xd8 in position 20666: ordinal not in range(128)

This occurs in the newly added "show acl-plugin table" debug CLI.
This CLI has only the numeric outputs, so the conclusion is that it is
the incorrect termination (trailing zero) that might be most probably
causing it. The other acl-plugins show commands also
lack the zero-termination termination, so fix all of them.
The particularity of this command vs. the other acl-plugin debug CLIs
is that the accumulator is freed and allocated multiple times,
this might explain the issue is not seen with them.

Change-Id: I87b5c0d6152fbebcae9c7d0ce97155c1ae6666db
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit be055bd719)
2017-07-04 08:57:54 +00:00
Matus Fabian 7c0aecc9e3 SNAT: fix failing test_session_limit_per_user (VPP-896)
Change-Id: Idf46a03803125babd9bb880363686359fbcca27d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit 860af5ad2b)
2017-07-03 17:24:19 +00:00
Klement Sekera 58eb866b15 Refactor API message handling code
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>
2017-07-01 13:54:28 +00:00
Damjan Marion b1dab65a08 top-level Makefile improvements
- auto-execute startup.vpp file if exists
- add DPDK_CONFIG=<string> to speficy custom config for autogenerated
  startup.conf, e.g. DPDK_CONFIG="no-pci"
- add DISABLED_PLUGINS=<comma separated list> option

e.g.

make DISABLED_PLUGINS=dpdk,acl run

or
export DISABLED_PLUGINS=dpdk,acl
make run

Change-Id: Ib0891d27aeae16b69b67c4c3e893bb3dbde5e7e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-06-30 18:17:43 +00:00
Dave Barach 12c6fdc551 VPP-893: handle multiple simultaneous event registrations
Change-Id: I8cd90820624987dbef848935e2de86fa66a86c17
Signed-off-by: Dave Barach <dave@barachs.net>
2017-06-30 16:24:18 +00:00
Neale Ranns bb620d74b2 VPP debug image with worker threads hit assert on adding IP route with traffic (VPP-892)
When stacking DPOs the VLIB graph is also updated to add the edge between the nodes, if this edge does not yet exist. This addition should be done with the workers stopped.

Change-Id: I327e4d7d26f0b23eb280f17e4619ff2093ff7940
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit c02bd03ddf)
2017-06-30 13:55:23 +00:00
Jakub Grajciar 3e01588bf3 memif: API message handler registration bug-fix
- removed memif details message from memif API

Change-Id: I21185e7678f375cc10639cdbc3ad2fd84bc95459
Signed-off-by: Jakub Grajciar <grajciar.jakub@gmail.com>
2017-06-30 13:59:23 +02:00
Klement Sekera 3d62a7f0b9 LLDP: properly parse lldp cmds from startup config
Change-Id: I0e6c86bd923fcf7cf16f948b9869a5927e6d3745
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-06-29 11:41:36 +00:00
Christophe Fontaine 26054ea1d1 Fix SIGBUS on aarch64
A call to 'clib_smp_swap (&((dq)->interrupt_pending), 0)' was creating
a SIGBUS.
Instead of making dq->interrupt_pending aligned on 64bits, we reduce the size
from uword (u64) to u32, as the number of pending interrupts will never
go above max of u32.

Change-Id: Ifa5a6d3b7adee222329a671be01305cf50853b33
Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
2017-06-29 11:40:45 +00:00
Dave Barach 5c20a0131a switch vlib process model to tw_timer_template timer impl
Change-Id: I36bb47faea55a6fea7af7ee58d87d8f6dd28f93d
Signed-off-by: Dave Barach <dave@barachs.net>
2017-06-28 19:12:10 +00:00
Eyal Bari 31a71ab497 L2-LEARN:fix l2fib entry seq num not updated on hit (VPP-888)
fixed instability in l2bd_multi_instnce test - sometimes failing with extra
packets captured

it appears l2-learn was not updating hit entries but rather a copy of them.

if the ager did not have a chance to run before the test was running the
learning cycle - entries were not updated with the packet's seq num - causing
packets to flood when hitting the stale seq_num in l2-fwd - hence the extra
packets

fixed handling of filter entries

revert workaround for instability in test

Change-Id: I16d918e6310a5bf40bad5b7335b2140c2867cb71
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit 25ff2ea3a3)
2017-06-27 12:44:28 +00:00
Ole Troan ed92925f4d FLOWPROBE: Add flowstartns, flowendns and tcpcontrolbits
- fixed problem with tcp_flag
- changed flowtimestamp into NTP format
Change-Id: I4ef05d6c69c5c078a0c80d59c5ccb0c85b924ba6
Signed-off-by: Ole Troan <ot@cisco.com>
2017-06-27 12:01:34 +02:00
Jan Gelety 75c3995b21 Update CSIT tests 170622 -> 170626
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I3e429f3884953908209e5f2d4e7a254dc7ccb720
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-06-26 21:48:26 +00:00
Ole Troan c08b0965d7 VPP-889: MAP Stats API/CLI crashes when no domains.
Change-Id: Ib7824bfc08cb3c8f20258379e1a1f2c159c4f687
Signed-off-by: Ole Troan <ot@cisco.com>
2017-06-26 19:49:36 +02:00
Hongjun Ni 04ffd0ad83 VPP crash on creating vxlan gpe interface. VPP-875
Change-Id: I6b19634ecb03860a7624d9408e09b52e95f47aef
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-06-25 08:09:29 +00:00
Hongjun Ni fcfa38d680 Add Maintainers for Vxlan-gpe feature
Change-Id: I3f42e9bbd816a6e2192cc65eeb10a4681cf9e29a
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-06-25 08:08:43 +00:00
Milan Lenco 5fa72c8f1f memif: If rx/tx_queues are unset, use default values
The standard behaviour for binary API is that zeroed arguments are
treated as if the default values were set. This way the configurator
does not need to know what default values are.
This, however, wasn't the case for rx_queues and tx_queues in
memif_create binary API message.

Change-Id: Ib588b472823f6bbb5ef12a798d68b0dda6dd2139
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
2017-06-25 08:07:58 +00:00
Damjan Marion aad20988b6 Rewrite vppctl in C
- removes python dependency
- removes vpp_api_test dependency
- communicates over unix socket
- properly detects terminal size and type
- responds on terminal resize

Change-Id: I46c0a49f9b5f9ef8a0a31faec4fc5d49aa3ee02e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-06-24 15:14:14 +00:00
Chris Luke b2861e8fb6 make: Fix parallel building with some container platforms (VPP-880)
With some Linux container platforms /proc/cpuinfo reads as an empty
file. (Aside: stat on /proc/cpuinfo always indicates a length of
zero bytes, regardless of its content).

This has the effect that the make '-j' parameter being passed the
unhelpful value of '0' both in build-root/Makefile and dpdk/Makefile.
Make complains with the error:

  make: the '-j' option requires a positive integer argument

This patch checks for '0' and replaces it with '2' as a reasonable
number of jobs to run in parallel when the CPU count isn't known
(and assumed to be one). It also makes the value determination
consistent between VPP and DPDK (2*ncpu).

Change-Id: I78b89420114a825fab4d339e4f9291d486b7b9c8
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-06-24 14:02:37 +00:00
Pavel Kotucek 9f5a2b6310 IP4/IP6 FIB: fix crash during interface delete
after deleting a sub interface with IP4/IP6 address vpp crash

Change-Id: Ie768ca845b9e2394f61e2a8e9722a80a788746e7
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-06-23 08:11:59 +02:00
Neale Ranns 39f92401c6 Update master revision to 17.10
Change-Id: I0b74cad60be4edace5c3636922cfb9c26cfde9ff
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-06-22 14:43:55 -07:00
639 changed files with 72452 additions and 13652 deletions
+38
View File
@@ -0,0 +1,38 @@
---
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BinPackParameters: true
BreakBeforeBraces: GNU
ColumnLimit: 79
IndentCaseLabels: false
MaxEmptyLinesToKeep: 1
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Always
SpacesBeforeTrailingComments: 1
SpacesInParentheses: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: true
Cpp11BracedListStyle: true
Standard: Cpp11
SortIncludes: false
IndentWidth: 2
TabWidth: 4
UseTab: Never
IndentFunctionDeclarationAfterType: false
ContinuationIndentWidth: 4
...
+7 -1
View File
@@ -10,15 +10,19 @@
/build-root/path_setup
/build-root/build-config.mk
/build-root/deb/debian/vpp-plugins/
/build-root/deb/.pybuild/
/build-root/*.deb
/build-root/*.rpm
/build-root/*.changes
/build-root/test-doc/
/build-root/test-cov/
/build-root/python/
/build-root/vapi_test/
/build-config.mk
/dpdk/*.tar.gz
/dpdk/*.tar.xz
/dpdk/vpp-dpdk*.deb
/dpdk/vpp-dpdk*.changes
/path_setup
/tools/
# start autotools ignore
@@ -48,16 +52,18 @@ ltmain.sh
ylwrap
test-driver
.cproject
*.iml
.bootstrap.ok
.settings
.autotools
# stop autotools ignore
# OSX and some IDE
.DS_Store
.idea/
.project
.cproject
.vscode/
# cscope and ctags
/cscope.*
+1
View File
@@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/1710
+26 -3
View File
@@ -108,10 +108,28 @@ VNET MPLS
M: Neale Ranns <nranns@cisco.com>
F: src/vnet/mpls/
VNET Host Stack Session Layer
M: Florin Coras <fcoras@cisco.com>
F: src/vnet/session
VNET TCP Stack
M: Florin Coras <fcoras@cisco.com>
F: src/vnet/tcp
VNET VXLAN
M: John Lo <loj@cisco.com>
F: src/vnet/vxlan/
VNET VXLAN-GPE
M: Keith Burns <alagalah@gmail.com>
M: Hongjun Ni <hongjun.ni@intel.com>
F: src/vnet/vxlan-gpe/
Plugin - ACL
M: Andrew Yourtchenko <ayourtch@gmail.com>
F: src/plugins/acl/
F: src/plugins/acl.am
Plugin - flowprobe
M: Ole Troan <otroan@employees.org>
F: src/plugins/flowprobe/
@@ -123,9 +141,14 @@ F: src/plugins/sixrd/
F: src/plugins/sixrd.am
Plugin - GTPU
M: Hongjun Ni <hongjun.ni@intel.com>
F: src/plugins/gtpu/
F: src/plugins/gtpu.am
M: Hongjun Ni <hongjun.ni@intel.com>
F: src/plugins/gtpu/
F: src/plugins/gtpu.am
Plugin - PPPoE
M: Hongjun Ni <hongjun.ni@intel.com>
F: src/plugins/pppoe/
F: src/plugins/pppoe.am
Test Infrastructure
M: Klement Sekera <ksekera@cisco.com>
+94 -40
View File
@@ -17,8 +17,27 @@ CCACHE_DIR?=$(BR)/.ccache
GDB?=gdb
PLATFORM?=vpp
SAMPLE_PLUGIN?=no
export AESNI?=y
MINIMAL_STARTUP_CONF="unix { interactive }"
,:=,
define disable_plugins
$(if $(1), \
"plugins {" \
$(patsubst %,"plugin %_plugin.so { disable }",$(subst $(,), ,$(1))) \
" }" \
,)
endef
MINIMAL_STARTUP_CONF=" \
unix { \
interactive \
cli-listen /run/vpp/cli.sock \
gid $(shell id -g) \
$(if $(wildcard startup.vpp),"exec startup.vpp",) \
} \
$(if $(DPDK_CONFIG), "dpdk { $(DPDK_CONFIG) }",) \
$(call disable_plugins,$(DISABLED_PLUGINS)) \
"
GDB_ARGS= -ex "handle SIGUSR1 noprint nostop"
@@ -37,42 +56,67 @@ else ifeq ($(filter rhel centos fedora opensuse,$(OS_ID)),$(OS_ID))
PKG=rpm
endif
DEB_DEPENDS = curl build-essential autoconf automake bison libssl-dev ccache
DEB_DEPENDS += debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd
# +libganglia1-dev if building the gmond plugin
DEB_DEPENDS = curl build-essential autoconf automake bison ccache
DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-systemd
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
DEB_DEPENDS += lcov chrpath autoconf nasm indent
DEB_DEPENDS += python-all python-dev python-virtualenv python-pip libffi6
DEB_DEPENDS += lcov chrpath autoconf nasm indent libnuma-dev
DEB_DEPENDS += python-all python-dev python-virtualenv python-pip libffi6 check
ifeq ($(OS_VERSION_ID),14.04)
DEB_DEPENDS += openjdk-8-jdk-headless
DEB_DEPENDS += libssl-dev
else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
DEB_DEPENDS += openjdk-8-jdk-headless
DEB_DEPENDS += libssl-dev
APT_ARGS = -t jessie-backports
else
else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-9)
DEB_DEPENDS += default-jdk-headless
DEB_DEPENDS += libssl1.0-dev
else
DEB_DEPENDS += default-jdk-headless
DEB_DEPENDS += libssl-dev
endif
RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils
RPM_DEPENDS += openssl-devel https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm apr-devel
RPM_DEPENDS += python-devel
RPM_DEPENDS += apr-devel
RPM_DEPENDS += numactl-devel
RPM_DEPENDS += check
ifeq ($(OS_ID)-$(OS_VERSION_ID),fedora-25)
RPM_DEPENDS += openssl-devel
RPM_DEPENDS += python-devel
RPM_DEPENDS += python2-virtualenv
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
else ifeq ($(shell if [ "$(OS_ID)" = "fedora" ]; then test $(OS_VERSION_ID) -gt 25; echo $$?; fi),0)
RPM_DEPENDS += compat-openssl10-devel
RPM_DEPENDS += python2-devel
RPM_DEPENDS += python2-virtualenv
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
else
RPM_DEPENDS += openssl-devel
RPM_DEPENDS += python-devel
RPM_DEPENDS += python-virtualenv
RPM_DEPENDS_GROUPS = 'Development Tools'
endif
# +ganglia-devel if building the ganglia plugin
RPM_DEPENDS += chrpath libffi-devel rpm-build
RPM_DEPENDS += https://kojipkgs.fedoraproject.org//packages/nasm/2.12.02/2.fc26/x86_64/nasm-2.12.02-2.fc26.x86_64.rpm
EPEL_DEPENDS = libconfuse-devel ganglia-devel epel-rpm-macros
ifeq ($(filter rhel centos,$(OS_ID)),$(OS_ID))
EPEL_DEPENDS += lcov
else
RPM_DEPENDS += lcov
ifeq ($(OS_ID),fedora)
RPM_DEPENDS += nasm
else ifeq ($(findstring y,$(AESNI)),y)
RPM_DEPENDS += https://kojipkgs.fedoraproject.org//packages/nasm/2.12.02/2.fc26/x86_64/nasm-2.12.02-2.fc26.x86_64.rpm
endif
RPM_SUSE_DEPENDS = autoconf automake bison ccache chrpath distribution-release gcc6 glibc-devel-static
RPM_SUSE_DEPENDS += java-1_8_0-openjdk-devel libopenssl-devel libtool lsb-release make openssl-devel
RPM_SUSE_DEPENDS += python-devel python-pip python-rpm-macros shadow
RPM_SUSE_DEPENDS += java-1_8_0-openjdk-devel libopenssl-devel libtool make openssl-devel
RPM_SUSE_DEPENDS += python-devel python3-devel python-pip python3-pip python-rpm-macros shadow nasm libnuma-devel python3
ifeq ($(filter rhel centos,$(OS_ID)),$(OS_ID))
RPM_DEPENDS += python34
else
RPM_DEPENDS += python3
endif
ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf
@@ -139,16 +183,21 @@ help:
@echo " test-checkstyle - check PEP8 compliance for test framework"
@echo ""
@echo "Make Arguments:"
@echo " V=[0|1] - set build verbosity level"
@echo " STARTUP_CONF=<path> - startup configuration file"
@echo " (e.g. /etc/vpp/startup.conf)"
@echo " STARTUP_DIR=<path> - startup drectory (e.g. /etc/vpp)"
@echo " It also sets STARTUP_CONF if"
@echo " startup.conf file is present"
@echo " GDB=<path> - gdb binary to use for debugging"
@echo " PLATFORM=<name> - target platform. default is vpp"
@echo " TEST=<filter> - apply filter to test set, see test-help"
@echo " SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin"
@echo " V=[0|1] - set build verbosity level"
@echo " STARTUP_CONF=<path> - startup configuration file"
@echo " (e.g. /etc/vpp/startup.conf)"
@echo " STARTUP_DIR=<path> - startup drectory (e.g. /etc/vpp)"
@echo " It also sets STARTUP_CONF if"
@echo " startup.conf file is present"
@echo " GDB=<path> - gdb binary to use for debugging"
@echo " PLATFORM=<name> - target platform. default is vpp"
@echo " TEST=<filter> - apply filter to test set, see test-help"
@echo " DPDK_CONFIG=<conf> - add specified dpdk config commands to"
@echo " autogenerated startup.conf"
@echo " (e.g. \"no-pci\" )"
@echo " SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin"
@echo " DISABLED_PLUGINS=<list> - comma separated list of plugins which"
@echo " should not be loaded"
@echo ""
@echo "Current Argument Values:"
@echo " V = $(V)"
@@ -157,7 +206,9 @@ help:
@echo " GDB = $(GDB)"
@echo " PLATFORM = $(PLATFORM)"
@echo " DPDK_VERSION = $(DPDK_VERSION)"
@echo " DPDK_CONFIG = $(DPDK_CONFIG)"
@echo " SAMPLE_PLUGIN = $(SAMPLE_PLUGIN)"
@echo " DISABLED_PLUGINS = $(DISABLED_PLUGINS)"
$(BR)/.bootstrap.ok:
ifeq ($(findstring y,$(UNATTENDED)),y)
@@ -172,13 +223,9 @@ ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
fi ; \
exit 0
else ifneq ("$(wildcard /etc/redhat-release)","")
@for i in $(RPM_DEPENDS) $(EPEL_DEPENDS) ; do \
@for i in $(RPM_DEPENDS) ; do \
RPM=$$(basename -s .rpm "$${i##*/}" | cut -d- -f1,2,3) ; \
if [[ "$$RPM" =~ "epel-release-latest" ]] ; then \
MISSING+=$$(rpm -q epel-release | grep "^package") ; \
else \
MISSING+=$$(rpm -q $$RPM | grep "^package") ; \
fi ; \
MISSING+=$$(rpm -q $$RPM | grep "^package") ; \
done ; \
if [ -n "$$MISSING" ] ; then \
echo "Please install missing RPMs: \n$$MISSING\n" ; \
@@ -221,7 +268,6 @@ endif
else ifneq ("$(wildcard /etc/redhat-release)","")
@sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E yum install $(CONFIRM) --enablerepo=epel $(EPEL_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs zlib
else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
@sudo -E zypper -n install -y $(RPM_SUSE_DEPENDS)
@@ -244,12 +290,17 @@ DIST_FILE = $(BR)/vpp-$(shell src/scripts/version).tar
DIST_SUBDIR = vpp-$(shell src/scripts/version|cut -f1 -d-)
dist:
@git archive \
--prefix=$(DIST_SUBDIR)/ \
--format=tar \
-o $(DIST_FILE) \
HEAD
@git describe > $(BR)/.version
@if git rev-parse 2> /dev/null ; then \
git archive \
--prefix=$(DIST_SUBDIR)/ \
--format=tar \
-o $(DIST_FILE) \
HEAD ; \
git describe > $(BR)/.version ; \
else \
(cd .. ; tar -cf $(DIST_FILE) $(DIST_SUBDIR) --exclude=*.tar) ; \
src/scripts/version > $(BR)/.version ; \
fi
@tar --append \
--file $(DIST_FILE) \
--transform='s,.*/.version,$(DIST_SUBDIR)/src/scripts/.version,' \
@@ -396,6 +447,9 @@ pkg-deb:
pkg-rpm: dist
make -C extras/rpm
pkg-srpm: dist
make -C extras/rpm srpm
dpdk-install-dev:
make -C dpdk install-$(PKG)
@@ -459,7 +513,7 @@ endif
$(call banner,"Building $(PKG) packages")
@make pkg-$(PKG)
ifeq ($(OS_ID)-$(OS_VERSION_ID),ubuntu-16.04)
@make test
@make COMPRESS_FAILED_TEST_LOGS=yes test
endif
+64
View File
@@ -1,11 +1,75 @@
# Release Notes {#release_notes}
* @subpage release_notes_1707
* @subpage release_notes_1704
* @subpage release_notes_17011
* @subpage release_notes_1701
* @subpage release_notes_1609
* @subpage release_notes_1606
@page release_notes_1707 Release notes for VPP 17.07
More than 400 commits since the 1704 release.
## Features
- Infrastructure
- make test; improved debuggability.
- TAB auto-completion on the CLI
- DPDK 17.05
- python 3 support in test infra
- Host stack
- Improved Linux TCP stack compatibility using IWL test suite (https://jira.fd.io/browse/VPP-720)
- Improved loss recovery (RFC5681, RFC6582, RF6675)
- Basic implementation of Eifel detection algorithm (RFC3522)
- Basic support for buffer chains
- Refactored session layer API
- Overall performance, scale and hardening
- Interfaces
- memif: IP mode, jumbo frames, multi queue
- virtio-user support
- vhost-usr; adaptive (poll/interupt) support.
- Network features
- MPLS Multicast FIB
- BFD FIB integration
- NAT64 support
- GRE over IPv6
- Segement routing MPLS
- IOAM configuration for SRv6 localsid
- LISP
- NSH support
- native forward static routes
- L2 ARP
- ACL multi-core suuport
- Flowprobe:
- Add flowstartns, flowendns and tcpcontrolbits
- Stateful flows and IPv6, L4 recording
- GTP-U support
- VXLAN GPE support for FIB2.0 and bypass.
## Known issues
For the full list of issues please reffer to fd.io [JIRA](https://jira.fd.io).
## Issues fixed
For the full list of fixed issues please reffer to:
- fd.io [JIRA](https://jira.fd.io)
- git [commit log](https://git.fd.io/vpp/log/?h=stable/1707)
@page release_notes_1704 Release notes for VPP 17.04
More than 500 commits since the 1701 release.
-5
View File
@@ -10,11 +10,6 @@ DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \
DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
DPDK_DEBUG=$(DPDK_DEBUG)
DPDK_CRYPTO_SW_PMD=$(strip $($(PLATFORM)_uses_dpdk_cryptodev_sw))
ifneq ($(DPDK_CRYPTO_SW_PMD),)
DPDK_MAKE_ARGS += DPDK_CRYPTO_SW_PMD=y
endif
DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd))
ifneq ($(DPDK_MLX5_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y
+2 -3
View File
@@ -23,12 +23,11 @@ vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)/dpdk
vpp_LDFLAGS += $(call installed_libs_fn, dpdk)
vpp_CPPFLAGS += -I/usr/include/dpdk
endif
ifeq ($($(PLATFORM)_uses_dpdk_cryptodev_sw),yes)
vpp_configure_args += --with-dpdk-crypto-sw
endif
ifeq ($($(PLATFORM)_uses_dpdk_mlx5_pmd),yes)
vpp_configure_args += --with-dpdk-mlx5-pmd
endif
else
vpp_configure_args += --disable-dpdk-plugin
endif
ifeq ($($(PLATFORM)_enable_tests),yes)
+1 -2
View File
@@ -36,10 +36,9 @@ vpp_uses_dpdk = yes
# Uncoment to enable building unit tests
# vpp_enable_tests = yes
vpp_root_packages = vpp gmod
vpp_root_packages = vpp
# DPDK configuration parameters
# vpp_uses_dpdk_cryptodev_sw = yes
# vpp_uses_dpdk_mlx5_pmd = yes
# vpp_uses_external_dpdk = yes
# vpp_dpdk_inc_dir = /usr/include/dpdk
+8 -10
View File
@@ -165,6 +165,7 @@ BASIC_ARCH = \
# x86_64 can be either 32/64. set BIACH=32 to get 32 bit libraries.
BIARCH = 64
aarch64_libdir = 64
x86_64_libdir = $(BIARCH)
native_libdir = $($(NATIVE_ARCH)_libdir)
@@ -653,16 +654,13 @@ configure_check_timestamp = \
# Package build
######################################################################
linux_n_cpus = `grep '^processor' /proc/cpuinfo | wc -l`
MAKE_PARALLEL_JOBS = \
-j $(shell \
if [ -f /proc/cpuinfo ] ; then \
expr 2 '*' $(linux_n_cpus) ; \
else \
echo 1 ; \
fi)
# /proc/cpuinfo does not exist on platforms without a /proc and on some
# platforms, notably inside containers, it has no content. In those cases
# we assume there's 1 processor; we use 2*ncpu for the -j option.
# NB: GNU Make 4.2 will let us use '$(file </proc/cpuinfo)' to both test
# for file presence and content; for now this will have to do.
MAKE_PARALLEL_JOBS = -j $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo), \
$(shell expr 2 '*' $$(grep -c ^processor /proc/cpuinfo)), 2)
MAKE_PARALLEL_FLAGS = $(if $($(PACKAGE)_make_parallel_fails),,$(MAKE_PARALLEL_JOBS))
# Make command shorthand for packages & tools.
+57 -12
View File
@@ -32,37 +32,82 @@ fi
# don't *fail*.
command -v indent > /dev/null
if [ $? != 0 ]; then
echo "Cound not find required commend \"indent\". Checkstyle aborted"
echo "Cound not find required command \"indent\". Checkstyle aborted"
exit ${EXIT_CODE}
fi
indent --version
# Check to make sure we have clang-format. Exit if we don't with an error message, but
# don't *fail*.
command -v clang-format > /dev/null
HAVE_CLANG_FORMAT=0
if [ $? != 0 ]; then
echo "Could not find command \"clang-format\". Checking C++ files will cause abort"
else
clang-format --version
x=$(echo "" | clang-format 2>&1)
if [[ "$x" == "" ]]; then
HAVE_CLANG_FORMAT=1
else
echo "Output produced while formatting empty file (expected empty string):"
echo "$x"
echo "Could not find working \"clang-format\". Checking C++ files will cause abort"
fi
fi
cd ${VPP_DIR}
git status
for i in ${FILELIST}; do
if [ -f ${i} ] && [ ${i} != "build-root/scripts/checkstyle.sh" ] && [ ${i} != "extras/emacs/fix-coding-style.el" ]; then
grep -q "fd.io coding-style-patch-verification: ON" ${i}
if [ $? == 0 ]; then
EXTENSION=`basename ${i} | sed 's/^\w\+.//'`
case ${EXTENSION} in
hpp|cpp|cc|hh)
CMD="clang-format"
if [ ${HAVE_CLANG_FORMAT} == 0 ]; then
echo "C++ file detected. Abort. (missing clang-format)"
exit ${EXIT_CODE}
fi
;;
*)
CMD="indent"
;;
esac
CHECKSTYLED_FILES="${CHECKSTYLED_FILES} ${i}"
if [ ${FIX} == 0 ]; then
indent ${i} -o ${i}.out1 > /dev/null 2>&1
indent ${i}.out1 -o ${i}.out2 > /dev/null 2>&1
# Remove trailing whitespace
sed -i -e 's/[[:space:]]*$//' ${i}.out2
if [ "${CMD}" == "clang-format" ]
then
clang-format ${i} > ${i}.out2
else
indent ${i} -o ${i}.out1 > /dev/null 2>&1
indent ${i}.out1 -o ${i}.out2 > /dev/null 2>&1
fi
# Remove trailing whitespace
sed -i -e 's/[[:space:]]*$//' ${i}.out2
diff -q ${i} ${i}.out2
else
indent ${i}
indent ${i}
# Remove trailing whitespace
sed -i -e 's/[[:space:]]*$//' ${i}
if [ "${CMD}" == "clang-format" ]; then
clang-format -i ${i} > /dev/null 2>&1
else
indent ${i}
indent ${i}
fi
# Remove trailing whitespace
sed -i -e 's/[[:space:]]*$//' ${i}
fi
if [ $? != 0 ]; then
EXIT_CODE=1
echo
echo "Checkstyle failed for ${i}."
echo "Run indent (twice!) as shown to fix the problem:"
echo "indent ${VPP_DIR}${i}"
echo "indent ${VPP_DIR}${i}"
if [ "${CMD}" == "clang-format" ]; then
echo "Run clang-format as shown to fix the problem:"
echo "clang-format -i ${VPP_DIR}${i}"
else
echo "Run indent (twice!) as shown to fix the problem:"
echo "indent ${VPP_DIR}${i}"
echo "indent ${VPP_DIR}${i}"
fi
fi
if [ -f ${i}.out1 ]; then
rm ${i}.out1
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/sh
echo oper-170622
echo oper-170926
+1
View File
@@ -18,3 +18,4 @@ Several modules provide operational, dataplane-user focused documentation.
- @subpage srmpls_doc
- @subpage sample_plugin_doc
- @subpage nat64_doc
- @subpage api_doc
+125 -38
View File
@@ -19,30 +19,48 @@ DPDK_INSTALL_DIR ?= $(CURDIR)/_install
DPDK_PKTMBUF_HEADROOM ?= 128
DPDK_DOWNLOAD_DIR ?= $(HOME)/Downloads
DPDK_DEBUG ?= n
DPDK_CRYPTO_SW_PMD ?= n
DPDK_MLX4_PMD ?= n
DPDK_MLX5_PMD ?= n
B := $(DPDK_BUILD_DIR)
I := $(DPDK_INSTALL_DIR)
DPDK_VERSION ?= 17.05
PKG_SUFFIX ?= vpp5
DPDK_VERSION ?= 17.08
PKG_SUFFIX ?= vpp1
DPDK_BASE_URL ?= http://fast.dpdk.org/rel
DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
DPDK_17.02_TARBALL_MD5_CKSUM := 6b9f7387c35641f4e8dbba3e528f2376
DPDK_17.05_TARBALL_MD5_CKSUM := 0a68c31cd6a6cabeed0a4331073e4c05
DPDK_17.08_TARBALL_MD5_CKSUM := 0641f59ea8ea98afefa7cfa2699f6241
DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION)
MACHINE=$(shell uname -m)
ifeq ($(DPDK_CRYPTO_SW_PMD),y)
AESNIMB_LIB_TARBALL := v0.44-gcm.2.tar.gz
AESNIMB_LIB_TARBALL_URL := http://github.com/01org/intel-ipsec-mb/archive/$(AESNIMB_LIB_TARBALL)
AESNIMB_LIB_SOURCE := $(B)/intel-ipsec-mb-0.44-gcm.2
ISA_L_CRYPTO_LIB_TARBALL := isa_l_crypto.tar.gz
ISA_L_CRYPTO_LIB_TARBALL_URL := http://github.com/01org/isa-l_crypto/archive/master.tar.gz
ISA_L_CRYPTO_LIB_SOURCE := $(B)/isa-l_crypto-master
ISA_L_CRYPTO_LIB := n
IPSEC_MB_VER ?= 0.46
ISA_L_CRYPTO_VER := 2.18.0
ifeq ($(MACHINE),$(filter $(MACHINE),x86_64))
AESNI ?= y
# DPDK pre 17.08 depends on ISA-L Crypto library for GCM PMD
ifneq ($(firstword $(sort $(DPDK_VERSION), 17.08)), 17.08)
ISA_L_CRYPTO_LIB = y
IPSEC_MB_VER = 0.45
$(info Building ISA-L Crypto $(ISA_L_CRYPTO_VER) library)
endif
$(info Building IPSec-MB $(IPSEC_MB_VER) library)
else
AESNI ?= N
endif
AESNIMB_LIB_TARBALL := v$(IPSEC_MB_VER).tar.gz
AESNIMB_LIB_TARBALL_URL := http://github.com/01org/intel-ipsec-mb/archive/$(AESNIMB_LIB_TARBALL)
AESNIMB_LIB_SOURCE := $(B)/intel-ipsec-mb-$(IPSEC_MB_VER)
ISA_L_CRYPTO_LIB_TARBALL := v$(ISA_L_CRYPTO_VER).tar.gz
ISA_L_CRYPTO_LIB_TARBALL_URL := http://github.com/01org/isa-l_crypto/archive/$(ISA_L_CRYPTO_LIB_TARBALL)
ISA_L_CRYPTO_LIB_SOURCE := $(B)/isa-l_crypto-$(ISA_L_CRYPTO_VER)
ISA_L_CRYPTO_INSTALL_DIR := $(ISA_L_CRYPTO_LIB_SOURCE)/install
ifneq (,$(findstring clang,$(CC)))
DPDK_CC=clang
else ifneq (,$(findstring icc,$(CC)))
@@ -51,8 +69,6 @@ else
DPDK_CC=gcc
endif
MACHINE=$(shell uname -m)
##############################################################################
# Intel x86
##############################################################################
@@ -62,22 +78,71 @@ DPDK_MACHINE ?= nhm
DPDK_TUNE ?= core-avx2
##############################################################################
# Cavium ThunderX
# ARM64
##############################################################################
else ifneq (,$(findstring thunder,$(shell cat /sys/bus/pci/devices/0000:00:01.0/uevent | grep cavium)))
else ifeq ($(MACHINE),aarch64)
export CROSS=""
DPDK_TARGET ?= arm64-thunderx-linuxapp-$(DPDK_CC)
DPDK_MACHINE ?= thunderx
DPDK_TARGET ?= arm64-armv8a-linuxapp-$(DPDK_CC)
DPDK_MACHINE ?= armv8a
DPDK_TUNE ?= generic
CPU_IMP_ARM = 0x41
CPU_IMP_CAVIUM = 0x43
CPU_PART_ARM_CORTEX_A53 = 0xd03
CPU_PART_ARM_CORTEX_A57 = 0xd07
CPU_PART_ARM_CORTEX_A72 = 0xd08
CPU_PART_ARM_CORTEX_A73 = 0xd09
CPU_PART_CAVIUM_THUNDERX = 0x0a1
CPU_PART_CAVIUM_THUNDERX_81XX = 0x0a2
CPU_PART_CAVIUM_THUNDERX_83XX = 0x0a3
MIDR_IMPLEMENTER=$(shell awk '/implementer/ {print $$4;exit}' /proc/cpuinfo)
MIDR_PARTNUM=$(shell awk '/part/ {print $$4;exit}' /proc/cpuinfo)
ifeq ($(MIDR_IMPLEMENTER),$(CPU_IMP_ARM))
##############################################################################
# Unknown platofrm
# Arm Cortex
##############################################################################
CPU_PART_ARM_TUNE := $(CPU_PART_ARM_CORTEX_A53)/cortex-a53 \
$(CPU_PART_ARM_CORTEX_A57)/cortex-a57 \
$(CPU_PART_ARM_CORTEX_A72)/cortex-a72 \
$(CPU_PART_ARM_CORTEX_A73)/cortex-a73
CPU_TUNE = $(notdir $(filter $(MIDR_PARTNUM)/%,$(CPU_PART_ARM_TUNE)))
ifneq ($(CPU_TUNE),)
DPDK_TUNE = $(CPU_TUNE)
else
$(error unknown platform)
$(warning Unknown Arm CPU)
endif
JOBS := $(shell grep processor /proc/cpuinfo | wc -l)
else ifeq ($(MIDR_IMPLEMENTER),$(CPU_IMP_CAVIUM))
##############################################################################
# Cavium ThunderX
##############################################################################
ifneq (,$(findstring $(MIDR_PARTNUM),$(CPU_PART_CAVIUM_THUNDERX) \
$(CPU_PART_CAVIUM_THUNDERX_81XX) $(CPU_PART_CAVIUM_THUNDERX_83XX)))
DPDK_TARGET = arm64-thunderx-linuxapp-$(DPDK_CC)
DPDK_MACHINE = thunderx
else
$(warning Unknown Cavium CPU)
endif
endif
##############################################################################
# Unknown platform
##############################################################################
else
$(error Unknown platform)
endif
# /proc/cpuinfo does not exist on platforms without a /proc and on some
# platforms, notably inside containers, it has no content. In those cases
# we assume there's 1 processor; we use 2*ncpu for the -j option.
# NB: GNU Make 4.2 will let us use '$(file </proc/cpuinfo)' to both test
# for file presence and content; for now this will have to do.
JOBS := $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo),\
$(shell expr 2 '*' $$(grep -c ^processor /proc/cpuinfo)), 2)
# compiler/linker custom arguments
DPDK_CPU_CFLAGS := -pie -fPIC
@@ -89,11 +154,11 @@ else
DPDK_EXTRA_CFLAGS := -g -O0
endif
ifeq ($(DPDK_CRYPTO_SW_PMD),y)
DPDK_EXTRA_CFLAGS += -I$(I)/include
ifeq ($(ISA_L_CRYPTO_LIB),y)
DPDK_EXTRA_CFLAGS += -I$(ISA_L_CRYPTO_INSTALL_DIR)/include -Wl,-z,muldefs
DPDK_EXTRA_LDFLAGS += -L$(I)/lib
DPDK_MAKE_EXTRA_ARGS += AESNI_MULTI_BUFFER_LIB_PATH=$(AESNIMB_LIB_SOURCE)
endif
DPDK_MAKE_EXTRA_ARGS += AESNI_MULTI_BUFFER_LIB_PATH=$(AESNIMB_LIB_SOURCE)
# assemble DPDK make arguments
DPDK_MAKE_ARGS := -C $(DPDK_SOURCE) -j $(JOBS) \
@@ -105,8 +170,6 @@ DPDK_MAKE_ARGS := -C $(DPDK_SOURCE) -j $(JOBS) \
DESTDIR=$(I) \
$(DPDK_MAKE_EXTRA_ARGS)
DPDK_SOURCE_FILES := $(shell [ -e $(DPDK_SOURCE) ] && find $(DPDK_SOURCE) -name "*.[chS]")
define set
@if grep -q CONFIG_$1 $@ ; \
then sed -i -e 's/.*\(CONFIG_$1=\).*/\1$2/' $@ ; \
@@ -137,11 +200,12 @@ $(B)/custom-config: $(B)/.patch.ok Makefile
$(call set,RTE_LIBRTE_PMD_BOND,y)
$(call set,RTE_LIBRTE_IP_FRAG,y)
$(call set,RTE_LIBRTE_PMD_QAT,y)
$(call set,RTE_LIBRTE_PMD_AESNI_MB,$(DPDK_CRYPTO_SW_PMD))
$(call set,RTE_LIBRTE_PMD_AESNI_GCM,$(DPDK_CRYPTO_SW_PMD))
$(call set,RTE_LIBRTE_PMD_AESNI_MB,$(AESNI))
$(call set,RTE_LIBRTE_PMD_AESNI_GCM,$(AESNI))
$(call set,RTE_LIBRTE_MLX4_PMD,$(DPDK_MLX4_PMD))
$(call set,RTE_LIBRTE_MLX5_PMD,$(DPDK_MLX5_PMD))
@# not needed
$(call set,RTE_LIBRTE_PMD_TAP,n)
$(call set,RTE_LIBRTE_TIMER,n)
$(call set,RTE_LIBRTE_CFGFILE,n)
$(call set,RTE_LIBRTE_LPM,n)
@@ -175,8 +239,10 @@ $(CURDIR)/$(ISA_L_CRYPTO_LIB_TARBALL):
fi
DPDK_DOWNLOADS = $(CURDIR)/$(DPDK_TARBALL)
ifeq ($(DPDK_CRYPTO_SW_PMD),y)
ifeq ($(AESNI),y)
DPDK_DOWNLOADS += $(CURDIR)/$(AESNIMB_LIB_TARBALL)
endif
ifeq ($(ISA_L_CRYPTO_LIB),y)
DPDK_DOWNLOADS += $(CURDIR)/$(ISA_L_CRYPTO_LIB_TARBALL)
endif
@@ -194,9 +260,11 @@ download: $(B)/.download.ok
$(B)/.extract.ok: $(B)/.download.ok
@echo --- extracting $(DPDK_TARBALL) ---
@tar --directory $(B) --extract --file $(CURDIR)/$(DPDK_TARBALL)
ifeq ($(DPDK_CRYPTO_SW_PMD),y)
ifeq ($(AESNI),y)
@echo --- extracting $(AESNIMB_LIB_TARBALL) ---
@tar --directory $(B) --extract --file $(CURDIR)/$(AESNIMB_LIB_TARBALL)
endif
ifeq ($(ISA_L_CRYPTO_LIB),y)
@echo --- extracting $(ISA_L_CRYPTO_LIB_TARBALL) ---
@tar --directory $(B) --extract --file $(CURDIR)/$(ISA_L_CRYPTO_LIB_TARBALL)
endif
@@ -225,18 +293,37 @@ $(B)/.config.ok: $(B)/.patch.ok $(B)/custom-config
.PHONY: config
config: $(B)/.config.ok
$(B)/.build.ok: $(DPDK_SOURCE_FILES)
@if [ ! -e $(B)/.config.ok ] ; then echo 'Please run "make config" first' && false ; fi
ifeq ($(DPDK_CRYPTO_SW_PMD),y)
# Build IPsec_MB library
.PHONY: build-ipsec-mb
build-ipsec-mb:
mkdir -p $(I)/lib/
make -C $(AESNIMB_LIB_SOURCE) -j NO_GCM=y
# Do not build GCM stuff if we are building ISA_L
make -C $(AESNIMB_LIB_SOURCE) -j NO_GCM=$(ISA_L_CRYPTO_LIB)
cp $(AESNIMB_LIB_SOURCE)/libIPSec_MB.a $(I)/lib/
# Build ISA-L Crypto library
cd $(ISA_L_CRYPTO_LIB_SOURCE) && ./autogen.sh && ./configure --prefix=$(I)
.PHONY: build-isal-crypto
build-isal-crypto:
mkdir -p $(I)/lib/
cd $(ISA_L_CRYPTO_LIB_SOURCE) && ./autogen.sh && \
./configure --prefix=$(ISA_L_CRYPTO_INSTALL_DIR) \
--libdir=$(ISA_L_CRYPTO_INSTALL_DIR)/lib CFLAGS='-fPIC -DPIC -O2'
make -C $(ISA_L_CRYPTO_LIB_SOURCE) -j install
endif
cp $(ISA_L_CRYPTO_INSTALL_DIR)/lib/libisal_crypto.a $(I)/lib/
.PHONY: build-dpdk
build-dpdk:
@if [ ! -e $(B)/.config.ok ] ; then echo 'Please run "make config" first' && false ; fi
@make $(DPDK_MAKE_ARGS) install
# Order matters
ifeq ($(AESNI),y)
BUILD_TARGETS += build-ipsec-mb
endif
ifeq ($(ISA_L_CRYPTO_LIB),y)
BUILD_TARGETS += build-isal-crypto
endif
BUILD_TARGETS += build-dpdk
$(B)/.build.ok: $(BUILD_TARGETS)
@touch $@
.PHONY: build
@@ -317,7 +404,7 @@ build-rpm: $(DEV_RPM)
install-rpm:
ifneq ($(INSTALLED_RPM_VER),$(DPDK_VERSION)-$(PKG_SUFFIX))
@make $(DEV_RPM)
@$(MAKE) $(DEV_RPM)
sudo rpm -Uih $(DEV_RPM)
else
@echo "=========================================================="
+10
View File
@@ -0,0 +1,10 @@
echo \n\n====== gdb_cmdfile.vcl_client ======\n
# Here are some interesting VCL breakpoints...
# Uncomment them out to set during gdb init.
#
#b vppcom_session_connect
#b vppcom_session_write
#b vppcom_session_read
#b vl_api_connect_sock_t_handler
#b vl_api_connect_session_reply_t_handler
+10
View File
@@ -0,0 +1,10 @@
echo \n\n====== gdb_cmdfile.vcl_server ======\n
# Here are some interesting VCL breakpoints...
# Uncomment them out to set during gdb init.
#
#b vppcom_session_accept
#b vppcom_session_write
#b vppcom_session_read
#b vl_api_connect_sock_t_handler
#b vl_api_connect_session_reply_t_handler
+7
View File
@@ -0,0 +1,7 @@
echo \n\n====== gdb_cmdfile.vpp ======\n
# Here are some interesting vpp-api breakpoints...
# Uncomment them out to set during gdb init.
#
#b vl_api_connect_sock_t_handler
#b vl_api_connect_sock_reply_t_handler
+89
View File
@@ -0,0 +1,89 @@
# Copyright (c) 2017 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
AUTOMAKE_OPTIONS = foreign subdir-objects
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -g -DMEMIF_DBG -DICMP_DBG
SRCS_C := $(shell find . -name "*.c" )
SRCS_H := $(shell find . -name "*.h" )
.PHONY: release
release:
$(MAKE) AM_CPPFLAGS="-O3"
.PHONY: doc
doc:
@echo Building doxygen documentation...
doxygen doxygen.conf
@echo Doxygen documentation built in docs directory.
.PHONY: fixstyle
fixstyle:
@echo Fixing code style...
indent $(SRCS_C) $(SRCS_H)
@echo Code style fixed!
#
# unit_test
#
unit_test_SOURCES = test/unit_test.c \
test/main_test.c \
test/socket_test.c \
src/main.c \
src/socket.c
# macro MEMIF_UNIT_TEST -> compile functions without static keyword
# and declare them in header files, so they can be called from unit tests
unit_test_CPPFLAGS = $(AM_CPPFLAGS) -Itest -Isrc -DMEMIF_UNIT_TEST -g $(CHECK_CFLAGS)
unit_test_LDADD = $(CHECK_LIBS)
#
# main lib
#
libmemif_la_SOURCES = src/main.c src/socket.c
libmemif_la_CPPFLAGS = $(AM_CPPFLAGS) -Isrc
#
# ICMP responder example
#
icmpr_SOURCES = examples/icmp_responder/main.c examples/icmp_responder/icmp_proto.c
icmpr_LDADD = libmemif.la
icmpr_CPPFLAGS = $(AM_CPPFLAGS) -Isrc -Iexamples/icmp_responder
#
# ICMP responder libmemif event polling example
#
icmpr_epoll_SOURCES = examples/icmp_responder-epoll/main.c \
examples/icmp_responder/icmp_proto.c
icmpr_epoll_LDADD = libmemif.la
icmpr_epoll_CPPFLAGS = $(AM_CPPFLAGS) -Isrc -Iexamples/icmp_responder
#
# ICMP responder multi-thread example
#
icmpr_mt_SOURCES = examples/icmp_responder-mt/main.c \
examples/icmp_responder/icmp_proto.c
icmpr_mt_LDADD = libmemif.la -lpthread
icmpr_mt_CPPFLAGS = $(AM_CPPFLAGS) -Isrc -Iexamples/icmp_responder
noinst_PROGRAMS = icmpr icmpr-epoll icmpr-mt
check_PROGRAMS = unit_test
include_HEADERS = src/libmemif.h
lib_LTLIBRARIES = libmemif.la
TESTS = $(check_PROGRAMS)
+72
View File
@@ -0,0 +1,72 @@
Shared Memory Packet Interface (memif) Library
==============================================
## Introduction
Shared memory packet interface (memif) provides high performance packet transmit and receive between user application and Vector Packet Processing (VPP) or multiple user applications. Using libmemif, user application can create shared memory interface in master or slave mode and connect to VPP or another application using libmemif. Once the connection is established, user application can receive or transmit packets using libmemif API.
![Architecture](docs/architecture.png)
## Features
- [x] Slave mode
- [x] Connect to VPP over memif
- [x] ICMP responder example app
- [x] Transmit/receive packets
- [x] Interrupt mode support
- [x] File descriptor event polling in libmemif (optional)
- [x] Simplify file descriptor event polling (one handler for control and interrupt channel)
- [x] Multiple connections
- [x] Multiple queues
- [x] Multi-thread support
- [x] Master mode
- [ ] Multiple regions (TODO)
- [ ] Performance testing (TODO)
## Quickstart
This setup will run libmemif ICMP responder example app in container. Install [docker](https://docs.docker.com/engine/installation) engine.
Useful link: [Docker documentation](https://docs.docker.com/get-started).
Pull image:
```
# docker pull ligato/libmemif-sample-service
```
Now you should be able to see ligato/libmemif-sample-service image on your local machine (IMAGE ID in this README may be outdated):
```
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ligato/libmemif-sample-service latest 32ecc2f9d013 About a minute ago 468MB
...
```
Run container:
```
# docker run -it --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" ligato/libmemif-sample-service
```
Example application will start in debug mode. Output should look like this:
```
ICMP_Responder:add_epoll_fd:204: fd 0 added to epoll
MEMIF_DEBUG:src/main.c:memif_init:383: app name: ICMP_Responder
ICMP_Responder:add_epoll_fd:204: fd 4 added to epoll
LIBMEMIF EXAMPLE APP: ICMP_Responder (debug)
==============================
libmemif version: 1.0 (debug)
memif version: 256
commands:
help - prints this help
exit - exit app
conn <index> - create memif (slave-mode)
del <index> - delete memif
show - show connection details
ip-set <index> <ip-addr> - set interface ip address
rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
```
Continue with [Example setup](examples/ExampleSetup.md) which contains instructions on how to set up conenction between icmpr-epoll example app and VPP-memif.
#### Next steps
- [Build instructions](docs/BuildInstructions.md) Instructions on how to build/install libmemif.
- [Examples](examples/README.md) More example apps presenting different features.
- [Getting started](docs/GettingStarted.md) Introduction to libmemif API. Explaining library usage in custom app.
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
autoreconf -fis
+13
View File
@@ -0,0 +1,13 @@
AC_INIT(libmemif, 1.0)
LT_INIT
AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])
AC_PREFIX_DEFAULT([/usr])
PKG_CHECK_MODULES([CHECK], [check])
AC_PROG_CC
AC_OUTPUT([Makefile])
AC_CONFIG_MACRO_DIR([m4])
+19
View File
@@ -0,0 +1,19 @@
FROM ubuntu:xenial
RUN apt-get update && \
apt-get install -y git build-essential autoconf pkg-config libtool sudo check
RUN rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/JakubGrajciar/libmemif.git /libmemif
WORKDIR /libmemif
RUN git checkout master
RUN ./bootstrap
RUN ./configure
RUN make
RUN make install
RUN mkdir /var/vpp
RUN ulimit -c unlimited
CMD ./.libs/icmpr-epoll
+54
View File
@@ -0,0 +1,54 @@
## Build Instructions
Install dependencies
```
# sudo apt-get install -y git autoconf pkg_config libtool check
```
Clone repository to your local machine.
```
# git clone https://github.com/JakubGrajciar/libmemif.git
```
From root directory execute:
For debug build:
```
# ./bootstrap
# ./configure
# make
# make install
```
For release build:
```
# ./bootstrap
# ./configure
# make release
# make install
```
Verify installation:
```
# ./.libs/icmpr-epoll
```
> Make sure to run the binary file from ./.libs. File ./icmp\_responder in libmemif root directory is script that links the library, so it only verifies successful build. Default install path is /usr/lib.
Use _help_ command to display build information and commands:
```
ICMP_Responder:add_epoll_fd:204: fd 0 added to epoll
MEMIF_DEBUG:src/main.c:memif_init:383: app name: ICMP_Responder
ICMP_Responder:add_epoll_fd:204: fd 4 added to epoll
LIBMEMIF EXAMPLE APP: ICMP_Responder (debug)
==============================
libmemif version: 1.0 (debug)
memif version: 256
commands:
help - prints this help
exit - exit app
conn <index> - create memif (slave-mode)
del <index> - delete memif
show - show connection details
ip-set <index> <ip-addr> - set interface ip address
rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
```
#### Examples
Once the library is build/installed, refer to [Examples](../examples/README.md) and [Getting started](GettingStarted.md) for additional information on basic use cases and API usage.
+215
View File
@@ -0,0 +1,215 @@
## Getting started
#### Concept (Connecting to VPP)
For detailed information on api calls and structures please refer to [libmemif.h](../src/libmemif.h)
1. Initialize memif
- Declare callback function handling file descriptor event polling.
```C
int
control_fd_update (int fd, uint8_t events)
{
...
}
```
- Call memif initialization function. memif\_init
```C
err = memif_init (control_fd_update, APP_NAME);
```
> If event occurres on any file descriptor returned by this callback, call memif\_control\_fd\_handler function.
```C
memif_err = memif_control_fd_handler (evt.data.fd, events);
```
> If callback function parameter for memif\_init function is set to NULL, libmemif will handle file descriptor event polling.
Api call memif\_poll\_event will call epoll\_pwait with user defined timeout to poll event on file descriptors opened by libmemif.
```C
/* main loop */
while (1)
{
if (memif_poll_event (-1) < 0)
{
DBG ("poll_event error!");
}
}
```
> Memif initialization function will initialize internal structures and create timer file descriptor, which will be used for sending periodic connection requests. Timer is disarmed if no memif interface is created.
2. Creating interface
- Declare memif connction handle.
```C
memif_conn_handle_t c;
```
> example app uses struct that contains connection handle, rx/tx buffers and other connection specific information.
- Specify connection arguments.
```C
memif_conn_args_t args;
memset (&args, 0, sizeof (args));
args.is_master = is_master;
args.log2_ring_size = 10;
args.buffer_size = 2048;
args.num_s2m_rings = 2;
args.num_m2s_rings = 2;
strncpy ((char *) args.interface_name, IF_NAME, strlen (IF_NAME));
strncpy ((char *) args.instance_name, APP_NAME, strlen (APP_NAME));
args.mode = 0;
args.interface_id = 0;
```
- Declare callback functions called on connected/disconnected/interrupted status changed.
```C
int
on_connect (memif_conn_handle_t conn, void *private_ctx)
{
...
}
int
on_disconnect (memif_conn_handle_t conn, void *private_ctx)
{
INFO ("memif connected!");
return 0;
}
```
- Call memif interface create function. memif\_create
```C
err = memif_create (&c->conn,
&args, on_connect, on_disconnect, on_interrupt, &ctx[index]);
```
> If connection is in slave mode, arms timer file descriptor.
> If on interrupt callback is set to NULL, user will not be notified about interrupt. Use memif\_get\_queue\_efd call to get interrupt file descriptor for specific queue.
```C
int fd = -1;
err = memif_get_queue_efd (c->conn, data->qid, &fd);
```
3. Connection establishment
- User application will poll events on all file descriptors returned in memif\_control\_fd\_update\_t callback.
- On event call memif\_control\_fd\_handler.
- Everything else regarding connection establishment will be done internally.
- Once connection has been established, a callback will inform the user about connection status change.
4. Interrupt packet receive
- If event is polled on interrupt file descriptor, libmemif will call memif\_interrupt\_t callback specified for every connection instance.
```C
int
on_interrupt (memif_conn_handle_t conn, void *private_ctx, uint16_t qid)
{
...
}
```
6. Memif buffers
- Packet data are stored in memif\_buffer\_t. Pointer _data_ points to shared memory buffer, and unsigned integer *data\_len* contains packet data length.
```C
typedef struct
{
uint16_t desc_index;
uint32_t buffer_len;
uint32_t data_len;
void *data;
} memif_buffer_t;
```
5. Packet receive
- Api call memif\_rx\_burst will set all required fields in memif buffers provided by user application.
```C
err = memif_rx_burst (c->conn, qid, c->rx_bufs, MAX_MEMIF_BUFS, &rx);
```
- User application can then process packets.
- Api call memif\_buffer\_free will make supplied memif buffers ready for next receive and mark shared memory buffers as free.
```C
err = memif_buffer_free (c->conn, qid, c->rx_bufs, rx, &fb);
```
6. Packet transmit
- Api call memif\_buffer\_alloc will set all required fields in memif buffers provided by user application.
```C
err = memif_buffer_alloc (c->conn, qid, c->tx_bufs, n, &r);
```
- User application can populate shared memory buffers with packets.
- Api call memif\_tx\_burst will inform peer interface (master memif on VPP) that there are packets ready to receive and mark memif buffers as free.
```C
err = memif_tx_burst (c->conn, qid, c->tx_bufs, c->tx_buf_num, &r);
```
7. Helper functions
- Memif details
- Api call memif\_get\_details will return details about connection.
```C
err = memif_get_details (c->conn, &md, buf, buflen);
```
- Memif error messages
- Every api call returns error code (integer value) mapped to error string.
- Call memif\_strerror will return error message assigned to specific error code.
```C
if (err != MEMIF_ERR_SUCCESS)
INFO ("memif_get_details: %s", memif_strerror (err));
```
- Not all syscall errors are translated to memif error codes. If error code 1 (MEMIF\_ERR\_SYSCALL) is returned then libmemif needs to be compiled with -DMEMIF_DBG flag to print error message. Use _make -B_ to rebuild libmemif in debug mode.
#### Example app (libmemif fd event polling):
- [ICMP Responder](../examples/icmp_responder/main.c)
> Optional argument: transmit queue id.
```
icmpr 1
```
> Set transmit queue id to 1. Default is 0.
> Application will create memif interface in slave mode and try to connect to VPP. Exit using Ctrl+C. Application will handle SIGINT signal, free allocated memory and exit with EXIT_SUCCESS.
#### Example app:
- [ICMP Responder custom fd event polling](../examples/icmp_responder-epoll/main.c)
#### Example app (multi-thread queue polling)
- [ICMP Responder multi-thread](../examples/icmp_responder-mt/main.c)
> Simple example of libmemif multi-thread usage. Connection establishment is handled by main thread. There are two rx queues in this example. One in polling mode and second in interrupt mode.
VPP config:
```
# create memif id 0 master
# set int state memif0 up
# set int ip address memif0 192.168.1.1/24
# ping 192.168.1.2
```
For multiple rings (queues) support run VPP with worker threads:
example startup.conf:
```
unix {
interactive
nodaemon
full-coredump
}
cpu {
workers 2
}
```
VPP config:
```
# create memif id 0 master
# set int state memif0 up
# set int ip address memif0 192.168.1.1/24
# ping 192.168.1.2
```
> Master mode queue number is limited by worker threads. Slave mode interface needs to specify number of queues.
```
# create memif id 0 slave rx-queues 2 tx-queues 2
```
> Example applications use VPP default socket file for memif: /run/vpp/memif.sock
> For master mode, socket directory must exist prior to memif\_create call.
#### Unit tests
Unit tests use [Check](https://libcheck.github.io/check/index.html) framework. This framework must be installed in order to build *unit\_test* binary.
Ubuntu/Debian:
```
sudo apt-get install check
```
[More platforms](https://libcheck.github.io/check/web/install.html)
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because it is too large Load Diff
+206
View File
@@ -0,0 +1,206 @@
## Example setup
#### VPP-memif master icmp_responder slave
> Libmemif example app(s) use memif default socket file: /run/vpp/memif.sock.
Run VPP and icmpr-epoll example (default example when running in container).
> Other examples work similar to icmpr-epoll. Brief explanation can be found in [Examples readme](README.md) file.
VPP-side config:
```
DBGvpp# create memif id 0 master
DBGvpp# set int state memif0/0 up
DBGvpp# set int ip address memif0/0 192.168.1.1/24
```
icmpr-epoll:
```
conn 0 0
```
Memif in slave mode will try to connect every 2 seconds. If connection establishment is successfull, a message will show.
```
INFO: memif connected!
```
> Error messages like "unmatched interface id" are printed only in debug mode.
Check connected status.
Use show command in icmpr-epoll:
```
show
MEMIF DETAILS
==============================
interface index: 0
interface ip: 192.168.1.2
interface name: memif_connection
app name: ICMP_Responder
remote interface name: memif0/0
remote app name: VPP 17.10-rc0~132-g62f9cdd
id: 0
secret:
role: slave
mode: ethernet
socket filename: /run/vpp/memif.sock
rx queues:
queue id: 0
ring size: 1024
buffer size: 2048
tx queues:
queue id: 0
ring size: 1024
buffer size: 2048
link: up
interface index: 1
no connection
```
Use sh memif command in VPP:
```
DBGvpp# sh memif
interface memif0/0
remote-name "ICMP_Responder"
remote-interface "memif_connection"
id 0 mode ethernet file /run/vpp/memif.sock
flags admin-up connected
listener-fd 12 conn-fd 13
num-s2m-rings 1 num-m2s-rings 1 buffer-size 0
master-to-slave ring 0:
region 0 offset 32896 ring-size 1024 int-fd 16
head 0 tail 0 flags 0x0000 interrupts 0
master-to-slave ring 0:
region 0 offset 0 ring-size 1024 int-fd 15
head 0 tail 0 flags 0x0001 interrupts 0
```
Send ping from VPP to icmpr-epoll:
```
DBGvpp# ping 192.168.1.2
64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=.1888 ms
64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=.1985 ms
64 bytes from 192.168.1.2: icmp_seq=4 ttl=64 time=.1813 ms
64 bytes from 192.168.1.2: icmp_seq=5 ttl=64 time=.1929 ms
Statistics: 5 sent, 4 received, 20% packet loss
```
#### multiple queues VPP-memif slave icmp_responder master
Run icmpr-epoll as in previous example setup.
Run VPP with startup conf, enabling 2 worker threads.
Example startup.conf:
```
unix {
interactive
nodaemon
full-coredump
}
cpu {
workers 2
}
```
VPP-side config:
```
DBGvpp# create memif id 0 slave rx-queues 2 tx-queues 2
DBGvpp# set int state memif0/0 up
DBGvpp# set int ip address memif0/0 192.168.1.1/24
```
icmpr-epoll:
```
conn 0 1
```
When connection is established a message will print:
```
INFO: memif connected!
```
> Error messages like "unmatched interface id" are printed only in debug mode.
Check connected status.
Use show command in icmpr-epoll:
```
show
MEMIF DETAILS
==============================
interface index: 0
interface ip: 192.168.1.2
interface name: memif_connection
app name: ICMP_Responder
remote interface name: memif0/0
remote app name: VPP 17.10-rc0~132-g62f9cdd
id: 0
secret:
role: master
mode: ethernet
socket filename: /run/vpp/memif.sock
rx queues:
queue id: 0
ring size: 1024
buffer size: 2048
queue id: 1
ring size: 1024
buffer size: 2048
tx queues:
queue id: 0
ring size: 1024
buffer size: 2048
queue id: 1
ring size: 1024
buffer size: 2048
link: up
interface index: 1
no connection
```
Use sh memif command in VPP:
```
DBGvpp# sh memif
interface memif0/0
remote-name "ICMP_Responder"
remote-interface "memif_connection"
id 0 mode ethernet file /run/vpp/memif.sock
flags admin-up slave connected
listener-fd -1 conn-fd 12
num-s2m-rings 2 num-m2s-rings 2 buffer-size 2048
slave-to-master ring 0:
region 0 offset 0 ring-size 1024 int-fd 14
head 0 tail 0 flags 0x0000 interrupts 0
slave-to-master ring 1:
region 0 offset 32896 ring-size 1024 int-fd 15
head 0 tail 0 flags 0x0000 interrupts 0
slave-to-master ring 0:
region 0 offset 65792 ring-size 1024 int-fd 16
head 0 tail 0 flags 0x0001 interrupts 0
slave-to-master ring 1:
region 0 offset 98688 ring-size 1024 int-fd 17
head 0 tail 0 flags 0x0001 interrupts 0
```
Send ping from VPP to icmpr-epoll:
```
DBGvpp# ping 192.168.1.2
64 bytes from 192.168.1.2: icmp_seq=2 ttl=64 time=.1439 ms
64 bytes from 192.168.1.2: icmp_seq=3 ttl=64 time=.2184 ms
64 bytes from 192.168.1.2: icmp_seq=4 ttl=64 time=.1458 ms
64 bytes from 192.168.1.2: icmp_seq=5 ttl=64 time=.1687 ms
Statistics: 5 sent, 4 received, 20% packet loss
```
#### icmp_responder master icmp_responder slave
> Example apps can only repond to ping. This setup creates connection between two applications using libmemif. Traffic functionality is the same as when connection to VPP. App can receive ARP/ICMP request and transmit response, but can not send ARP/ICMP request.
Run two instances of icmpr-epoll example.
> If not running in container, make sure folder /run/vpp/ exists before creating memif master.
Instance 1 will be in master mode, instance 2 in slave mode.
instance 1:
```
conn 0 1
```
instance 2:
```
conn 0 0
```
In 2 seconds, both instances should print connected! message:
```
INFO: memif connected!
```
Check peer interface names using show command.
+16
View File
@@ -0,0 +1,16 @@
## Examples
After build, root folder will contain scripts linking binary examples with library (same name as example apps). These scripts can be executed to run example apps without installing the library. Example apps binaries can be found in _libs_ filder. To run binaries directly, make sure that libmemif library is installed.
#### Run in container
ligato/libmemif-sample-service image contains built and installed libmemf. To run different examples, override docker CMD to start container in bash:
```
# docker run -it --entrypoint=/bin/bash -i --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" ligato/libmemif-sample-service
```
Current WORKDIR is set to root repository directory. Example apps can be run from this directory (a script linking binary with library), or browse to ./.libs folder and execute binary directly.
Example app | Description
------------|------------
[icmpr](../examples/icmp_responder/main.c) | Simplest implementaion. Event polling is handled by libmemif. Single memif conenction in slave mode is created (id 0). Use Ctrl + C to exit app. Memif receive mode: interrupt.
[icmpr-epoll](../examples/icmp_responder-epoll/main.c) (run in container by default) | Supports multiple connections and master mode. User can create/delete connections, set ip addresses, print connection information. [Example setup](ExampleSetup.md) contains instructions on basic connection use cases setups. Memif receive mode: interrupt. App provides functionality to disable interrupts for specified queue/s for testing purposes. Polling mode is not implemented in this example.
[icmpr-mt](../examples/icmp_responder-mt/main.c) | Multi-thread example, very similar to icmpr-epoll. Packets are handled in threads assigned to specific queues. Slave mode only. Memif receive mode: polling (memif_rx_poll function), interrupt (memif_rx_interrupt function). Receive modes differ per queue.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More