2892 Commits

Author SHA1 Message Date
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