2330 Commits

Author SHA1 Message Date
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
Andrew Yourtchenko
5e8527603f acl-plugin: remove clib_warnings on plugin init
Change-Id: Ic3c9a914a588824b8abd6668961f731432083c4f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-08 18:05:01 +00:00
Florin Coras
a4e63e5593 Add gpe native-forward static route support
Change-Id: I744e7d64d94dbb302f2c1246663480f720672ee2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-06-08 17:43:56 +00:00
Pavel Kotucek
6899a30bd7 P2P Ethernet - API
API for P2P Ethernet feature

Change-Id: Id0280f42b9ce2428262e79c4dc309595037cd10e
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-06-08 14:55:08 +00:00
Matus Fabian
06596c54dc NAT64: Add NAT64 support for snat plugin (VPP-699)
Basic NAT64 feature (no hairpinning, no multi-thread).

Change-Id: I392fccbce93e70c117f4a9a7ec7cf08d6c537f2d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-08 11:39:53 +00:00
Florin Coras
2fcc49d9c6 Small update to session API
Change-Id: I6a566d1dc9531b790bdcb00edc73516f86daeb72
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-06-07 14:23:19 -07:00
Klement Sekera
3658adcadc make test: improve debugability
Introduce faulthandler to print stack trace to stderr on python crash.
Don't disable automatic garbage collection to decrease the chances of
running out of memory.

Change-Id: I6927a5f6ea9569735d084d4ed3d258950a400d74
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-06-07 17:03:37 +00:00
Dave Barach
48113e0c86 VPP-874: fix coverity warning in vnet_classify.c
Change-Id: Icffd2862eadbe9ddfb3ee34f3cb19c9324b3d9b4
Signed-off-by: Dave Barach <dave@barachs.net>
2017-06-07 13:55:38 +00:00
Andrew Yourtchenko
6295d50b37 acl-plugin: add a plugin-specific control-ping message api and make the test code use it
This fixes the undesirable pause in the dump commands in case there is nothing to dump.

Change-Id: I0554556c9e442038aa2a1ed8c88234f21f7fe9b9
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-07 13:38:29 +00:00
Andrew Yourtchenko
5dbfbb7110 acl-plugin: make the ACL plugin multicore-capable
Add the logic to be able to use stateful ACLs in a multithreaded setup.

Change-Id: I3b0cfa6ca4ea8f46f61648611c3e97b00c3376b6
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-07 13:37:46 +00:00
Dave Barach
a62699954a VPP-873: fix vector expansion bug in dispatch_pending_node
The main interior graph-node dispatch loop had a longstanding dangling
vector element reference:

for (i = 0; i < _vec_len (nm->pending_frames); i++)
   cpu_time_now = dispatch_pending_node (vm, nm->pending_frames + i,
                               cpu_time_now);

Passing a pointer to a vector element (nm->pending_frames + i) has
considerable comedic potential if there's any chance that the vector
could expand.

dispatch_pending_node() calls dispatch_node(), and indirectly any
interior graph node dispatch function. If that node happens to expand
nm->pending_frames by filling in a new frame, nm->pending_frames can
expand.

After calling the node dispatch function, dispatch_node() does the
following:

  nf = vec_elt_at_index (nm->next_frames, p->next_frame_index);

If nm->pending_frames expands during dispatch function execution, p is
a dangling reference to freed memory.

By luck, the TCP stack managed to allocate a fresh frame which
included "old-p," which caused p->next_frame_index to be filled with
the new-frame poison pattern 0xfefefefe.

This has been broken from day 1, summer 2007, first use of the
third-generation vector processing library.

Change-Id: Ideb6363bb060c4e8bf9b901882c318bd83853121
Signed-off-by: Dave Barach <dave@barachs.net>
2017-06-07 13:35:04 +00:00
Pablo Camarillo
7a4e0925f5 VPP-872 and End.T function for SRv6
Fixes VPP-872 and adds support for End.T

Change-Id: I3c32cb6e412f37babe1abd293c0b6b49367fc2a9
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
2017-06-07 13:01:33 +00:00
Andrew Yourtchenko
0018a3e54e acl-plugin: fix coverity error in acl_test.c
Attempting to supply within a VAT CLI to add the ACLs a rule count
override with no rules to add would result in null pointer dereference
as we attempt to copy those rules to the message.
Add the check to avoid copy if the source pointer is null
(i.e. if there are no rules to copy from).
This commit fixes coverity errors 166797 and 166792.

Change-Id: Icabe060d961ba07dc41f63b8e17fca12ff82aa29
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-06-07 12:41:39 +00:00
Sergio Gonzalez Monroy
539ed4fee5 dpdk: ipsec fixes
- Fix buffer trace from esp_decrypt node
- Fix VLIB_REGISTER_NODE macro format
- Remove unnecessary code since we do not reconfigure graph
  unless requirements are met

Change-Id: Ic1c2afffb8265e40a6ced0c8a58775c05fadc9e2
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-06-07 12:41:11 +00:00
Sergio Gonzalez Monroy
07950f82ba dpdk: fix ipsec coverity warnings
CID 161044 and 161045

Change-Id: I50a450e231e387f05e354e3b07dc777ab864d018
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-06-07 12:40:44 +00:00
Milan Lenco
7c2ea75199 Add support for memif API to VAT.
Change-Id: I01dc439fc84f9213e55ba56982eff34474637115
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
2017-06-07 11:30:17 +00:00
Neale Ranns
6ff05499ab Fix coverity error in IP4 Mtrie.
Change-Id: I586a758a8b4b0ea5ca030b2df2796f5acb49e154
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-06-06 17:03:54 +00:00
Neale Ranns
30d0fd4804 Packets recieved on VLAN-0 map to the main interface
Change-Id: I21b1ad39275495d4d006023b58f630a213445854
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-06-06 15:37:12 +00:00
Filip Tehlar
761787bd0b Fix coverity issue
Change-Id: I5f7dc38beb96b600be67599049f951d8a17ff8da
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-06-06 15:32:52 +02:00
Jan Gelety
1728d4a81e Update CSIT tests 170529 -> 170605
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I49396105470609422f28a49211012fcd9f252587
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-06-06 09:41:06 +02:00
Hongjun Ni
8a0a0ae60b Rework vxlan-gpe to support FIB 2.0 and bypass mode
Change-Id: I0324f945bdb4dd3b19151be6f3ce24a47a000104
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-06-06 07:26:00 +00:00
Florin Coras
e68de8c333 Fix lisp map-notify parsing
Change-Id: Ib22ffee3d8ac63af171d032c2ffcb44a2e42400c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-06-06 01:10:38 +00:00
Damjan Marion
6e8ab16cf3 vlib: add screen-256color CLI terminal type
Change-Id: Ia78e69e5e8ed18020314aef321b94ac37037799b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-06-06 00:35:56 +00:00
Damjan Marion
a9a54c15e6 vlib: add unix_file_del_by_index function
Change-Id: I9eca5f9d1c1ae62d5ba5fb36f2f97434dbaf334e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-06-05 23:40:05 +00:00
Damjan Marion
7d27218174 vppinfra: fix vec_validate_init_empty_aligned macro
Change-Id: Ieafd00c7d03fe5c090808c7af4aa2f86974a092e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-06-05 23:39:22 +00:00
Matus Fabian
6fa74c60ea SNAT: fix ICMP hairpinning
Change-Id: I9d63133bd1db72917571ade868040c4597c896a1
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-05 19:58:35 +00:00
Marco Varlese
47366b19fb More GCC-7 errors
The Wmaybe-uninitialized is the new error included with Wall.
This patch addresses the warning and fixes it.

Change-Id: I8fdf9ff2d236c46b717024a14874fbbbad8af303
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-06-05 19:58:18 +00:00
Filip Tehlar
560274d042 LISP-GPE: return index of newly created fwd entry, VPP-868
Change-Id: I4fc45097cb994ab6a59503d9fcfb693d1c7ec442
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-06-05 15:31:07 +00:00
Filip Tehlar
719aef4835 LISP: fix GPE entry dump, VPP-871
Change-Id: Ifcd6d2caecce29c8b4605d06b9df82b36a403e74
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-06-05 09:50:38 +02:00
wenxian li
6e19b37757 Fix typo for specifying table_id on ping.
Change-Id: I76d399915c76ec68d8a401e11c14dc15c55291e4
Signed-off-by: wenxian li <wofanli@gmail.com>
2017-06-04 16:38:43 +00:00
Marco Varlese
8c55b37a22 Fix for gcc7
When building VPP code with gcc7 a warning (threated as error) is encountered and the build fails.
This patch addressed the compilation issue.

Change-Id: I49af9288a84d91ec8145da07c00aefb5333ec418
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-06-03 01:55:11 +00:00
Steve Shin
871cdec1b5 Fix mac_age process crash in multi-threaded environment
VPP crash is observed when MAC aging is enabled with multi-threaded mode.
If a thread other-than-zero expands the working_copies vector,
working_copy_lengths should be initialized with vec_validate_init_empty(..., -1)
to fill -1 across lower-numbered working_copy_lengths vector element.

Change-Id: I60959fc6511306b33acae323df9c6898fc6c50ce
Signed-off-by: Steve Shin <jonshin@cisco.com>
2017-06-02 15:17:32 -07:00