2361 Commits

Author SHA1 Message Date
Neale Ranns
ca1936123c ARP: ignore non-connected routes and non-interface sources when determing if source is connected
Change-Id: I39fb0ec44cc322eaa12c0ff0700fc405d3982bfc
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-06-21 11:49:01 +00:00
Andrew Yourtchenko
996f790dfb acl-plugin: fix coverity error 171135
The code path which sets the sw_if_index aimed to restrict the output
did not set the flag to trigger that output.

Change-Id: I0a1a3977fdddbce9a276960df43fed745d099ca0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-21 10:08:33 +00:00
Andrew Yourtchenko
b736dc1876 acl-plugin: vat: acl_interface_list_dump confusing/incorrect output in case n_input == 0
The logic to print the line " output " is wrong for the case of n_input == 0,
and the applied ACLs are printed as if they were applied on input.
One may still figure out the truth by looking at the n_input value above,
but it is confusing.

Change-Id: I7b4a4d548e569994678dd1e139eb829456548b88
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-21 10:08:22 +00:00
Eyal Bari
284293a3ff L2-VTR: add vtr tests
re-enable l2 fib flush tests
reorder l2bd multi instance tests - move flags test as last
enabling of uu-flood will now flood when entry is stale

Change-Id: I052663ec3eb4acee5f296fb7525dd535924e0003
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-06-21 01:29:37 +00:00
Igor Mikhailov (imichail)
8249a588e9 vlib: make runtime_data handling thread-local
Change-Id: Ic2f2dc234199a5f882846880cbacff20fc8d477b
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2017-06-20 21:47:07 +00:00
Andrew Yourtchenko
f908a0350a Parenthesize the usage of the macro argument within vec_search() macro definition
Change-Id: I488d7c2b864c0e3661c8abf0363e4b97984d4974
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-20 12:58:29 +00:00
Matus Fabian
1e8db5fb6f SNAT: unknow protocol hairpinning fix
Change-Id: I15813167e7c8529f229143de4a8f64f0fb530951
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-20 12:00:19 +00:00
Ole Troan
026c036dd4 VPP-879 MAP: s/u32 is_add/u8 is_add in map.api
Change-Id: If35171005e409f77bed4cc16eccb66a85aae5dfb
Signed-off-by: Ole Troan <ot@cisco.com>
2017-06-20 09:13:23 +00:00
Eyal Bari
0f360dc3aa L2FWD:fix seq_num overwritten + validate l2fib entries when forwarding
l2_classify memeber table_index was overlaid over l2.l2fib_seq_num
which over written when table_index gets initialized in l2_input_classify

solved by overlaying both table_index and opaque_index as only one is used

seperated l2fib seq num from l2_input configs
for better handling of theoretical ABA issue where an entry for a deleted
interface is considered valid by the ager because a different interface with
same sw_if_index and seq_num was created before the ager got a chance to delete

Change-Id: I7b0eeded971627406f1c80834d7e02c0ebe62136
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-06-19 22:24:19 +00:00
Matus Fabian
08ce432ce9 NAT64: change not supported multi threading behaviour
Disable CLI/API commands instead of error message on startup.

Change-Id: I313ed6e2ea009f573afb5e08b0e85ed1f9091dc3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-19 19:21:15 +00:00
Damjan Marion
45ca2c7a9c memif: add ip mode
In IP mode memif interface is L3 point-to-point interfaces and
we don't pass l2 header. There is no l2 header rewrite operation and
received packets are sent straight to ip4-input / ip6-input nodes.

Change-Id: I4177f3fce3004da7ecf14d235006ae053fcf3f09
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-06-19 19:09:50 +00:00
Florin Coras
f03a59ab00 Overall tcp performance improvements (VPP-846)
- limit minimum rto per connection
- cleanup sack scoreboard
- switched svm fifo out-of-order data handling from absolute offsets to
  relative offsets.
- improve cwnd handling when using sacks
- add cc event debug stats
- improved uri tcp test client/server:  bugfixes and added half-duplex mode
- expanded builtin client/server
- updated uri socket client/server code to work in half-duplex
- ensure session node unsets fifo event for empty fifo
- fix session detach

Change-Id: Ia446972340e32a65e0694ee2844355167d0c170d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-06-19 14:06:34 +00:00
Matus Fabian
328dbc886d SNAT: NAT packet with unknown L4 protocol if match 1:1 NAT
Change-Id: Ic81c6098d615fdb6a874e532921efd833fed872c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-19 13:47:19 +00:00
Andrew Yourtchenko
7f4d577d6b acl-plugin: bihash-based ACL lookup
Add a bihash-based ACL lookup mechanism and make it a new default.
This changes the time required to lookup a 5-tuple match
from O(total_N_entries) to O(total_N_mask_types), where
"mask type" is an overall mask on the 5-tuple required
to represent an ACE.

For testing/comparison there is a temporary debug CLI
"set acl-plugin use-hash-acl-matching {0|1}", which,
when set to 0, makes the plugin use the "old" linear lookup,
and when set to 1, makes it use the hash-based lookup.

Based on the discussions on vpp-dev mailing list,
prevent assigning the ACL index to an interface,
when the ACL with that index is not defined,
also prevent deleting an ACL if that ACL is applied.

Also, for the easier debugging of the state, there are
new debug CLI commands to see the ACL plugin state at
several layers:

"show acl-plugin acl [index N]" - show a high-level
ACL representation, used for the linear lookup and
as a base for building the hashtable-based lookup.
Also shows if a given ACL is applied somewhere.

"show acl-plugin interface [sw_if_index N]" - show
which interfaces have which ACL(s) applied.

"show acl-plugin tables" - a lower-level debug command
used to see the state of all of the related data structures
at once. There are specifiers possible, which make
for a more focused and maybe augmented output:

"show acl-plugin tables acl [index N]"
show the "bitmask-ready" representations of the ACLs,
we well as the mask types and their associated indices.

"show acl-plutin tables mask"
show the derived mask types and their indices only.

"show acl-plugin tables applied [sw_if_index N]"
show the table of all of the ACEs applied for a given
sw_if_index or all interfaces.

"show acl-plugin tables hash [verbose N]"
show the 48x8 bihash used for the ACL lookup.

Change-Id: I89fff051424cb44bcb189e3cee04c1b8f76efc28
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-19 11:56:10 +00:00
Matus Fabian
029f3d2c1c NAT64: Hairpinning (VPP-699)
Change-Id: I83a6c277fa211ac2c2ca2d603650c992886af0a7
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-19 11:08:47 +00:00
Florin Coras
acd4c63e3c Fix map-notify processing with multiple workers
Change-Id: Id160346ebf533ee5f55bd735803624a75ed997b9
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-06-17 10:58:18 -07:00
Steven
27e7f21c4e memif: show memif CLI enhancement
Add optional keywords to show memif to allow display a particular
interface and option to display the descriptor tables. The new syntax for
the show memif command is now
  show memif [<interface>] [descriptors]

Change-Id: I20696bbea1142bdc152b6e351c6ece24b1cf5500
Signed-off-by: Steven <sluong@cisco.com>
2017-06-16 19:39:19 +00:00
Steven
0657c165d9 memif: jumbo frames support
Current memif interface supports frame size up to 2048. This patch is to
enhance memif to support jumbo frames.

On tx (writing buffers to the ring), keep reading the next buffer in vlib
when the flag VLIB_BUFFER_NEXT_PRESENT and merge it to the same ring entry.
Use descriptor chaining if the buffer is not big enough.

On rx (reading buffers from the ring), if the packet is greater than 2048,
create multiple vlib buffers, chained with the VLIB_BUFFER_NEXT_PRESENT.

Testing:
Because the ping command provided by VPP does not support jumbo frames,
I have to use linux ping. Here is the set up that I use for testing.

VM1 --- vhost ---- VPP1 --- memif --- VPP2 --- vhost --- VM2

Create vhost-user interfaces between VM1 and VPP1 and between VPP2 and VM2

VM configuration:
Set the interface mtu on the VM, e.g 9216 to support jumbo frames.
create static route and static arp on VM1 to VM2 and vice versa.
Use iperf3 or ping -s 8000 from VM1 to VM2 or vice versa.

Sample run
sluong@ubuntu:~$ ping 131.1.1.1 -c1 -s 8000
ping 131.1.1.1 -c1 -s 8000
PING 131.1.1.1 (131.1.1.1) 8000(8028) bytes of data.
8008 bytes from 131.1.1.1: icmp_seq=1 ttl=62 time=0.835 ms

--- 131.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.835/0.835/0.835/0.000 ms
sluong@ubuntu:~$

DBGvpp# sh interface memif0
              Name               Idx       State          Counter          Count
memif0                            1         up       rx packets                     1
                                                     rx bytes                    8042
                                                     tx packets                     1
                                                     tx bytes                    8042
                                                     ip4                            1
DBGvpp#

Change-Id: I469bece3d45a790dceaee1d6a8e976bd018feee2
Signed-off-by: Steven <sluong@cisco.com>
2017-06-16 19:39:03 +00:00
Filip Tehlar
f89d1859b1 LISP-GPE: add test CLI for NSH
Change-Id: I9999474c1a4b744f5d5880ee99a0293c576f2819
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-06-16 18:18:39 +00:00
Damjan Marion
6f9ac6559b Add missing barrier sync to rx placement infra code
Change-Id: I25ccf8260dbe7e1550aee3904a688fc135ce1f03
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-06-16 18:14:56 +00:00
Florin Coras
f53a8adf13 Fix vni/dp_table endianness for gpe iface addition (VPP-882)
Change-Id: I2b78dad740b67fc05b0e2cf9c180809bc0962cd5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-06-16 18:14:00 +00:00
Florin Coras
b5c29f9c22 Fix gpe_native_fwd_rpaths_get (VPP-883)
Change-Id: Iab2aa5fd92b9e95049f55fce4177e236a482723c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-06-16 11:39:27 +00:00
Hongjun Ni
dd37e13d5c Add maintainer for GTPU Plugin
Change-Id: Ic8cecdee7ae74a6b816e0a02985c456fd3ec8d8f
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-06-16 00:58:35 +00:00
Filip Tehlar
b4243aaa7a Add VAT handlers for LISP-GPE API
Change-Id: Id1139533c41cabef48394b5d79750608e0b74179
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-06-15 21:31:59 +00:00
Andrew Yourtchenko
779c3e3a63 acl-plugin: store sessions in a single hash table instead of a per-interface
A bihash-per-interface is convenient, but turns out tricky difficult from
the maintenance standpoint with the large number of interfaces.
This patch makes the sessions reside in a single hash table for all the interfaces,
adding the lower 16 bit of sw_if_index as part of the key into the previously
unused space.

There is a tradeoff, that a session with an identical 5-tuple and the same
sw_if_index modulo 65536 will match on either of the interfaces.
The probability of that is deemed sufficiently small to not worry about it.
In case it still happens before the heat death of the universe,
there is a clib_warning and the colliding packet will be dropped,
at which point we will need to bump the hash key size by another u64,
but rather not pay the cost of doing that right now.

Change-Id: I2747839cfcceda73e597cbcafbe1e377fb8f1889
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-15 20:27:39 +00:00
Dave Wallace
b2d5ff349d Fix session api connect sock handler.
Change-Id: I034efb9fc3ebb846c0aef07b18c1f110b8cbf3e3
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-06-14 15:22:46 -04:00
Andrew Yourtchenko
8e60f32c57 acl-plugin: shrink the L2 classifier tables used for traffic redirect
The previous iteration of the code used the L2 classifier tables for session storage,
as a result, the table allocations were pretty big. The new ACL plugin
datapath uses the tables just as a redirection mechanism, without adding any
entries. Thus, the tables can be much smaller.

Change-Id: Ieec4a5abf0abda6e513ab4e675f912f14d47e671
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-14 14:12:51 +00:00
Dave Barach
28b70af8e5 VPP-874: fix coverity warnings in tw_timer_template.c
Best guess, tested carefully, should do no harm. Clang doesn't
complain either way; it's not certain that this patch will make the
coverity warnings in tw_timer_template.c disappear.

Change-Id: I75aa0cfd8970751e823a1165df2a755e947c4cf9
Signed-off-by: Dave Barach <dave@barachs.net>
2017-06-14 11:35:12 +00:00
Eyal Bari
6f7ebf900e ETH:fix l2_len/vlan count mismatch for > 2 tags
l2_len was not updated for the third tag
as the ethernet node retracts by the vlan count after parse_header (using
ethernet_buffer_header_size) it ends up pointing before the ethernet header

+ some minor cleanups

Change-Id: I4ccaedd33928912e5d837376f146503b27071741
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-06-14 07:08:18 +00:00
Pavel Kotucek
89111d0403 Flowprobe - tests speed-up
Updated test to reduce tests runtime.

Change-Id: I7904628fc19d349d6c26502e49d4c990cb8816ff
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-06-13 16:05:15 +00:00
Neale Ranns
aba8be617c FIB walk process - wake-up rate unnecessarily high
Change-Id: I7dedf283c83c7f0e0b7642f095b68bc0b40898cf
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-06-13 12:20:55 +00:00
Matus Fabian
4b30ceb1b4 SNAT: fix 1:1 NAT without port hairpinning TCP checksum update
Change-Id: I5077fcf3671a6116b475f87e43120efc10ecaa08
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-13 08:19:10 +00:00
Damjan Marion
3b20ee4e2b memif: fix crash during interface delete
Change-Id: Ide6d26d6fcc81be6f26ac0abe2cd0d6a0838cfe6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-06-13 03:11:14 +00:00
Eyal Bari
b823df5a7d L2FIB:fix crash in show with deleted subif entries
after deleting a sub interface it's l2fib entries are left with a dangling
sw_if_index (while waiting for the ager to delete them).
changed "show l2fib" to reflect that state with "Deleted" as the interface name.

added sleep in test_l2_fib as a workaround for packets still passing after flush
will investigate...

Change-Id: Id998d7d3c6a073ef5005c5f3009e1cfb7febf7db
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-06-12 22:52:35 +00:00
Dave Barach
4af9ba1dab three-level timer wheel implementation w/ overflow vector
prep work for s/timing_wheel/tw_timer/ in the vlib process model

Change-Id: I763f4968a8fce1764a3778b12def0afbd30086b1
Signed-off-by: Dave Barach <dave@barachs.net>
2017-06-12 18:41:03 +00:00
Damjan Marion
d51a1f6ffe memif: complete refactor of socket handling code
Change-Id: I4d41def83a23f13701f1ddcea722d481e4c85cbc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-06-12 13:30:14 +00:00
Neale Ranns
b32fde58fd Fix build breakge post 6956
Change-Id: I0ab0e3e40b00ed5c2a34f5c23d04b596c1e9aa5f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-06-12 06:12:26 -07:00
Matus Fabian
89223f4623 NAT64: bug fix
ICMP to ICMPv6 error message inner UDP packet translation
delete ST entries when deleting static BIB entry

Change-Id: I2a28631ac040e20827a692331506cd8254f70916
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-12 12:12:52 +00:00
Jan Gelety
0fc6595add Update CSIT tests 170605 -> 170612
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I0e19f085153ca00ddb46e016cff742b42eca15a0
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-06-12 11:59:40 +00:00
Christophe Fontaine
b4bd28a490 Remove calls to crc_u32 and add clib_crc32c for armv8+crc
crc_u32 was not defined for non x86_64 with SSE4.2 processors.

Calls to "crc_u32" are removed and replaced by either a call to
clib_crc32c or a call to clib_xxhash, as the result is not used
as a check value but as a hash.

Change-Id: I3af4d68e2e5ebd0c9b0a6090f848d043cb0f20a2
Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
2017-06-12 11:56:02 +00:00
Matus Fabian
c9b622fbac NAT64: coverity fix
Change-Id: I08544b2f06f993c8a6435901232a0616d0548b94
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-12 10:04:27 +00:00
Filip Tehlar
b8633d2570 Fix coverity issue
Change-Id: Ib62ee0eacd6c91dc4cd95835efe901079754ef42
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-06-12 09:00:48 +02:00
Neale Ranns
76481d0994 MPLS: cannot delete a path from the CLI
Change-Id: I7f85870ef99405727312a5de6839c8875c9fa1c5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-06-10 15:15:38 +00:00
Florin Coras
27b390e87d Fix gpe coverity issue (VPP-874)
Change-Id: I70fb60619a0a02d891276ea6c7ac277ba2b26fa3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-06-09 10:22:22 -07:00
Florin Coras
93992a9048 Implement sack based tcp loss recovery (RFC 6675)
- refactor existing congestion control code (RFC 6582/5681). Handling of ack
  feedback now consists of: ack parsing, cc event detection, event handling,
  congestion control update
- extend sack scoreboard to support sack based retransmissions
- basic implementation of Eifel detection algorithm (RFC 3522) for
  detecting spurious retransmissions
- actually initialize the per-thread frame freelist hash tables
- increase worker stack size to 2mb
- fix session queue node out-of-buffer handling
  - ensure that the local buffer cache vec_len matches reality
  - avoid 2x spurious event requeues when short of buffers
  - count out-of-buffer events
- make the builtin server thread-safe
- fix bihash template threading issue: need to paint -1 across uninitialized
  working_copy_length vector elements (via rebase from master)

Change-Id: I646cb9f1add9a67d08f4a87badbcb117980ebfc4
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dbarach@cisco.com>
2017-06-09 16:47:19 +00:00
Ray Kinsella
583dc8d3e2 Sample plugin: Add sample plugin documentation
Added some user documentation to sample plugin.

Change-Id: I518910f80499307e8fcac8dcef7baaeab5ea8e35
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
2017-06-09 16:34:40 +00:00
Andrew Yourtchenko
7d5fae861e acl-plugin: wrap a verbose debug message in the appropriate conditional
Change-Id: Ibd57cb617642e42d4c4d64f186479702b8a81900
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-09 13:48:15 +00:00
Sergio Gonzalez Monroy
fd1dee5086 dpdk: fix ipsec coverity warning
CID 170475

Change-Id: I9748dd56bdcb62e68d8f672e5b1619a3be400b8f
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-06-09 08:57:20 +00:00
Matus Fabian
732036d677 NAT64: ICMP error support
Added ICMP error messages translation.
Added check for multi thread (not supported yet, so init failed).
Added API definition for custom NAT64 refix.

Change-Id: Ice2f04631af63e594aecc09087a1cf59f3b676fb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-09 07:30:14 +00:00
Filip Tehlar
ef2a5bf0a3 LISP: add NSH support
Change-Id: I971c110ed126f1a24a963f9d3b88cf8f8c308816
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-06-08 11:05:35 -07:00