2785 Commits

Author SHA1 Message Date
Steven
0ff5c563d5 cdp/lldp: punt for no buffer
When making a call to vlib_packet_template_get_packet(), it
is possible to get back a NULL if the system runs out of buffer.
This can happen when there is buffer leaks. But don't crash
just because we run out of buffers, just punt.

Change-Id: Ie90ea41f3dda6e583d48959cbd18ff124158d7f8
Signed-off-by: Steven <sluong@cisco.com>
2017-09-28 16:38:56 -07:00
Klement Sekera
905e250baf C++ API: remove deprecated throw lists
Change-Id: Ia58664438c9dc949884a794bd123555a13a02e6c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-28 15:53:30 +00:00
Klement Sekera
958b750cea drop python3 dependency
Change-Id: I99c2c1d0d5b96f33efdb58dd3a2897a752e65349
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-28 06:31:53 +02:00
Florin Coras
a3bae4edcd Update package version
Change-Id: Ic9bc303b65c95a0e06f90c75b067056b0b11e654
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-27 23:31:07 -07:00
Chris Luke
64ebb5ff13 General documentation updates
- We now have several developer-focused docs, so create an index page
  for them.
- Rework several docs to fit into the index structure.
- Experiment with code highlighting; tweak the CSS slightly to make
  it slightly nicer to look at.

Change-Id: I4185a18f84fa0764745ca7a3148276064a3155c6
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-09-28 01:04:56 +00:00
Steven
4ff586d1c6 tun/tap: Bad packets sent to kernel via tun/tap interface
It was observed that under heavy traffic, VPP accidentally sent traffic
with the wrong source and destination to the tun/tap interface. Traffic
appears to be sent to the wrong direction. This problem is only
seen when worker thread is configured.

When worker thread is used, TX and RX may reside in different
core. Yet both TX and RX threads are sharing the same global variable,
namely iovecs without any mutex or memory barrier protection.
This creates a race condition when heavy traffic is blasted to VPP,
like 1000 pps.

We could create a mutex or memory barrier to ensure atomic memory access.
But why bother? It is a lot cheaper to just decouple the iovecs such
that TX and RX have their own iovecs.

Change-Id: I86a5a19bd8de54d54f32e1f0845bae6a81bbf686
Signed-off-by: Steven <sluong@cisco.com>
2017-09-28 00:09:15 +00:00
Matej Perina
75a17ecddc VPP-990 remove registered handler if control ping fails
Change-Id: I5ca5763f0dc0a73cc6f014b855426b7ac180f356
Signed-off-by: Matej Perina <mperina@cisco.com>
v18.01-rc0
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