3409 Commits

Author SHA1 Message Date
Dave Wallace
6cd396cec3 docs: Clean up TOC
Change-Id: I5415c002a431d84372f56d4a77dc2aabd6ef55f7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 1eb970d16028e9a987c1dd2bfe217d1313262b81)
2018-01-24 01:23:34 +00:00
Vijayabhaskar Katamreddy
fb8e61cd93 Adding a format function for bihash init routine to format the key, value, when verbose option is used
Change-Id: Ib63ead4525332f897b8a1d8a4cf5a0eb1da1e7f3
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-01-24 00:36:05 +00:00
Dave Barach
3a905e69b8 Fix typo / coverity warning
Change-Id: I4a3a6803083f3d707351440486bba59d8194339f
Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-23 10:08:44 -05:00
Neale Ranns
54c6dc4500 For DHCP client configuration control the setting of the broadcast flag in the
DISCOVER message sent.

According to RFC2131:

   In the case of a client using DHCP for initial configuration (before
   the client's TCP/IP software has been completely configured), DHCP
   requires creative use of the client's TCP/IP software and liberal
   interpretation of RFC 1122.  The TCP/IP software SHOULD accept and
   forward to the IP layer any IP packets delivered to the client's
   hardware address before the IP address is configured; DHCP servers
   and BOOTP relay agents may not be able to deliver DHCP messages to
   clients that cannot accept hardware unicast datagrams before the
   TCP/IP software is configured.

   To work around some clients that cannot accept IP unicast datagrams
   before the TCP/IP software is configured as discussed in the previous
   paragraph, DHCP uses the 'flags' field [21].  The leftmost bit is
   defined as the BROADCAST (B) flag.  The semantics of this flag are
   discussed in section 4.1 of this document.  The remaining bits of the
   flags field are reserved for future use.  They MUST be set to zero by
   clients and ignored by servers and relay agents.  Figure 2 gives the
   format of the 'flags' field.

this changes means VPP conforms to the:
   "SHOULD accept and forward to the IP layer any IP packets delivered
    to the client's hardware address before the IP address is configured"
with the caveat that VPP allows DHCP packets destined to the stanard client
DHCP port to be delivered. With this enhancement the control-plane is now
able to choose the setting of the broadcast flag.

Change-Id: Ia4eb2c9bb1e30c29f9192facc645e9533641955a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-23 13:36:48 +00:00
Ole Troan
9d42087149 VPPAPIGEN: vppapigen replacement in Python PLY.
This is a version of the VPP API generator in Python PLY. It supports
the existing language, and has a plugin architecture for generators.
Currently C and JSON are supported.

Changes:
 - vl_api_version to option version = "major.minor.patch"
 - enum support
 - Added error checking and reporting
 - import support (removed the C pre-processor)
 - services (tying request/reply together)

Version:
 option version = "1.0.0";

Enum:
 enum colours {
   RED,
   BLUE = 50,
 };
 define foo {
  vl_api_colours_t colours;
 };

Services:
 service {
  rpc foo returns foo_reply;
  rpc foo_dump returns stream foo_details;
  rpc want_stats returns want_stats_reply
      events ip4_counters, ip6_counters;
 };

Future planned features:
 - unions
 - bool, text
 - array support (including length)
 - proto3 output plugin
 - Refactor C/C++ generator as a plugin
 - Refactor Java generator as a plugin

Change-Id: Ifa289966c790e1b1a8e2938a91e69331e3a58bdf
Signed-off-by: Ole Troan <ot@cisco.com>
2018-01-23 13:03:53 +00:00
Milan Lenco
2aa22909c7 NAT44: Fix interface feature removal.
Change-Id: Ie7cd809f30decc36cb8e1f4d8acc4b41f17cd390
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
2018-01-23 12:17:44 +00:00
Mohsin Kazmi
1019bafc14 vom: acl: Fix l3 acl handle populate
Change-Id: I5f105a1abb8a28645d6c961ad92f91c23787047f
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-01-22 22:16:33 +00:00
Mohsin Kazmi
a370679bd8 vom: ip_route: fix handle populate
Change-Id: I91892084133daadb74caa7aa13ee1071599ba892
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-01-22 22:16:23 +00:00
Mohsin Kazmi
18e955ea8a vom: Fix connection to VAPI and add disconnect function
Change-Id: I2dd5dbafe36e5ae536b3e600beb6920a71238b7a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-01-22 20:15:36 +00:00
Mohsin Kazmi
3fca567ff4 svm: queue sub: Add conditional timed wait
On reviece side svm queue only permits blocking and
non-blocking calls. This patch adds timed wait blocking
functionality which returns either on signal/event or
on given time out.

It also preserves the original behavior, so it will not
hurt client applications which are using svm queue.

Change-Id: Ic10632170330a80afb8bc781d4ccddfe4da2c69a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-01-22 18:17:23 +00:00
Matus Fabian
e82488f10f NAT44: asymmetrical static mapping rule (VPP-1135)
add option to NAT44 static mapping API/CLI to make rule asymmetrical (rule match only out2in direction)

Change-Id: If262a3ff375a24d3059f0de1f1ac387a4fe09475
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-01-22 09:44:45 +00:00
Haiyang Tan
352ecd95c9 vhost_user: 'nregions' saves the actual number of mapped guest physical address area
This patch fixed the VMA leak that if mapping one of guest physical address area get failed.

Change-Id: I07b0b9a932209561d6ff2b2dd08a111ea5db2209
Signed-off-by: Haiyang Tan <haiyang.tan.dev@gmail.com>
2018-01-21 10:30:56 +00:00
Dave Wallace
9b95425de6 VCL/LD_PRELOAD: Fix unfiltered debug output.
Change-Id: I625b219fe6ffd21f87a163244569a4075cd432a4
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-20 14:28:32 +00:00
Dave Barach
d47c509af1 Fix MP hazard in interrupt node scheduling
Change-Id: Iff14ed6ffd822eb2286aac6af467d9c8660e3d81
Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-19 22:15:52 +00:00
Francois Clad
ba7992aa62 SRv6 static proxy plugin
Change-Id: Ia0654461d9fa36503323a8375997719c873d23b9
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-01-19 20:34:48 +00:00
Dave Wallace
b4cd4ff74b LD_PRELOAD: Fix Coverity Warning CID 182227
Change-Id: I2698a59db29cbace49335e035478b5f456d0b06a
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-19 20:33:38 +00:00
Eyal Bari
3ce0b089a1 vxlan:restructure encap loop
unified some code from IPv4/6 pathes
replaced unrolled rewrite copy with simple assignment
refactored stats handling
was not tested for performance

Change-Id: I00aeb9dd5b72584e6606e1a076e5c8270389aaa4
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-01-19 19:54:09 +00:00
John Lo
5957a14329 Sub-Interface deletion not cleanup hash's properly (VPP-1136)
On deleting sub-interfaces, functions vnet_delete_sub_interface()
and vnet_delete_hw_interface() are not cleaning up sub-interface
related hash tables and memory properly.

Change-Id: I17c7c4b2078c062c77bfe48889beb677610035ca
Signed-off-by: John Lo <loj@cisco.com>
(cherry picked from commit 7f5bec647c9dc743c015d461d040e63a77fd0a08)
2018-01-19 16:46:03 +00:00
Keith Burns (alagalah)
2167355e16 Elog entries for VCL
Change-Id: Ica8470aaf581e69a74fe4f0fc0296ff3fb6f87d3
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-01-19 15:28:24 +00:00
Dave Wallace
8aaba56363 LD_PRELOAD: Fix coverity warnings
** CID 182185:  Memory - illegal accesses  (UNINIT)
** CID 182184:  Memory - illegal accesses  (UNINIT)
** CID 182183:    (UNINIT)
** CID 182182:  Memory - illegal accesses  (UNINIT)
** CID 182181:  Memory - illegal accesses  (UNINIT)
** CID 182180:  Uninitialized variables  (UNINIT)
** CID 182179:  Null pointer dereferences  (REVERSE_INULL)
** CID 182178:  Uninitialized variables  (UNINIT)
** CID 182177:  Uninitialized variables  (UNINIT)

Change-Id: I33e043572db493eef58d85c5096ceac5a7d41c7a
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-18 17:21:19 -05:00
Damjan Marion
c58408c0f2 vlib: add vlib_buffer_alloc_to_ring API
Change-Id: I4e2804754b443f5f41fb25eed8334908c4a70f84
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-18 17:03:22 +00:00
Damjan Marion
7866c4595b tapv2: add option to set host-side default gw
Change-Id: I76fd655ecd9445299b94b3b5af10e7b1588584e4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-18 15:59:06 +00:00
Hongjun Ni
929fb9d750 VPP-1119: PPPoE's destination MAC was overwritten
Change-Id: I6ae99c00e76058654f2c5e71377e9fd1bd13b47b
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
(cherry picked from commit c287cd550b91be7a93bae76d0086db87f575e3d3)
2018-01-18 15:07:59 +00:00
Keith Burns (alagalah)
504a71f2d7 Event log entries for VCL
Change-Id: I288ecd7f39422ed900a5c6fbaf9c939ab5c06880
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-01-18 15:04:43 +00:00
Neale Ranns
8954199200 FIB Inherited Srouce
forwarding provided by the source is pushed to all other entries
it covers in the sub-tree

Change-Id: I2a45222ef653358f55c2436de3e3c6353cfadba2
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-18 14:37:24 +00:00
Gabriel Ganne
bf246dff1b dpdk plugin depends on numactl-libs
dpdk_plugin.so depends on libnuma.so.1

Change-Id: Ia1fd3b5cec043b294cc14cd947908675b451deac
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2018-01-18 11:00:17 +01:00
Radu Nicolau
61fe15e370 VPP-1122 dpdk/ipsec: fix transport mode pkt len
Change-Id: I6eef2ca258ff5b4aa9b21b98543d814633e295af
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2018-01-18 00:45:42 +00:00
Dave Wallace
048b1d6ab7 LD_PRELOAD: stateless LDP
- Refactor LDP to be stateless.
- Use upper bit of fd to identify
  tag as VCL session.
- Clean up debug output.
- Add VCOM config env vars for
  app name and sid bit.
- Add VCL get/set attributes
- Add VCL poll implementation.

Change-Id: I4603ae88254c460a024fdb79fe91c6d1ef9bc7b9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-17 22:26:17 +00:00
Florin Coras
d3e83a9c82 ssvm: reuse clib mem infra for memfd segments
Change-Id: I67648dbed3c7ed291b3e1ce617d83a776d3623bb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-17 19:11:14 +00:00
Mohsin Kazmi
919f377efe stats: Fix per interface stats
Change-Id: I94618933719abb6ada1272bcf76f4f5304043873
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-01-17 16:33:21 +00:00
Florin Coras
34ae9b1a54 stn: add vat support
Change-Id: Ifba0a4a297b6c01d75b86bc211a32740af5e48ed
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-17 16:11:59 +00:00
Pierre Pfister
663ac58e18 Fix api test_client.c compilation
c42fc05bfbb26fd11fe92ac9d11587660a817ac1 removed
mr_create_table_if_needed parameter in FIB API calls.
This commit fixes the API test program, which was not compiling
anymore.

Change-Id: Id6899c860235363bef9ba35cd8f24033a55cd5e6
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2018-01-17 15:14:21 +00:00
Damjan Marion
faf9a5a01e Fix checksum offload sssue caused by overwriten lX_hdr_offset
This happens when 2 packets belonging to 2 different interfaces hit
dual loop in the ethernet-input. Packets go to slow path which doesn't
set l2 hdr offset correctly for l3 packets.

Change-Id: I61d87c079db0b2e21f8af6f6b600bff14030535d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-17 14:38:24 +00:00
Keith Burns (alagalah)
d3046598b0 ELOG additions for VCL
Change-Id: I61557f9ad9ca2a033ba01bd25a7a8cd4d5ce092e
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-01-17 02:28:37 +00:00
Andrew Yourtchenko
798502f3d0 acl-plugin: multicore: use pool_init_fixed for per-worker preallocated pools
One worker thread may be processing the packets
for session owned by another worker thread.
During session access the validity of the pool
index is checked - however, the free bitmap pointer
might change just at that moment, potentially resulting
in a crash.

Thus, use the pool_init_fixed() when initializing the per-worker pools,
so that the free bitmaps are as well staying in their place.

Change-Id: I5796e6b62fdc1efd4299124a388b84a7c0dc19cd
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-01-16 23:40:06 +00:00
Neale Ranns
0e7c5f55f4 Tolerate missing nodes during feature arc initialisation
Change-Id: Ib0d0b663bf71ce52ead2f81140c710f31f040f89
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-01-16 23:12:42 +00:00
Florin Coras
fb3bd5967d api: fix api_format.c soft link to vat
Commit 6c4dae27e75fc66 broke api_format.c soft link between vat at vpp
api. Probably a make fixstyle issue. Thanks to John Lo for catching
this.

Change-Id: I0567b49fb5c70314d7d6e72f8c9f0f1575948702
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-16 21:44:56 +00:00
Steven
a624dbe771 tapv2: deleting tap interface may leak buffers (VPP-1124)
Buffers may be allocated for indirect descriptors by tx thread and
they are freed when tx thread is invoked in the next invocation.
This is to allow the recipient (kernel) to have a chance to process
them. But if the tap interface is deleted, the tx thread may not yet
be called to clean up the indirect descriptors' buffers. In that case,
we need to remove them without waiting for the tx thread to be called.
Failure to do so may cause buffers leak when the tap interface is deleted.

For the RX ring, leakage also exists for vring->buffers when the interface
is removed.

Change-Id: I3df313a0e60334776b19daf51a9f5bf20dfdc489
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit d8a998e74b815dd3725dfcd80080e4e540940236)
2018-01-16 16:59:18 +00:00
Jan Gelety
887ffb65fd Update CSIT tests 171218 -> 180115
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I25a69cf3c9a93754e0cbfc0c1bc62f10883d3027
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-01-16 08:37:50 +01:00
Florin Coras
f0c8a8172e bfd: fix bfd_auth_keys_dump
Change-Id: I58598f18b9af70e580be4d28a0c40ec0ffcd5dca
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-15 20:02:46 +00:00
Florin Coras
4d9b9d8e74 svm: refactor memfd and remove ssvm_eth
Change-Id: Icde296e956eb89ea3a17d547f04a833916ec6440
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-15 16:39:12 +00:00
Gabriel Ganne
149a1433b0 fix udp_ping api naming error
Error messages:
ERROR:VAPI CPP GEN:Cannot find reply to message `udp_ping_add_del_req'
ERROR:VAPI CPP GEN:Cannot find reply to message `udp_ping_export_req'
ERROR:VAPI C GEN:Cannot find reply to message `udp_ping_add_del_req'
ERROR:VAPI C GEN:Cannot find reply to message `udp_ping_export_req'

Api was *_req/*_resp, but when explicitely declared, the reply should
then have been *_req_reply.
Both api response are empty, so I propose to remove them, and use
autoreply

API changes:
rename udp_ping_add_del_req -> udp_ping_add_del
rename udp_ping_export_req -> udp_ping_export
delete udp_ping_add_del_reply (empty response)
delete udp_ping_export_reply (empty response)
vl_api_version 1.0.0 ->2.0.0

Change-Id: Id3456c8101a7689fbc56dc2d9076625c2b3af0ad
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2018-01-15 16:37:38 +00:00
Damjan Marion
92cdd72058 Marvell device plugin
Depends in musdk 17.10 [1], tested on MACCHIATObin [2] board.
currently only coves PP2.

musdk must be compiled with:
./configure --enable-bpool-dma=64

[1] https://github.com/MarvellEmbeddedProcessors/musdk-marvell
[2] http://macchiatobin.net

Change-Id: I0247a6b860b0a067c54190eae0bd3fe08de234ad
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-01-15 16:36:09 +00:00
Gabriel Ganne
c5239ad597 vabits - subtract from the 'end' address instead of from 'bits'.
This is a fixup for the commits on
calc base address on AArch64 based on autodetected VA space size

As reported by: Brian Brooks <brian.brooks@arm.com>
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Change-Id: Id1bd7b7d7e5c188d8547c46134082bd4563b92db
2018-01-14 16:14:54 +00:00
John Lo
4478d8edc3 Improve "show xxx tunnel" and "show int addr" output
Improve "show xxx tunnel" output functions format_xxx_tunnel() for
GRE, VXLAN, VXLAN-GPE, GENEVE and GTPU tunnels to make their output
more consistent and provide better information.
Improved the output of "show int addr" to make its info more
consistent with tunnels and provide fib-index info.

Change-Id: Icd4b5b85a5bec417f8ee19afea336c770ad3b4c5
Signed-off-by: John Lo <loj@cisco.com>
2018-01-13 15:24:15 +00:00
Florin Coras
af0ff5af0c api: fix handlers that explicitly depend on svm queue
Fixes the remainig apis that explicitly check svm queue length.

Change-Id: I6055c7c50050affee3098e162e15fb12c205e5db
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-11 22:06:14 +00:00
Florin Coras
ee7e1f5072 tcp: make proxy server uri cli configurable
Change-Id: I94c7315558ccc9f3d4bcdefd09a696234bc56227
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-11 22:04:42 +00:00
Florin Coras
6c4dae27e7 api: remove transport specific code from handlers
This does not update api client code. In other words, if the client
assumes the transport is shmem based, this patch does not change that.
Furthermore, code that checks queue size, for tail dropping, is not
updated.

Done for the following apis:
Plugins
- acl
- gtpu
- memif
- nat
- pppoe
VNET
- bfd
- bier
- tapv2
- vhost user
- dhcp
- flow
- geneve
- ip
- punt
- ipsec/ipsec-gre
- l2
- l2tp
- lisp-cp/one-cp
- lisp-gpe
- map
- mpls
- policer
- session
- span
- udp
- tap
- vxlan/vxlan-gpe
- interface
VPP
- api/api.c
OAM
- oam_api.c
Stats
- stats.c

Change-Id: I0e33ecefb2bdab0295698c0add948068a5a83345
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-11 19:46:01 +00:00
Dave Barach
f72212e002 Remove vpp_api_test interface name filter catalog
If I remember correctly, I added the interface name filter catalog to
avoid cluttering up the vat interface table with [unused] packet
generator interfaces. Since we no longer create pg interfaces we're
not planning to use, the filter catalog does more harm than
good. Every new interface name prefix would have had to be added to
the list, and folks wouldn't likely know they should do that...

Change-Id: I4067f8ba70ad13c8dc5ebaf21a23759a2cf2675e
Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-11 17:42:36 +00:00
Dave Barach
c6372ebfc9 Handle a mix of CNAME, A/AAAA records
Poster-child: 8.8.8.8 resolving mag.ncep.noaa.gov

Change-Id: I600cd0274b9017e9c91817511d3d3366f0bd02b9
Signed-off-by: Dave Barach <dave@barachs.net>
2018-01-11 16:41:14 +00:00