2670 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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 fb088f0a201270e949469c915c529d75ad13353e)
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-09-07 11:33:06 +00:00
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
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
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
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
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
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
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
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
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
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
9a244bb5e4 Add pidfile cmdline option
Change-Id: Ibaa61b624eb6683b1be6901a7b29f5f73aad27b2
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2017-09-05 18:10:40 +02:00
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
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
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
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
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
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
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
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
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
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
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
1211beb572 Revert "add bc to dependency list"
Adding new dependency is not right solution to this problem.

This reverts commit e58c93b2764eb306d286531a2b920c6de080cb77.

Change-Id: I08f2af5cf9c26c4302b0dbaccebbb52f0614f80f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-31 12:05:33 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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