Compare commits

...

675 Commits

Author SHA1 Message Date
Steven Luong
cce845e371 mp_safe SW_INTERFACE_DUMP, SW_INTERFACE_DETAILS, SW_INTERFACE_TAG_ADD_DEL,
BRIDGE_DOMAIN_DUMP, CONTROL_PING, CONTROL_PING_REPLY, and show interface CLI

Change-Id: I2927573b66bb5dd134b37ffb72af0e6676750917
Signed-off-by: Steven Luong <sluong@cisco.com>
(cherry picked from commit 15c31921a628c5500cbed2ebc588d7ddbaa970a3)
2019-05-07 18:17:03 +00:00
Michal Cmarada
c2f8265c1d VPP-1477: Replace DatatypeConverter.printHexBinary with bytesToHex
As of Java 11 javax.xml.bind.DatatypeConverter is no longer part of
standard Java distribution, therefore it is replaced by equivalent method.


Change-Id: I51726d0d0d02782bd3bb1dbdc54df5bd63bd8f15
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
(cherry picked from commit feb7092544a9e49370037b6d90b43e98c65e7a41)
2019-05-03 20:52:11 +00:00
Igor Mikhailov (imichail)
1161ddaa6f SPAN: Add pending frame on current thread, not on main
Previously, all frames were put for next node on the main thread,
even if the execution was happening on a worker thread.

Also, refactor to use API function vnet_get_main()

Change-Id: Ibefb1b3871563a78aa30352a37b9216537e15bf7
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
(cherry picked from commit 2d6fc6b082c9b4bf9481b58f68def13792822805)
2019-03-30 04:56:58 +00:00
Neale Ranns
fe18c808e2 FIB: pass a copy the walk context
since it can realloc when new ctx are added. If
not we can get some nasty memory corruption.

Change-Id: I617709c3013acbcb8aee07dc147894f0de896555
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 58085f2f6757e464196b283cc8335ab5cf34a012)
2019-03-13 12:26:36 +00:00
Neale Ranns
a6562a22e4 FIB: path parsing, table-id not fib-index (VPP-1586)
Change-Id: Ib27952935393163eaabf005c69b1cbc2feca2b98
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-12 12:13:58 -04:00
Joe Zhou
43e7d25d9f assign flood_class to vnet_sw_interface_t template in subif api handle function
Change-Id: I352f4a4adcf8771c21530657efcaecb532416612
Signed-off-by: Joe Zhou <zhouyoucn@qq.com>
(cherry picked from commit 715f94ed94638ea883f919361bff7a3f46fd1d1b)
2019-03-07 15:36:14 +00:00
Igor Mikhailov (imichail)
0f867653e4 Fix 'show interface span' field length
Allow to display longer interface names, e.g. VirtualEthernet0/0/0.102
The field length (32) is now the same as for 'show interface'.

Change-Id: I1cb1efd459acb800bfaeeec40b672c8b17cd8c3d
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
(cherry picked from commit 0ac827e15c5ee2134a15bf5e023e03967ddcbaa8)
2019-03-05 19:59:25 +00:00
Ed Kern
a0005702c9 Makefile: correct opensuse 15.0 dep naming
This covers both naming option for opensuse leap15
dep package naming

Change-Id: I2ade004e44e75c08afde0f3af42b33cd97ce0ebc
Signed-off-by: Ed Kern <ejk@cisco.com>
2019-03-03 13:28:05 +00:00
Ole Troan
3d09e9992d 1810 version of VPP-1573 fix crash in ip6 reassembly
Change-Id: I20d15ee45957e9fb5a7b3e7edd10cd34b308b664
Signed-off-by: Ole Troan <ot@cisco.com>
2019-03-01 11:14:59 +01:00
Dave Barach
ca561dffe1 VPP-1529: check hop-by-hop header length
Fix a single packet-of-death case, caught by vlib_buffer_advance() in
debug images.

Change-Id: I9c107f20d7c053c3e40a0756dd7ca1c3be276a1a
Signed-off-by: Dave Barach <dave@barachs.net>
2019-03-01 08:51:15 +01:00
Ole Troan
1dd1a77cfd reassembly fixes merged into one for stable/18.10.
Change-Id: Ic389807abaa10433c4ba6f111c5c27d035731fa8
Signed-off-by: Ole Troan <ot@cisco.com>
2019-02-28 16:53:21 +01:00
Steven Luong
a867edfb6b vhost: VPP stalls with vhost performing control plane actions
Symptom
-------
With NDR traffic blasting at VPP, bringing up a new VM with vhost
connection to VPP causes packet drops. I am able to recreate this
problem easily using a simple setup like this.

TREX-------------- switch ---- VPP
    |---------------|  |-------|

Cause
-----
The reason for the packet drops is due to vhost holding onto the worker
barrier lock for too long in vhost_user_socket_read(). There are quite a
few of system calls inside the routine. At the end of the routine, it
unconditionally calls vhost_user_update_iface_state() for all message
types. vhost_user_update_iface_state() also unconditionally calls
vhost_user_rx_thread_placement() and vhost_user_tx_thread_placement().
vhost_user_rx_thread_placement scraps out all existing cpu/queue mappings
for the interface and creates brand new cpu/queue mappings for the
interface. This process is very disruptive and very expensive. In my
opinion, this area of code needs a makeover.

Fixes
-----
* vhost_user_socket_read() is rewritten that it should not hold
  onto the worker barrier lock for system calls, or at least minimize the
  need for doing it.
* Remove the call to vhost_user_update_iface_state as a default route at
  the end of vhost_user_socket_read(). There is only a couple of message
  types which really need to call vhost_user_update_iface_state(). We put
  the call to those message types which need it.
* Remove vhost_user_rx_thread_placement() and
  vhost_user_tx_thread_placement from vhost_user_update_iface_state().
  There is no need to repetatively change the cpu/queue mappings.
* vhost_user_rx_thread_placement() is actually quite expensive. It should
  be called only once per queue for the interface. There is no need to
  scrap the existing cpu/queue mappings and create new cpu/queue mappings
  when the additional queues becomes active/enable.
* Change to create the cpu/queue mappings for the first RX when the
  interface is created. Dont remove the cpu/queue mapping when the
  interface is disconnected. Remove the cpu/queue mapping only when the
  interface is deleted.

The create vhost user interface CLI also has some very expensive system
calls if the command is entered with the optional keyword "server"

As a bonus, This patch makes the create vhost user interface binary-api and
CLI thread safe. Do the protection for the small amount of code which is
thread unsafe.

Change-Id: I4a19cbf7e9cc37ea01286169882e5603e6d7eb77
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-02-18 19:45:59 +00:00
Steven
13f5dcf915 bond: packet drops on VPP bond interface [VPP-1544]
We register callback for VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION and
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION to add and remove the slave
interface from the bond interface accordingly. For static bonding without
lacp, one would think that it is good enough to put the slave interface into
the ective slave set as soon as it is configured. Wrong, sometimes the slave
interface is configured to be part of the bonding without ever bringing up the
hardware carrier or setting the admin state to up. In that case, we send
traffic to the "dead" slave interface.

The fix is to make sure both the carrier and admin state are up before we put
the slave into the active set for forwarding traffic.

Change-Id: I93b1c36d5481ca76cc8b87e8ca1b375ca3bd453b
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit e43278f75fe3188551580c7d7991958805756e2f)
2019-01-23 22:41:13 +00:00
Damjan Marion
9858d374ad virtio: fix kick race issue [VPP-1489]
Change-Id: I25b2a28513821bc5eab9ac6890a3964d412b0399
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit e40231b1ecf4b49faaa9ce7b615a7d867104825b)
2019-01-23 03:43:27 +00:00
Florin Coras
69a9fc053d install-dep: force osleap boost dep install
jobs in stable/1810 failed to verify even after many rechecks. This is found in the failure log from https://gerrit.fd.io/r/#/c/16728/

13:01:56 2 Problems:
13:01:56 Problem: libboost_headers1_68_0-devel-1.68.0-lp150.243.1.x86_64 conflicts with namespace:otherproviders(libboost_headers-devel) provided by libboost_headers-devel-1.69.0-lp150.1.1.noarch
13:01:56 Problem: libboost_thread1_68_0-devel-1.68.0-lp150.243.1.x86_64 conflicts with namespace:otherproviders(libboost_thread-devel) provided by libboost_thread-devel-1.69.0-lp150.1.1.noarch
13:01:56 
13:01:56 Problem: libboost_headers1_68_0-devel-1.68.0-lp150.243.1.x86_64 conflicts with namespace:otherproviders(libboost_headers-devel) provided by libboost_headers-devel-1.69.0-lp150.1.1.noarch
13:01:56  Solution 1: Following actions will be done:
13:01:56   deinstallation of libboost_headers1_68_0-devel-1.68.0-lp150.243.1.x86_64
13:01:56   deinstallation of libboost_chrono1_68_0-devel-1.68.0-lp150.243.1.x86_64
13:01:56   deinstallation of libboost_date_time1_68_0-devel-1.68.0-lp150.243.1.x86_64
13:01:56  Solution 2: do not install libboost_headers-devel-1.69.0-lp150.1.1.noarch
13:01:56 
13:01:56 Choose from above solutions by number or skip, retry or cancel [1/2/s/r/c] (c): c
13:01:56 make: *** [Makefile:315: install-dep] Error 4

A test patch was created to include both 16631 and 16728 as found in https://gerrit.fd.io/r/#/c/16986/
The job was verified successfully. It proves to me that stable/1810 is missing 16631.

Change-Id: I4a053f41eef138fc0e6db7e2650860c0ac999552
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 223548d479c0bde67aa8d05a1f0f13e0afb0aab1)
2019-01-23 02:32:24 +00:00
juraj.linkes
a8e3001e68 Fix vat dependencies
Needed for arm machines in CI.

Change-Id: Ib16a8b63e145116c7cb22376243e9026d9545c8a
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
(cherry picked from commit a409f2729ac2431aeee5a18889b4d2e5634c713f)
2018-12-14 16:30:33 +00:00
Zhiyong Yang
55670421c8 ip4_rewrite_inline: fix variable error
Change-Id: I0470b4b13095583fe018f565f100342fab45715e
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
(cherry picked from commit b2ecc5d4156467c785c28493d614e874bc287cbd)
2018-12-13 08:12:46 +00:00
Dave Barach
4d1f9564da Delete shared memory segment files when vpp starts
Should have been done this way years ago. My bad.

Change-Id: Ic7bf937fb6c4dc5c1b6ae64f2ecf8608b62e7039
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit b2204671dad112e3195771854b4ef00bb388d4e6)
2018-12-12 14:02:39 +00:00
Filip Tehlar
e351f35019 Add UDP encap flag
Change-Id: Ic6a8b9aaec7e5dee4fb1971168988dbe4f931f86
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2018-12-10 14:29:01 +00:00
Neale Ranns
c90a2aa0f1 MPLS: buffer over-run with incorrectly init'd vector. fix VAT dump
Change-Id: Ifdbb4c4cffd90c4ec8b39513d284ebf7be39eca5
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 44cea225e2238a3c549f17f315cd1fbc6978c277)
2018-12-05 06:28:31 +00:00
Neale Ranns
ad5f2de904 IPSEC-AH: fix packet drop
Change-Id: I45b97cfd0c3785bfbf6d142d362bd3d4d56bae00
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-30 09:19:32 +00:00
Onong Tayeng
00adcceaf0 Fix permission for vpp_papi
The permission for the top-level vpp_papi dir under
/usr/lib/python2.7/site-packages is set to 644 which means that
non-root users cannot import vpp_papi. As a result, devstack setup
with VPP/networking-vpp fails since it is run as non-root user.

Change-Id: Id85b468b2dcc92efb3a64c51ffb23ef6d596e4ad
Signed-off-by: Onong Tayeng <otayeng@cisco.com>
(cherry picked from commit 9b0ce0215b6e699851a3b54fb2a7003800ca53e4)
2018-11-26 08:59:39 +00:00
Andrew Yourtchenko
277681ebfd acl-plugin: fix coverity error that the fix related for [VPP-1502] has triggered
Fix the trivial use-before-check copypaste error.

There was a more subtle issue with that patch that Coverity didn't notice:
namely, vec_validate(v, len-1) is a terrible idea if len happens to be == 0.
Fix that.

Change-Id: I0fab8b1750e9e9973eefb5d39f35e4c3a13fc66f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit e0152461cbc84d6d4df3f05dddabe992c1c59052)
2018-11-23 14:06:30 +00:00
Matus Fabian
0858497cee NAT44: improve expired sessions reuse (VPP-1503)
Change-Id: Iab506f127136c94a641df31ded108016de26260b
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-11-23 11:08:36 +00:00
Andrew Yourtchenko
9e182dcaca acl-plugin: optimize hash memory usage + fix the startup config parsing for memory sizes [VPP-1502]
In a couple of places vec_add1()-style was repeatedly called in a loop for
smallish vectors where the number of additions was known in advance.
With a test with large number of ACEs these numbers contribute to heap
fragmentation noticeably.

Minimize the number of allocations by preallocating the known size and
then resetting the length accordingly, and then calling vec_add1()

Also unify the parsing of the memory-related startup config parameters.

Change-Id: If8fba344eb1dee8f865ffe7b396ca3b6bd9dc1d0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 94f509615eb97cebc9192e7290c84cf166518039)
2018-11-22 19:10:47 +00:00
Matus Fabian
1d403abe1b NAT44: Apply transitory timeout on TCP RST (VPP-1494)
RFC7857 section 2.2.

Change-Id: I031af5fe379b72262e83fd8565c34fa1b772f2c8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit 15e8e681813a2e88dad107b5fe238bc8abee17d2)
2018-11-22 06:51:53 +00:00
Matus Fabian
45ed202905 NAT44: fix virtual fragmentation reassembly in forwarding mode (VPP-1501)
Change-Id: Id86d8aa8753b9b2ff4c709b11e3901ba8d552918
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit 111add7e5d6581bb4eca05cc862a651ff6a09792)
2018-11-20 12:43:03 +00:00
Matus Fabian
6ff8790c92 NAT44: fix bug in TCP close with output-feature interface (VPP-1493)
Change-Id: If8c883d6b1ee58de9a03012d3567ec82211a0225
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit 6c01dceea5c612373453db7f1ccda589a2cd782e)
2018-11-19 13:09:17 +00:00
Matus Fabian
06eaab0ea8 NAT44: fix undesired dependency between static mapping and address from the pool (VPP-1485)
Change-Id: Iaa404361eac2a6612dcdaba3f73bae41a35c5446
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-11-07 11:33:28 +00:00
Filip Varga
12806a3cf0 VPP-1450: binary api call for dumping SPD to interface registration
Change-Id: Idd4a5f8bab5d39e5f33f5c130601175af70a20d4
Signed-off-by: Filip Varga <filip.varga@pantheon.tech>
Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-02 22:24:33 +00:00
Damjan Marion
d23f37eeaf vlib: define minimum chained buffer segment size
Change-Id: I9b5f7b264f9978e3dd97b2d1eb103b7d10ac3170
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit bd0da97e5ac0f84e1ea8e6e7f9549dd4e1a6a4ab)
2018-11-02 14:01:00 +00:00
Neale Ranns
c92341d5c6 Use throttle_t for ND throttling (VPP-1480)
Change-Id: I93c6b7bccd1a1ab71625ae29c99c974581186c4d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-02 13:58:44 +00:00
Yichen Wang
975b4b1f7a Makefile: support both RHEL and CentOS in install-dep (VPP-1481)
Change-Id: I31fd8700bfac462944b7621947edd3710fd247b9
Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-11-02 08:05:36 +00:00
Steven
64c5a5c656 vmxnet3: add logging support to the control plane [VPP-1470]
There are different flavors of vmxnet3 device, esxi server, vm fusion, vmware
workstation, and vmware player, that we need to communicate with. Each of
them also has different versions. We really need the control plane logging
to debug when things don't work as expected.

Change-Id: Idab6896e3d8bf841f1cd877c13a21531fa110568
Signed-off-by: Steven <sluong@cisco.com>
2018-10-23 11:58:08 +00:00
Marco Varlese
3a9a6f72d1 Release Notes for 18.10
Change-Id: I3500113f30d6d98eae69d39b59b90569c796e011
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-10-23 05:56:45 +00:00
Juraj Sloboda
78d828eff3 Fix buffer overflow when fragmenting packets (VPP-1383)
Change-Id: Idcda9ae55fa2efb0b2e928bac3e8e86ff8d19eba
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-22 21:02:51 +00:00
Ole Troan
9734c0a494 stats: Add wrapper for vec_free
The result vector from stat_segment_ls must be freed
by the caller. Add wrapper for non-C language bindings.

Change-Id: I7eee7f80ec98b41696d354add47b26978e12ef0f
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit 8254018c21bbdbbc11225ebc444b1d072606caf7)
2018-10-22 16:34:34 +00:00
Florin Coras
6a7103de93 lisp-gpe: register udp port only if enabled (VPP-1468)
Change-Id: I7d0930a19d927bbd7ba3fc879d5a0c8064827629
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-22 07:08:00 +00:00
Florin Coras
c8f3638bea tcp: count first lost hole (VPP-1465)
Change-Id: I3ac136e2a10796d8fa86ddb6f0d6cabe5fa749f8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-21 20:25:31 +00:00
Matus Fabian
79e4bc2d15 NAT44: fix ICMP virtual fragmentation reassembly (VPP-1466)
Change-Id: I8006bca02948d9121f474a3d14f0576747bb3c51
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-19 11:23:57 +00:00
Jakub Grajciar
23064dd22a Test FW: Use unittest temp dir as unix runtime dir
Change-Id: I5273d5f3f59cc3c43da0a15bb0c4a4056098adcf
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
(cherry picked from commit 997439170aa3bb562c84e882c45331ba476e7c8e)
2018-10-19 09:12:13 +00:00
Florin Coras
9a1e6eafd6 tls: fix connection failures/interrupts at scale (VPP-1464)
Change-Id: I0bc4062c1fd3202ee201acb36a2bb14fc6ee1543
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit c01d578a625fb136bc33b0eb9c19907769a67989)
2018-10-19 06:58:46 +00:00
Florin Coras
703ee73dfb tcp: fix sacks lost bytes counting (VPP-1465)
Change-Id: Ie46b3a81de4ed39b7b40e3879436f7e5a2908d98
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-19 01:14:15 +00:00
Marco Varlese
e1fe33d890 Update version (18.10) for API changes script
Change-Id: I41d22bfc87849e923628de08f922f7a541579fe1
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-10-18 09:37:17 +02:00
Florin Coras
dc532e4ff7 tcp: fix cleanup of non established connections (VPP-1463)
- fix delete of connection in syn-received
- fix delete of half-open connection

Change-Id: I72ff4b60406a2762d998328c52f41adea40d2c1b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-18 01:42:24 +00:00
Florin Coras
c10c73ffb3 tcp: fix multiple fin retries (VPP-1461)
Change-Id: I1be7c59df7b48875f81ebeebf5f39ed15a43d2d8
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit c977e7c100f5727183f9452e2c0d086623a21d15)
2018-10-17 15:55:04 +00:00
Eyal Bari
0d87894bf2 vxlan:decap caching error (VPP-1462)
Change-Id: I3ef0725684bcb8ea526abe0ce62562b35a0070f5
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-10-17 15:12:17 +00:00
Michal Cmarada
44c6e1d188 fix ip6 prefix check for tap_v2
Change-Id: Ifbb1393fc3c50c140c09e8baedcd4a92189ba56e
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2018-10-17 12:17:43 +00:00
Marco Varlese
44c6ca6038 Update to doxygen documentation for release 18.10
Change-Id: Id8eebd59bad27ac3cc46bf993a5ca1d8410bf84c
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-10-17 10:15:20 +00:00
Florin Coras
f1a1a4dbfc tcp: avoid sack processing when not needed (VPP-1460)
Change-Id: If81ee34e1f1e929de1a5b758ddb9aede4002e858
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-17 09:21:07 +00:00
mu.duojiao
b3aff922ff VPP-1459:Ip4 lookup fail when exist prefix cover.
Change-Id: I4ba0aeb65219596475345e42b8cd34019f5594c6
Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn>
(cherry picked from commit 9744e6d0273c0d7d11ab4f271c8694f69d51ccf3)
2018-10-17 07:54:25 +00:00
Florin Coras
7d76878ab3 tls: fix multi threaded medium scale test (VPP-1457)
- ensure session enqueue epoch does not wrap between two enqueues
- use 3 states for echo clients app, to distinguish between starting and
closing phases
- force tcp fin retransmit if out of buffers while sending a fin

Change-Id: I6f2cab46affd1148aba2a33fb6d58bcc54f32805
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-17 07:33:24 +00:00
Andrew Yourtchenko
84112dd4f9 acl-plugin: tuplemerge: refresh the pointer to hash-readied ACL entries per each collision in split_partition() (VPP-1458)
A pointer to hash-ready ACL rules is only set once, which might cause a crash if there are colliding entries
from more than one ACL applied.

Solution: reload the pointer based on the element being processed.

Change-Id: I7a701c2c3b4236d67293159f2a33c4f967168953
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-16 17:18:26 +02:00
Florin Coras
d6a0d0e206 vcl: fix bidirectional tests (VPP-1455)
- add epoll dequeued events beyond maxevents to unhandled
- filter multiple epoll rx events

Change-Id: I618f5f02b19581473de891b3b59bb6a0faad10b5
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit aa27eb95b7ee3bb69b62166d5e418e973cbbdcfa)
2018-10-16 10:05:57 +00:00
Steven
347c523c23 vmxnet3: show vmxnet3 with filtering capability [VPP-1452]
show vmxnet3 desc may display 5000 lines of output since it has 5 tables. Each
table may have 1000 entries. It would not be very useful to debug problem.

We need filtering capability for the subject show command. We need to be able
to display the descriptor table per interface, per interface per table, and
per interface per table per slot. The latter is the most useful.

tested the following valid combinations
show vmxnet3
show vmxnet3 desc
show vmxnet3 vmxnet3-0/13/0/0
show vmxnet3 vmxnet3-0/13/0/0 desc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp
show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1
show vmxnet3 vmxnet3-0/13/0/0 tx-comp
show vmxnet3 vmxnet3-0/13/0/0 tx-comp 1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-0 1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1
show vmxnet3 vmxnet3-0/13/0/0 rx-desc-1 1
show vmxnet3 vmxnet3-0/13/0/0 tx-desc
show vmxnet3 vmxnet3-0/13/0/0 tx-desc 1

negative tests and command is rejected
show vmxnet3 abc
show vmxnet3 desc abc
show vmxnet3 vmxnet3-0/13/0/0 abc
show vmxnet3 vmxnet3-0/13/0/0 desc abc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp abc
show vmxnet3 vmxnet3-0/13/0/0 rx-comp 1 abc

Change-Id: I0ff233413496e58236f8fb4a94e493494c20c5cb
Signed-off-by: Steven <sluong@cisco.com>
2018-10-15 21:56:14 +00:00
Steven
3d29e83112 vmxnet3: vmxnet3_test_plugin.so: undefined symbol: format_vlib_pci_addr [VPP-1456]
When using vpp_api_test, there is an undefined symbol error for
format_vlib_pci_addr when vmxnet3_test_plugin.so is loaded.

The cause is due to vlib not included in vpp_api_test. Remove the reference
for vlib.so in vmxnet3_test.

Change-Id: I37c00dfe2f843d99ad6c4fc7af6ed10bac4c2df8
Signed-off-by: Steven <sluong@cisco.com>
2018-10-15 10:26:41 -07:00
mu.duojiao
051984c6a1 VPP-1448: Fix error when recurse on down the trie.
Change-Id: Idfed8243643780d3f52dfe6e6ec621c440daa6ae
Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn>
(cherry picked from commit 59a829533c1345945dc1b6decc3afe29494e85cd)
2018-10-15 08:43:25 +00:00
Eyal Bari
6a86ca9627 vxlan:fix ip6 tunnel deletion
Change-Id: I70fb7394f85b26f7e632d74fc31ef83597efdd16
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit f8d5e214687c17fba000607336295e054672459d)
2018-10-14 23:01:19 +00:00
Florin Coras
795539326b vcl: fix empty epoll returns (VPP-1453)
Change-Id: I0b191ddb749b1aa132c2d33b8359c146b36d27af
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-14 10:49:03 +00:00
Florin Coras
02a60e01a7 session: don't wait indefinitely for apps to consume evts (VPP-1454)
Change-Id: I544b24d2b2c4a09829773cf180d1747f4b087d4c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-12 17:01:10 -07:00
Neale Ranns
9a5f9c9a43 L2-flood: no clone for 1 replication
Change-Id: If178dd38e7920f35588f5d821ff097168b078026
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit b9fa29d513bfad0d9f18e8ed8c2da3feaa6d3bf0)
2018-10-12 07:35:46 +00:00
Steven
9864f87b1b vmxnet3: better error handling [VPP-1449]
try harder on output - if there is no descriptor space available, try to free
up some and check again.
make sure we free the buffer if error is encountered on input.

Change-Id: I41a45213e29de71935afe707889e515037cd081f
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 8b0995366110ff8c97d1d10aaa8291ad465b0b2f)
2018-10-11 19:59:04 -07:00
Eyal Bari
125760947a bfd:fix handling session creation batch
when multiple session creating script is ran (via exec) only the first
one actually starts

Change-Id: I0fc36f65795c8921cf180e0b555c446e5a80be45
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit 0db9b04cf0f9c892a00988e7a61ae703aa83b721)
2018-10-11 23:38:24 +00:00
Ole Troan
0d222f88ed Stats: Include stat_segment.h in packages.
Change-Id: I976c0aba8397badf64763c4dbddce67009a4fb23
Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-11 23:37:37 +00:00
Neale Ranns
713322bd32 Integer underflow and out-of-bounds read (VPP-1442)
Change-Id: Ife2a83b9d7f733f36e0e786ef79edcd394d7c0f9
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-11 20:51:14 +00:00
Matus Fabian
33f276e0af NAT44: identity NAT fix (VPP-1441)
Change-Id: Ic4affc54d15d08b9b730f6ec6146ee053b28b4b6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-11 20:40:02 +00:00
Andrew Yourtchenko
7212e61d92 acl-plugin: reduce the syslog level for debug messages (VPP-1443)
Change-Id: Ie8380cb39424548bf64cb19aee59ec20e29d1e39
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-11 19:35:26 +00:00
Andrew Yourtchenko
376414f4c3 vnet: complete the fix for l3_hdr_offset calculation for single loop fastpass case (VPP-1444)
20e6d36b has moved the calculation of the l3_hdr_offset into the determine_next_node()
function, with the assumption that the current_data in the buffer is at
the L3 header. This is not the case for the single loop fastpath,
where the vlib_buffer_advance() call is made after the call to
determine_next_node(), as a day1 behavior. As a result - that path
incorrectly sets the l3_hdr_offset.

Solution: move the vlib_buffer_advance() call to before determine_next_node()

Change-Id: Id5eaa084c43fb6564f8239df4a0b3dc0412b15de
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-11 17:48:27 +00:00
Damjan Marion
5551e41f78 Fix vpp-ext-deps package version in stable branch
Change-Id: Ifb33622b50113501f1d23ab94ba9da708678d6be
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-11 17:13:35 +00:00
Marco Varlese
90395743d3 Update .gitreview for stable 18.10 branch
Change-Id: I9f3d551acad6fd2fdd733f7f49e8c75ef43ceebc
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-10-10 09:38:07 +02:00
Sirshak Das
4f611176e9 vppinfra: Fix extendto_high aarch64 NEON api.
This fixes the l2BD and ip4 test case failures.
Fixes VPP-1432, VPP-1428, VPP-1430

Change-Id: I48b5c961bab60cc3b39fcd6db47e098c81579480
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
2018-10-09 13:08:03 -05:00
Jakub Grajciar
7d476e03aa memif: coverity fix
Change-Id: I2b14e2a035a37b04816aac1e610146be58ad1e92
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-10-09 10:07:41 +02:00
Ole Troan
de728ac3c0 API: Spurious timeouts from timeout thread.
Change-Id: I1be1101ba4d82688a32b5ae2c39ca5d92dc244b7
Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-09 07:23:29 +00:00
Andrew Yourtchenko
20e6d36bca vnet: ethernet-input incorrectly sets l3_hdr_offset in some cases
The issue surfaced when developing the tap GSO code, with
an iteration where output path is reliant on
vnet_buffer (b0)->l3_hdr_offset being set correctly in
the input path, during performance testing.

Adding a workaround in the TX path shows that
the issue surfaces only for relatively few packets
during the test (about 100 out of 600000).

Analysis shows the issue arises if the ethernet-input
is handling two untagged packets with different sw_if_index
values - then the accelerated path punts to slow path,
before the setting of the l2.l2_len values is done,
thus resulting in them being 0, and l3_hdr_offset being
the same as l2_hdr_offset, wreaking havoc on TX path.

The solution is to move the l2_hdr_offset calculation
into a place where it is done for all the packets,
and move the l3_hdr_offset calculation into
the determine_next_node() function - as that function is
also the one setting the special-case l2.l2_len value for
tagged packets and moving the current_data for the L2 case.

Change-Id: If728c7715e011930c1887691188c98055bddde67
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-09 01:24:43 +00:00
Jakub Grajciar
4a0559a804 memif: socket filename add/del bugfix
Check access rights using effective user/group IDs

Change-Id: I3683258c24bcd7817024bffbd56b54b2f596fdd7
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-10-08 17:44:58 +00:00
Vijayabhaskar Katamreddy
cef5db0acd Adding Multipath support for exclusive DPO based fib path entries via rpath
Change-Id: I3c84daf046dbad972b36e48fa2548bbe20c7b338
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-10-08 14:43:21 +00:00
Hongjun Ni
c210cb50e8 Fix coverity issue for NSH plugin
Change-Id: Ie99ff9aebe3c896e3e104a5a7bebd84f7766e713
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-10-08 13:40:32 +00:00
Ole Troan
3620e61dec Stats: prometheus export coverity errors.
Change-Id: Ibc0a25dcf7d734215e0cffe789b5726f23e1c3d7
Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-08 12:27:24 +00:00
Matus Fabian
e2f4e2f175 NAT44: do not create session record for identity mapping (VPP-1439)
Change-Id: I39a3146a4e4ba8eadf50af7113b9ae6b1c1d688f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-08 11:46:23 +00:00
Neale Ranns
2fd4b56aea replicate trace fix
Change-Id: I785ecadbf30812a500629870aa717e64f4cf0cdd
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-08 08:14:57 +00:00
Florin Coras
1502fc303b vcl: cleanup and fixes for vcl test code
- better approximate time when test finishes
- move common vcl and sock test code to vcl_test.h
- overall refactor of variable names

Change-Id: I8e6b43fc017cd05a0ddaa3891767a44fb300c09e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-07 18:17:04 +00:00
Florin Coras
58c101adf0 vcl: use want_tx_evt for ct sessions
Change-Id: Id46c651c41b1c633326081583ee3383e27ef475d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-07 12:39:47 +00:00
Steven
318de5de97 bond: active-backup mode is using the wrong load balance algo
active-backup mode is using l2 load balance algo. It should be using
active-backup. Also notice that the output is missing a character.

vpp# create bond mode active-backup
create bond mode active-backup
vpp# sh bond
sh bond
interface name   sw_if_index  mode         load balance  active slaves  slaves
BondEthernet0    6            xor          l34           2              2
BondEthernet1    9            xor          l34           1              1
BondEthernet2    10           active-backu l2            0              0
vpp#

Change-Id: If5ed0cc6c25f6c2ddabec15ff6188b34923d38e3
Signed-off-by: Steven <sluong@cisco.com>
2018-10-06 22:33:41 -07:00
Damjan Marion
b7620fdfd5 vfio: don't display error if no pci devices are assigned to container
Change-Id: I21429ce084cfd39af6a9997b4c1e459f5a6ef672
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-05 18:02:13 +00:00
Damjan Marion
16de39e1a1 bond: tx perf improvement, part trois
Introduce bond_tx_inline which takes lb as a constant for gcc to do the optimization

The number appears a tad better for 256 bytes frame.

with the patch
--------------
Thread 2 vpp_wk_1 (lcore 3)
Time 4.3, average vectors/node 224.00, last 128 main loops 40.00 per node 222.61
  vector rates in 8.4836e6, out 1.6967e7, drop 0.0000e0, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
BondEthernet0-output             active             141054        36109824               0          2.51e1          256.00
BondEthernet0-tx                 active             141054        36109824               0          2.55e1          256.00
TenGigabitEthernet6/0/0-output   active             141054        18055469               0          9.43e0          128.00
TenGigabitEthernet6/0/0-tx       active             141054        18055469               0          6.97e1          128.00
TenGigabitEthernet6/0/1-output   active             141054        18054355               0          9.54e0          127.99
TenGigabitEthernet6/0/1-tx       active             141054        18054355               0          7.05e1          127.99
bond-input                       active             141054        36109824               0          1.76e1          256.00
dpdk-input                       polling             70527        36109824               0          5.03e1          512.00
ethernet-input                   active             141054        36109824               0          6.12e1          256.00
ip4-input                        active             141054        36109824               0          3.26e1          256.00
ip4-lookup                       active             141054        36109824               0          2.94e1          256.00
ip4-rewrite                      active             141054        36109824               0          3.27e1          256.00

without the patch
-----------------
Thread 2 vpp_wk_1 (lcore 3)
Time 4.3, average vectors/node 224.00, last 128 main loops 40.00 per node 222.61
  vector rates in 8.4443e6, out 1.6889e7, drop 0.0000e0, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
BondEthernet0-output             active             142744        36542464               0          2.51e1          256.00
BondEthernet0-tx                 active             142744        36542464               0          2.67e1          256.00
TenGigabitEthernet6/0/0-output   active             142744        18270813               0          9.19e0          127.99
TenGigabitEthernet6/0/0-tx       active             142744        18270813               0          6.98e1          127.99
TenGigabitEthernet6/0/1-output   active             142744        18271651               0          9.43e0          128.00
TenGigabitEthernet6/0/1-tx       active             142744        18271651               0          7.02e1          128.00
bond-input                       active             142744        36542464               0          1.76e1          256.00
dpdk-input                       polling             71372        36542464               0          5.08e1          512.00
ethernet-input                   active             142744        36542464               0          6.15e1          256.00
ip4-input                        active             142744        36542464               0          3.23e1          256.00
ip4-lookup                       active             142744        36542464               0          2.96e1          256.00
ip4-rewrite                      active             142744        36542464               0          3.28e1          256.00

Change-Id: I9fd43eda3c735cbff680ac6d2f01ecdae81f0eda
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-05 10:00:12 -07:00
Neale Ranns
ccc70f6c6e Source VRF Select tests
Change-Id: Id6c16462fccf890eaa0e526ad048e032c9da8800
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-05 16:25:55 +00:00
Dave Barach
f9faf2420c DOC ONLY: clean up plugin documentation
The old "sample_plugin" page was stuffed with superceded autotools
build information, so it morphed into an "add a new plugin" page based
on the emacs-lisp plugin generator.

Before sending hate mail about emacs, please *look* at the new
document: you'll find running the plugin generator hard to tell from
running a shell script.

Change-Id: I84da45675e838c05faeca05c8f7be45d8c7bff13
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-05 13:48:00 +00:00
Scott Keeler
25c4d396ea docs: add contiv vpp
Change-Id: I92227fc4968fc6a478beb7f38707b91e9f0635ec
Signed-off-by: Scott Keeler <skeeler@cisco.com>
2018-10-05 13:47:42 +00:00
Juraj Sloboda
2d24cd0272 NAT: convert remaining clib_warning to nat_log_*
Change-Id: Ie999ab852cc3775ec90820624d97be746d2590a4
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-05 13:32:55 +00:00
Paul Vinciguerra
98afc711c5 node_cli: Give the user a hint as to the problem.
tested with:
DBGvpp# show node foo
show node: unknown node name: 'foo'

DBGvpp# show node error-drop
node error-drop, type internal, state active, index 543
node function variants:
    ...

DBGvpp# show node error-drop bar
show node: unknown input 'bar'

Change-Id: I896cee9e60028a189dce83666fa4d32a14983a7b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-05 11:47:18 +00:00
Florin Coras
326b81e30e session: fix local session tagging and cleanup
Change-Id: I0d42a0c71fea7dd669fb1fe5ded7e6e944245c7d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-05 11:40:58 +00:00
Juraj Sloboda
b3f9050331 vhost_user: Add test for interface states and events
Change-Id: I2c330945bb0b07f649f574a055bfbea455e5d0b3
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-05 10:13:18 +02:00
John Lo
d63abff00f On interface deletion - make sure any vlan qinq table is cleared
Change-Id: Ie9bb1cfce2369b448ca55a21b2f8b8bbbb81c59c
Signed-off-by: John Lo <loj@cisco.com>
2018-10-05 06:25:32 +00:00
Ian Wells
412ecd320a Improve ip_mroute_add_del documentation
Change-Id: Ieb882cc67c37bf591b6c737234263c7c35416e6d
Signed-Off-By: Ian Wells <iawells@cisco.com>
2018-10-05 03:46:48 +00:00
Eyal Bari
efd9cf302f vxlan:ip4 decap:remove access to tunnel object
store local/remote addresses + vrf + vni in hash key
store complete decap info in hash value (sw_if_index + next_index +
error)

this removes the need to access the tunnel object when matching both
unicast and mcast.

however for mcast handling it requires 3 hash lookups:
* one failed unicast lookup (by src+dst addrs)
* lookup by mcast(dst) addr .
* unicast lookup (tunnel local ip as dst + pkt's src addr)

where previously it needed 2:
* lookup by src to find unicast tunnel + compare dst to local addr
(failing for mcast)
* lookup by mcast to find the mcast tunnel

Change-Id: I7a3485d130a54194b8f7e2df0431258db36eceeb
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-10-05 03:25:39 +00:00
Florin Coras
dc7b1aa1e3 vcl: fix test throughput computation
Change-Id: I78260cd1a412e93a5d6686888b6ea17f52245a4a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-04 18:47:53 +00:00
Juraj Sloboda
3048b63de9 Support reassembly for fragments coming to ip4-local node
Change-Id: I3aa4708c1c3cdda344f282d56b617677080eaaa1
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-04 17:55:10 +00:00
Andrew Yourtchenko
6f40a8a4c5 acl-plugin: tuplemerge: avoid batch-resize of the applied entries vector - VPP-1352
If the number of rules within a given partition exceeds the limit,
the split_partition() might get called, in which we calculate
the relaxed mask, create a new partition with that mask and
attempt to reallocate some entries from the overcrowded partition.

The non-TM code was pre-expanding the vector with rules by
the number of rules in the new ACL being applied - which
caused the split_partition() to iterate over the rules
filled with zeroes. Most of the time it is benign, but
if a newly created relaxed partition is such that these
entries can be "relocated", then the code attempts to
do so, which does not end well.

Change-Id: I2dbf3ccd29ff97277b21cdb11c4424ff0915c3b7
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-04 17:53:44 +00:00
Florin Coras
a44d6b133b udp_echo: fix cut-through server mode
Change-Id: I20dd2071c936eb2c1870d45860553007c8e20587
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-04 17:51:30 +00:00
Neale Ranns
3e42ebe6ab MFIB-API: when programming an (S,G) fix the grp-len
Change-Id: I97052d29080501de53fe95499c860faf0765e81d
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-10-04 17:50:59 +00:00
Neale Ranns
2329e090fc clib_count_equal_*: don't read of the end of a small array and init data only if used (VPP-1429)
Change-Id: I8afa57ecca590698d3430746968aa0a5b0070469
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-04 15:28:42 +00:00
Marco Varlese
29d22c5206 VPP-1430: remove unnecessary padding
A copy/paste mistake caused to add padding to the buffer used to send
data.

Change-Id: I04d8dfec4ae195927be1675c5ce8b30230d5b376
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-10-04 12:36:04 +00:00
John Lo
06fda9cea9 Fix handling of mpls_tunnel_add_del API
Handles next_hop_weight, next_hop_preference and next_hop_table_id
properly in vl_api_mpls_tunnel_add_del_t_handler(). Also updated
vpp_api_test and custom_dump handling of related APIs.

Change-Id: I89e211bfa3b9d8ead396b24b3c46b7c7f6511f44
Signed-off-by: John Lo <loj@cisco.com>
2018-10-04 07:46:10 +00:00
Steven
744da656d3 vmxnet3: coverity woe
Coverity complains that hb might be null when !prev_b0 is true. It may be right, but not likely.
To make the code more explicit when it parses a complete packet, set got_packet = 1 and test
got_packet instead of prev_b0 which is somewhat obscure.

Use vlib_buffer_free_one rather than vlib_buffer_free_no_next in output.c which takes care of
chain buffers.

Change-Id: I6e0587605fdc622c3f55fedd74c474666631ed91
Signed-off-by: Steven <sluong@cisco.com>
2018-10-03 22:33:29 -07:00
Dave Barach
5958769b2c LISP ONLY: maintain the make-plugin.sh script
Make sure it's invoked in .../src/plugins

Change-Id: I85a05dbd863f3254c017962f635d505482548979
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-03 17:42:20 -04:00
Dave Barach
3f2e775e45 LISP ONLY: maintain the emacs lisp plugin generator
Add a generator for CMakeLists.txt, remove autotools input generator.

Add missing extern declarations for node registrations in <plugin-name>.h.

Remove extern from the <plugin-name>_main_t declaration in
<plugin-name>.c, so it won't come up undefined at runtime.

Reposition forward node declaration relative to CLIB_MARCH_VARIANT
conditional, to avoid multiple definition / "<plugin-name>_node
changed size from X to Y" warnings.

Change-Id: I8cc00bca5c40fa3ea00549411a3a9027f97a4826
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-03 16:10:28 -04:00
Andrew Yourtchenko
d760f79cb8 test framework: add shell-style wildcard matching to filenames
Currently, one can either use "*" to denote all filenames,
or to give the specific file name to run the tests in.
This commit adds the possibility to run all tests
matching the shell wildcard, e.g. TEST="test_acl_plugin*"
will execute all ACL plugin testcases.

Change-Id: I9048a601958947c7b757c3dfd57b19cdd8a1e3c0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-10-03 17:39:21 +00:00
Klement Sekera
611864f4bd ipsec: add missing ipv6 ah code & ipv6 tests
Change-Id: I89e90193ded1beb6cb0950c15737f9467efac1c3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-10-03 17:38:41 +00:00
Florin Coras
400ded3642 session: fix first segment manager cleanup
Change-Id: I750db7617ff9fd36647743094e0fa855e7dada86
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-03 17:38:14 +00:00
Juraj Sloboda
7a40133d33 memif: include interface name in logs
Change-Id: I67f58aa93c721dbd518cc2ddcea330006693662f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-03 17:37:48 +00:00
Dave Barach
7cd368f7be VPP-1440: clean up coverity warnings
Change-Id: Ie315d4e83c0575d82aee0369ef50e8dd2dad6a2a
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-03 17:10:44 +00:00
Paul Vinciguerra
3b4a6a1bb0 VPP-1426: CLI crash on 'set int feature'
Change-Id: Ib2221a43347c66940b6b5f71914a451ca4627d2f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-03 16:50:07 +00:00
Florin Coras
2881dec863 sock api: fix registrations and client reads
- When clients connect, instead of returing registration indicies return
handles. By convention socket registrations will have the MSB set to 1.
This makes it easy to distinguish them from shm registrations.
- Fix client reads to allow for messages larger than 4kB (needed for the
creat reply wherein the message table is provided).

Change-Id: I7bc0a072d066dffbf2e3ad9ba3ed50291231af9d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-03 16:42:38 +00:00
Ole Troan
5bdd55831e stat_client.c coverity error.
Change-Id: Ic072beb8882981425f436936f239e8c8bf229a99
Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-03 16:08:25 +00:00
Steven
3c6015b034 vmxnet3: error handling
outbound -- if we have to drop the packet due to no descriptor space is available, drop the
whole packet, not fragments.
inbound -- check and drop error packets

Change-Id: Ida1d32e61521bafd67f714d729ad53cd7c487dc6
Signed-off-by: Steven <sluong@cisco.com>
2018-10-03 14:33:30 +00:00
Jerome Tollet
e4db80344a fix format error in show logging config output
Change-Id: Idc41a219db185b524f497b096eb71892b5f9ebf8
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2018-10-03 14:06:14 +00:00
Bernhard M. Wiedemann
76e2cccf18 jvppgen: update headers
headers of generated files should correctly tell
about where it cames from to not confuse readers.

Change-Id: If667fa4aab188978156982adf3fa13474bd93e9e
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
2018-10-03 01:16:19 +02:00
Mike Bly
88076749e6 Enabled untagged vs default functionality
Removed 0-tags attribute for default-sub-if config
Moved default-sub-if check before untagged

Change-Id: I68043445aa2f79846e0743567b9015257fd87f8d
Signed-off-by: Mike Bly <mbly@ciena.com>
2018-10-02 22:14:25 +00:00
Dave Barach
819d5fdb39 VPP-1440: clean up coverity warnings
Change-Id: Ic6823fb617ecae547a5f0e28b1e037848e40f682
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-02 21:36:12 +00:00
Ole Troan
bf49590c07 Stats: vpp_prometheus_export fixes.
- Crash on /sys/nodes if per-node-counters off
- Require patterns parameters.

Change-Id: If4fddefb17504a92ba462c7af91e373601b66a5c
Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-02 21:26:28 +00:00
Ole Troan
94495f2a6a PAPI: Use UNIX domain sockets instead of shared memory
Adds support for running the API purely across Unix domain sockets.
Usage: vpp = VPP(use_socket=True)

Change-Id: Iafc1301e03dd3edc3f4d702dd6c0b98d3b50b69e
Signed-off-by: Ole Troan <ot@cisco.com>
2018-10-02 21:10:20 +00:00
Florin Coras
84db4087fa vcl: fix coverity warning
Change-Id: I08b0244ba8b0e8a463224b39e1f7b878ba8e4e6f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-02 20:58:07 +00:00
Florin Coras
c67cfd22be ip4-local: classify protos that skip csum and src check
Makes it easy to add protocols that skip L4 checks.

Change-Id: I80ff95685bfa17e29c5800d9c96153cdc7739be2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-02 19:52:01 +00:00
Jerome Tollet
2f54c27f7f vhost-user: add support for vlib_log API
Change-Id: I0af68f6b41d0024aa64b93a8b18e2d179bf939b0
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-02 16:28:57 +02:00
Michal Cmarada
5507192339 Fix JVPP enum _host_to_net_ translation (VPP-1438)
- use ordinal value of enumeration instead of accessing
  its value directly.


Change-Id: I6327a8f7668852846907a92c2713de9ff90c1c75
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2018-10-02 12:39:51 +00:00
Matus Fabian
2d3c7b9c45 BFD: add get echo source API (VPP-1367)
Change-Id: I45f540128e038ddb17ba96ce30965e8f7c732067
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-02 12:32:15 +00:00
Matus Fabian
a9a0b2ce2d IPsec: add API for SPDs dump (VPP-1363)
Change-Id: I36e6878712c394de629a9182d2af24c53a8f811d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-10-02 12:31:41 +00:00
Juraj Sloboda
b192feba00 vhost-user: Interface state updates
Fix inconsistencies between admin and link interface states
Admin down should imply link down:
  link_up = admin_up && link_ready

Change-Id: I4d668d82d035b5d2ae508727f34f1722a0c3e677
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-02 12:21:36 +00:00
Juraj Sloboda
83c46a2c5c vhost_user: Fix setting MTU using uninitialized variable
Change-Id: I0caa5fd584e3785f237d08f3d3be23e9bfee7605
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-02 12:19:54 +00:00
Juraj Sloboda
8f39d55a29 Update code to compute checksum for buffer chains
Compute ICMP checksum for buffer chains
Fix checksum function for buffer chains

Change-Id: I39b845b94a63c3ab5fc9f6f9ab36cadbc67c104f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-10-02 09:00:09 +00:00
Florin Coras
ef91534e66 tls: fix disconnects for sessions with pending data
TLS can enqueue events to itself when app session queue cannot be
entirely drained. If a pending disconnect is handled before any such
event, session layer may try to dequeue data on deallocated sessions.

Change-Id: I5bfc4d53ce95bc16b6a01e1b0e644aafa1ca311b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-02 07:09:05 +00:00
Florin Coras
5f5d50ee9b tcp: fix close wait timeout with no fin
Change-Id: Icba9b0dc6dcb4b72288f966728201812d8d12144
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-02 07:08:17 +00:00
Florin Coras
ca09d07309 tcp: accept fins if in recovery
Change-Id: I0c9c055fcc3d681c4032228a90cc81f484e200f0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-02 07:07:02 +00:00
Yichen Wang
0a4e0063f7 Fix documentation about sw_interface_set_l2_bridge
Change-Id: I53e0e7d2cf1e3c52794830b33fa93d1582b74769
Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-10-01 11:16:24 -07:00
Neale Ranns
d1e68ab77e Source VRF Select
match against a packet's source address to determine
the VRF for the subsequent destination address lookup.

Change-Id: I48ee0ef54dcb891f0ec7f879e4d3b925a0ed0081
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-01 17:08:55 +00:00
Paul Vinciguerra
346ed07526 Rename device class from PPPPOE to PPPoE
Change-Id: Ia20eee6cef360b1acd768101df0713f0005a7d14
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-10-01 17:07:24 +00:00
Radu Nicolau
8b9525c21d dpdk: updated makefile to enable QAT cryptodev
Change-Id: I2d70f2f29f3af10b6e43dde235fdf90a4596eb35
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2018-10-01 17:06:16 +00:00
Neale Ranns
14260393c0 Add adjacency counters to the stats segment
Change-Id: I6b59df939c9daf40e261d73d19f500bd90abe6ff
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-10-01 17:02:18 +00:00
Mohsin Kazmi
5df628bb8a vat: fix coverity warning for show_threads
Change-Id: I8c226b91cc45f6f345444afd8d168e1292371582
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-10-01 17:02:02 +00:00
Dave Barach
c3a06556d1 API / CLI event-log tracing
Add an "elog trace [api][cli][barrier]" debug CLI command. Removed the
barrier elog test command. Remove unused reliable multicast code.

Change-Id: Ib3ecde901b7c49fe92b313d0087cd7e776adcdce
Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-01 15:59:35 +00:00
Yalei Wang
904a850899 Fix the path error inside vcl socket_test.sh
Change-Id: I5bcfbd436839e7a6dd82dc57cdb3b7fb6200a69c
Signed-off-by: Yalei Wang <william.wangyalei@huawei.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-10-01 13:48:41 +00:00
Mohsin Kazmi
5d64c7868f thread: Add show threads api
Change-Id: I3124238ab4d43bcef5590bad33a4ff0b5d8b7d15
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-10-01 09:44:58 +00:00
Neale Ranns
28c142e3de mroute routers in the stats segment
Change-Id: I798e4fb6470ae9e763f8de1c290ff0fc3c0b7f9e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-01 09:43:22 +00:00
Neale Ranns
c17776e9fe IGMP: handle (*,G) report with no source addresses
Change-Id: I363370b9d4a27b992bad55c48fc930a2fbea2165
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-10-01 09:42:27 +00:00
Marco Varlese
9382673d93 SCTP: fix overflow issue with timestamp
Change-Id: I03bb47a2baa4375b7bf9347d95c4cc8de37fe510
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-10-01 09:41:57 +00:00
Lijian Zhang
2e2372117d Support dynamic dual/quad loop selection on aarch64
Currently, there are three variants available on aarch64, qdf24xx, thunderx2t99, and cortex-a72.
-DCLIB_N_PREFETCHES is passed to source code to select dual/quad implementation.
Besides, different compiler options are applied on these critical functions.

gcc-7.3.0 reports ICE(internal compiler error) with -mtune=thunderx2t99,
so -mtune=thunderx2t99 is enabled only when gcc version is greater than 7.3.0

Cavium ThunderX2, Impermenter 0x43, Part 0x0af
    -march=armv8-a+crc+crypto -mtune=thunderx2t99
Qualcomm Centriq 2400, Impermenter 0x51, Part 0xc00
    -march=armv8.1-a+crc+crypto -mtune=qdf24xx
Cortex-A72, Impermenter 0x41, Part 0xd08
    -march=armv8-a+crc+crypto -mtune=cortex-a72

Change-Id: Id5649c6325c1e642d0fd42535e3908793b13e02a
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
2018-10-01 09:28:41 +00:00
Dave Barach
88c6e0086b vlib: barrier sync elog tracing improvements
Change-Id: I2d3b8d5a7192ff68bee443a99346ecb807b2d833
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-30 15:55:09 -04:00
Mohsin Kazmi
762d83c198 vom: Fix the l2 port type in bridge domain
Change-Id: I8aba11142daeacce892ec529c2229ec54ee427e2
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-29 17:06:30 +00:00
Florin Coras
539663c401 vcl: handle old events before blocking in epoll
Change-Id: I3e62c787882d93c3bfb398ed0d04ef56b3a60b2b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-29 07:17:02 +00:00
Florin Coras
537b17ef95 session: lock msg queues while generating control events
Change-Id: I229ce9c306a97956c87ccb8f7a1c5c9dac94ab31
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-29 07:17:02 +00:00
Florin Coras
6648fc7e42 gitignore: build/external/downloads
Change-Id: I041764a5546352086aa9803e4bbeb9dff5f8d69a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-28 15:03:41 -07:00
Steven
c4e99c5d6f bond: tx performance enhancement part deux
- Reduce per packet cost by buffering the output packet buffer indexes in the queue and
process the queue outside the packet processing loop.
- Move unnecessary variable initialization outside of the while loop.
- There is no need to save the old interface if tracing is not enabled.

Test result for 256 bytes packet comparison. Other packet size shows similar improvement.

With the patch
--------------
BondEthernet0-output             active              52836        13526016               0          1.71e1          256.00
BondEthernet0-tx                 active              52836        13526016               0          2.68e1          256.00
TenGigabitEthernet6/0/0-output   active              52836         6762896               0          9.17e0          127.99
TenGigabitEthernet6/0/0-tx       active              52836         6762896               0          6.97e1          127.99
TenGigabitEthernet6/0/1-output   active              52836         6763120               0          9.40e0          128.00
TenGigabitEthernet6/0/1-tx       active              52836         6763120               0          7.00e1          128.00
bond-input                       active              52836        13526016               0          1.76e1          256.00

Without the patch
-----------------
BondEthernet0-output             active              60858        15579648               0          1.73e1          256.00
BondEthernet0-tx                 active              60858        15579648               0          2.94e1          256.00
TenGigabitEthernet6/0/0-output   active              60858         7789626               0          9.29e0          127.99
TenGigabitEthernet6/0/0-tx       active              60858         7789626               0          7.01e1          127.99
TenGigabitEthernet6/0/1-output   active              60858         7790022               0          9.31e0          128.00
TenGigabitEthernet6/0/1-tx       active              60858         7790022               0          7.10e1          128.00
bond-input                       active              60858        15579648               0          1.77e1          256.00

Change-Id: Ib6d73a63ceeaa2f1397ceaf4c5391c57fd865b04
Signed-off-by: Steven <sluong@cisco.com>
2018-09-28 19:39:50 +00:00
Ole Troan
9be93c8f85 MAP: Add check for well known ports.
And more unit-tests.

Change-Id: I4667d82d928b7ba8d96b5a5648d464115b3ed216
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-28 18:19:56 +02:00
Ole Troan
bf4d126b81 IP ttl check in ip4-input missing for single packet path.
Change-Id: Idc17b2f8794d37cd3242a97395ab56bd633ca575
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-28 14:27:24 +02:00
Ole Troan
f94c63ea39 stats: Split stat_segment and stats code in preparation for deprecation.
Split the stat_segment.c code from stats.c.
Rename stats.[ch] to prepare for removing (19.01?)
In addition stats.api can be removed.

Since the stats aggregation for the stat segment does not use the API, that
part is now done on the main thread. (Old stats aggregator is also left in place).

Change-Id: I9867429f4fc547b1a7ab7f88bc4f3625428d681b
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-28 12:05:25 +00:00
Damjan Marion
09cce66888 Revert "japi: Move Java API binding to cmake"
components:  Development
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find JNI (missing: JAVA_AWT_INCLUDE_PATH)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindJNI.cmake:310 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:37 (find_package)
-- Configuring incomplete, errors occurred!
See also "/scratch/vpp-tmp/build-root/build-vpp-native/japi/CMakeFiles/CMakeOutput.log".
See also "/scratch/vpp-tmp/build-root/build-vpp-native/japi/CMakeFiles/CMakeError.log".
Makefile:640: recipe for target 'japi-configure' failed
make[2]: *** [japi-configure] Error 1
make[2]: Leaving directory '/scratch/vpp-tmp/build-root'


This reverts commit a33db2528485ac39e8987bec7b138dbdad21dc5a.

Change-Id: I8a818ce70a8379656c1134432e22db418a4690fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-27 20:00:43 +00:00
Ole Troan
430420fbba MAP: Correctly print ea-bits-len in map commands.
Change-Id: I17b19875547cd6056aaf8f8fde439caa8e42d274
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-27 20:00:29 +00:00
Ole Troan
0fb2cc6513 MAP: 64-bit DMR
Change-Id: I261e11f1006039e4a4019fec2fd3271763ae476a
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-27 20:00:26 +00:00
Paul Vinciguerra
ec11b13a21 Trivial: Cleanup some typos.
This is a new commit for code under a different maintainer.

Change-Id: I79fa403fec6a312238a9a4b18b35dbcafaa05439
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-27 19:59:44 +00:00
Damjan Marion
7d426535b4 Add logging to vfio code
Change-Id: Iacdff0a5006a0617e3c9559ce7b258f26e256abb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-27 18:35:35 +00:00
Sirshak Das
c263e48bdb dpdk_plugin: fix mlx5 build and runtime issues
There are issues with VPP finding and linking the mlx5 shared glue
library which was built by default if mlx5 was enabled.

Runtime Errors this patch fixes:

net_mlx5: cannot load glue library: librte_pmd_mlx5_glue.so.18.05.0:
cannot open shared object file: No such file or directory

net_mlx5: cannot initialize PMD due to missing run-time dependency on
rdma-core libraries (libibverbs, libmlx5)

This patch introduces additional config parameter to disable glue
library building and instead statically link ibverbs and mlx5
libraries to the PMD and dpdk_plugin.

Change-Id: I0b2f67652a57854c778e991780903fb15706ace8
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
2018-09-27 18:33:07 +00:00
Jakub Grajciar
412e7b64f9 libmemif: external region bugfix
Change-Id: I7dbece80dda917ff78f53f8f4074132895aed316
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-09-27 18:32:22 +00:00
Jakub Grajciar
b1be2a0bb8 memif: Memif Test Case
Change-Id: Ic0d5fc6ccbd496afcc870b908ef799af7c804c30
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-09-27 18:31:53 +00:00
Dave Barach
10a690bee9 "show log": print wall-clock time
Change-Id: I36f42c03f778955dd543da6c878be090d0443922
Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-27 18:31:24 +00:00
Florin Coras
45ca73f6af tcp: use scaled window for new connects
Change-Id: Idf83fce8ca176e57b323e3741034e3223f1d195a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-27 09:47:26 -07:00
Ping Yu
7d7b8c6dd7 add cmake build option to build openssl async
This code is orignally in automake, but it is missing in cmake.
Thus add it to make openssl async work in cmake build system

Change-Id: Ie69ee9c2099273e51ce13ccab27bdd2619db4814
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-09-27 14:30:47 +00:00
Steven
258c2f6c63 avf: may crash if failed to allocate buffers to ring
In avf_rxq_refill, we invoke vlib_buffer_alloc_to_ring which may fill buffers from the
end of the ring and continue to the beginning of the ring. If we fill some in the end and
continue to fill some in the beginning, but does not have enough buffers to fill the
whole request, n_alloc returns a value which is not equal to n_refill to indicate partial
refill. We don't like partial refill and invoke vlib_buffer_free to get rid of
the buffers that just got refilled. However, vlib_buffer_free API is to free the buffers
from the slot continuously. It does not know how to free some from rxq->bufs[slot], and then
continue to free the rest when it reaches the end of the ring.

The fix is to use vlib_buffer_free_from_ring which is smart enough to figure that stuff
out.

Change-Id: I93c28e0b0d8d8f22c321d1a5912e00c27b4e2e8d
Signed-off-by: Steven <sluong@cisco.com>
2018-09-27 12:10:50 +00:00
Marco Varlese
baf740512a SCTP: fix advanced debug output
Change-Id: Ied63ebaec8e19189f8b1ab2a7f6d7474c3f2ad6e
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-09-27 12:09:40 +00:00
juraj.linkes
8e26f6dbcf Test typo fixes
Renamed one acl testcase class which was copy-pasted and fixed one
inheritance issue.

Renamed one bihash testcase class.

Change-Id: I70d911ee7872d8d9ddba96c7f721dd099f0152f7
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-09-27 12:08:02 +00:00
Damjan Marion
74447d4fc5 fix typo in vpp-ext-deps rpm packaging
Change-Id: Ia23a876cefbfd32d6f543a77dfec57a4aa5676ae
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-27 14:05:18 +02:00
Ole Troan
282093f1fe IPIP and IPv6 fragmentation
- Error where ICMPv6 error code doesn't reset VLIB_TX = -1
  Leading to crash for ICMP generated on tunnelled packets
- Missed setting VNET_BUFFER_F_LOCALLY_ORIGINATED, so
  IP in IPv6 packets never got fragmented.
- Add support for fragmentation of buffer chains.
- Remove support for inner fragmentation in frag code itself.

Change-Id: If9a97301b7e35ca97ffa5c0fada2b9e7e7dbfb27
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-27 08:47:40 +00:00
Mohsin Kazmi
e23edac38e vom: Add ip punt redirect
Change-Id: I5c7b925b22b53f18b0c45374883a6a4bff580c75
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-27 07:17:36 +00:00
Steven
84f36cb096 vnet: show interface rx-placement may display garbage characters
Before
------
DBGvpp# sh int rx-mode
sh int rx-mode
Thread 1 (vpp_wk_0^@):
  node vmxnet3-input:
    vmxnet3-0/b/0/0 queue 0 (polling)
Thread 2 (vpp_wk_1^@):
  node vmxnet3-input:
    vmxnet3-0/13/0/0 queue 0 (polling)
DBGvpp#

After
-----
DBGvpp# sh int rx-placement
sh int rx-placement
Thread 1 (vpp_wk_0):
  node vmxnet3-input:
    vmxnet3-0/b/0/0 queue 0 (polling)
Thread 2 (vpp_wk_1):
  node vmxnet3-input:
    vmxnet3-0/13/0/0 queue 0 (polling)
DBGvpp#

Change-Id: I5910d502757054c3942fac9d20c5104e95fc6b56
Signed-off-by: Steven <sluong@cisco.com>
2018-09-26 22:52:52 +00:00
Steven
0296efdf58 vmxnet3: delete interface causes a crash
Need to free the buffers starting from ring->consume+1, not ring->consume
Make use of the cool API vlib_buffer_free_from_ring
Fix a memory leak in vmxnet3_txq_init

Change-Id: I0a539ea75211408d84ce433d97a0a0aec5a9618d
Signed-off-by: Steven <sluong@cisco.com>
2018-09-26 22:51:50 +00:00
Andrew Yourtchenko
fae833799f acl-plugin: fix the stateful ICMP handling and add testcases
The stateful ICMP/ICMPv6 handling got broken.
Fix that and introduce testcases to catch in the future.

Change-Id: Ie602e72d6ac613d64ab0bf6693b6d75afb1a9552
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-26 22:50:29 +00:00
Neale Ranns
f5fa5ae2b0 MPLS tunnel dump: use sw_if_index not tunnel_index
Change-Id: I6c0d5aec6ee96a0d40358f0e09a0901b22265063
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-26 16:54:46 +00:00
Florin Coras
2ac7edeeaf perftool: fix c2cpel
Change-Id: I0f39477bbf88d490409fdcd5f58df55cfe2ec531
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-26 15:51:17 +00:00
Kingwel Xie
fc91a17600 forget to assign spd_index to config
Change-Id: I35dcb987edf11097f34a633ac36d87cecd12088f
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-09-26 15:50:57 +00:00
Mohsin Kazmi
a33db25284 japi: Move Java API binding to cmake
Change-Id: Ia7ddd9f9e2e2d9c133967593c3e187fe42501eac
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-26 15:50:15 +00:00
Mohsin Kazmi
7b2017ddf7 rpm: Fix the spec file to look into right directories
Change-Id: If526e9f17226d7c371a8a98b9ac932196dab547a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-26 15:50:09 +00:00
Kingwel Xie
a0060659d8 mismatch bi0 and b0 when finalizing ip reassembly.
bi0 always points to the first buffer in chain but b0 could be any fragment in a ip packet.
It causes a vnet_feature_next function call to the wrong buffer
and crashes sometime when there is >1 feature nodes under ip-unicast.
The fix is simple, makes b0 and bi0 both pointed to the first buffer

Change-Id: I7de36e68fb42b050fa63201abd98aeb6ba2e0cd3
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-09-26 15:48:38 +00:00
Damjan Marion
0275607475 dpdk: fix QSFP+ module info
Change-Id: I89c7df778e66a5d2147190dc99445405d81964e5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-26 15:48:01 +00:00
Alexander Chernavin
e178b27f6e Modify return values of L2 bridge API handlers
Change-Id: Ie6a6dde1fdc0e4fa8560682072a69876867a88d3
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2018-09-26 15:13:06 +00:00
Matus Fabian
37a3a2a08f NAT44: endpoint-dependent mode session timeout improvement (VPP-1423)
Change-Id: Ib62e503f4eb5d72431288de32f417a4553df4e0c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-09-26 12:45:40 +00:00
Damjan Marion
cefe1341c6 bond: tx perf improvements
Change-Id: I0c3f2add35ad9fc11308b7a2a2c69ffd8472dd2e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-26 08:11:53 +00:00
Mohsin Kazmi
f0b42f48b8 itf: dump interface rx-placement
Change-Id: I7dd48c8a2c77f82a2c1aa8311b062f5f0bc4e3fd
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-26 05:19:48 +00:00
Neale Ranns
6fff24aaf8 FIB: recusrive paths must lock the table to prevent its deletion
Change-Id: I958bf057be751dc7b3a0d93080021b3addc405b7
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-25 19:47:53 +00:00
Neale Ranns
b474380f82 L2 BD: introduce a BD interface on which to send UU packets
Change-Id: I21ad6b04c19c8735d057174b1f260a59f2812241
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-25 16:29:19 +00:00
Neale Ranns
6a30b5f918 MPLS tunnel dump fix
Change-Id: I9d3d5243841d5b888f079e3ea5dc1e2e8befd1dc
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-25 07:22:36 -07:00
Damjan Marion
c45e190f70 dpdk: show pluggable info in 'show hardware'
module: id SFP/SFP+/SFP28, compatibility: 40g_active_cable
            vendor: Amphenol, part NDCCGF-I202
            revision: C, serial: APF1711202351C, date code: 170318
            cable length: 2m

Change-Id: Ife35607b4f078f7b56737fe066ad4cbd247a7504
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-25 12:16:57 +00:00
Neale Ranns
fe4e48f617 BIER; bi-dir to/from underlay
set and check a special RX interface value as the packet enters and
exits a BIER domain

Change-Id: I5ff2f0e2d1b3ce0f3598b935f518fc11eb0896ee
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-25 11:59:37 +00:00
Andrew Yourtchenko
608f95cddc acl-plugin: optimize session idle timer checks
This commit adds explicit signaling from a non-owning thread to the owning thread
to restart the session timer as necessary.

Consequently, we now can sweep the session lists at their respective timeouts,
rather than sweeping all the lists at the pace of the shortest timeout value,
just taking care to wake up if the session requeue to a different list results
in needing to wake up earlier.

Change-Id: Ifc8c500f6988748f4cd3dc184dd7824321aaaaca
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-25 11:31:34 +00:00
Damjan Marion
eacde3f123 dpdk: add patch to fix 25G AOC cable detection
Change-Id: I6b54d4c7767a20b875b5bc05f23a7ac15cb9fbcc
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-25 10:01:55 +00:00
Neale Ranns
4cabcff2a4 UDP-Encap: fix coverity found error
Change-Id: Idbe5f4d7f37dbe4dbf8d2679c3d816aeaed148d8
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-25 09:35:48 +00:00
Florin Coras
e8460c742b tcp: accept rst+ack in syn-rcvd state
Change-Id: I49da8be88dd033aae1b190e8e2163069ef480442
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-25 07:42:20 +00:00
Florin Coras
ca031860c3 tcp: add option to cfg max rx fifo size
Change-Id: Icff3d688506e7658330db004c58bcfcac273fcec
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-25 07:42:08 +00:00
Lijian Zhang
2e08b1aa6a Enable verbose output during VPP cmake compiling
During VPP compiling, the command “make build-release V=1” gives verbose output on dpdk part.
This is to enable verbose output on vpp part, with CMAKE_VERBOSE_MAKEFILE:BOOL=ON passed to cmake.
It would help to get more cmake compiling information.

Change-Id: I2b01c8e234beb3189fe401801ff339f224c14470
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
2018-09-25 07:41:54 +00:00
Steven
5967bafdf5 bond: crash when deleting bond interface [VPP-1427]
After the slave interface is removed from bond, bond input node still receives traffic for
the slave interface.

We have to disable feature arc for the corresponding slave interface.

Change-Id: I44e7001e6685e290b032c48147d02911a55d547b
Signed-off-by: Steven <sluong@cisco.com>
2018-09-25 07:41:23 +00:00
Steven
8812a68062 vmxnet3: guard against array overflow
Under extreme condition, it is possible for input node to have more than 256 packets available
to process. Add a check to the while loop to prevent overrun buffer_indices and nexts.

Change-Id: Id9830e5c254f04216eb79e864a5460e08cf2e4e5
Signed-off-by: Steven <sluong@cisco.com>
2018-09-25 07:40:54 +00:00
Matus Fabian
51a0b0bc3b NAT44: fix nat44_o2i_ed_is_idle_session_cb (VPP-1424)
Change-Id: I47e1fc789ddf3dbfdf9768b99d5c3a8804d6b750
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-09-25 07:32:46 +00:00
Matus Fabian
8fdc015ddd NAT44: endpoint-dependent mode session timeout improvement (VPP-1423)
Change-Id: I630f3da1ea4e6e50a50f1352c097becef1efe3c0
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-09-24 21:38:05 +00:00
jdenisco
3138d72309 Add the sphinx docs build options
Change-Id: If7ac5b41ca4ac602a100b616b37d07f658fd6a90
Signed-off-by: jdenisco <jdenisco@cisco.com>
2018-09-24 21:37:00 +00:00
Damjan Marion
edb3a9bca8 nsim: fix multiple definitions of nsim_node
Change-Id: Iedd79eeba35fb7385c03a177f8ac7d3ddfeb6a84
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-24 20:02:48 +00:00
Florin Coras
983cc7da85 svm: march svm_fifo take 2
Change-Id: Ifa4fceef7edbe43d444790a624957db0817064de
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-24 20:01:10 +00:00
Damjan Marion
61f702bdd0 avf: rename interface name
Change-Id: I4a1dca92a69547f8b26e9aec7574332f39e43c37
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-24 20:30:38 +02:00
Neale Ranns
cf7efe01e7 ARP: don't use RPC for requests initiated from the main thread
Change-Id: If833680149eb33db6adc836c5330f350042869f4
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-24 12:39:32 +00:00
Dave Barach
9e3252b5ce Network delay simulator plugin
Change-Id: I4a70c7df8f0cb368a4e1cb16f30eeef5c6058c79
Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-24 08:08:34 +00:00
Paul Vinciguerra
bdc0e6b720 Trivial: Clean up some typos.
Change-Id: I085615fde1f966490f30ed5d32017b8b088cfd59
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-24 08:08:03 +00:00
Hongjun Ni
6a4375e02d LB: fix flush flow table issue
Change-Id: Ib0a06ab71aed42eb5bb2ab2edf4844b2167e0610
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-09-24 08:04:37 +00:00
Florin Coras
742582f415 vcl: remove vcl_event
Change-Id: I0f805ae47f6e9465070a54d85f164bc74877af01
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-22 18:58:13 +00:00
Khers
b74d99c8f3 fix following error in debian jessie:
'‘for’ loop initial declarations are only allowed in C99 or C11 mode'

Change-Id: Id842382f884122555abaa936c56cdfd305f2a5f3
Signed-off-by: Khers <s3m2e1.6star@gmail.com>
2018-09-22 17:53:06 +03:30
Steven
b7020d666d vmxnet3: Add hardware link status handling
Added an interrupt line for monitoring and notifying hardware link status
Displayed additional information for show hardware for vmxnet3 interface
Fixed possible garbage display on interface name for show vmxnet3

Change-Id: If457bfe7c216287fb3a4e2630f00434d595f387b
Signed-off-by: Steven <sluong@cisco.com>
2018-09-21 18:17:12 +00:00
Damjan Marion
561f2730e8 add: nasm and ipsec-mb into vpp-ext-deps packaging
Change-Id: Ie5d85af84ae0d8b15edf5962213ed1b1953bee2f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-21 17:51:25 +00:00
Tibor Král
d974cd4262 Fixed japi/java/Makefile.am so the JAR for NSH plugin builds as well.
Change-Id: I15b3e51d6e0206f4a387eb2ce764914167149385
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
2018-09-21 15:42:46 +00:00
Matus Fabian
ab395ec884 NAT: Refactoring / Housekeeping (VPP-1415)
Change-Id: Ia3ce24cc94f9b2fb331ad62a4181ddcd41bc78ca
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-09-21 04:07:37 -07:00
John Lo
22030434ac Add more CLI options to vpp_api_test for calling ip_add_del_route
Change-Id: I114e93b6bc71cfcdcfe6d3ddde26f77118e36ab8
Signed-off-by: John Lo <loj@cisco.com>
2018-09-21 08:18:34 +00:00
Florin Coras
c01c4451c5 tcp: accept fin-ack in syn-rcvd state
Change-Id: Ibe57abc7d2a06be80146ce28edf4c60ecda991eb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-21 08:01:18 +00:00
Steven
877ad144b6 vhost: show vhost may display garbage after the interface name
DBGvpp# show vhost-user
Virtio vhost-user interfaces
Global:
  coalesce frames 32 time 1e-3
  number of rx virtqueues in interrupt mode: 0
Interface: VirtualEthernet0/0/0�?x�D (ifindex 3)

The fix is to use format_vnet_hw_if_index_name rather than hi->name. The former
format the name with %v rather than %s

Change-Id: If4d275e1eb249cf87b2d6b796b42f24769f9e3e3
Signed-off-by: Steven <sluong@cisco.com>
2018-09-20 23:08:02 +00:00
Andrew Yourtchenko
df32bc4dee bihash template: avoid memory leak upon rehash
Call the BV (value_free) when we have performed the rehash
and thus no longer need the memory that old value for the
bucket refers to.

Change-Id: Ibb82174fc8002aeb3e1a6c8d1f90293d73bc45d8
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-20 19:13:25 +00:00
Damjan Marion
4a6cb83d33 rename vpp-dpdk-dev to vpp-ext-deps
We need to have new tenants in the development package.
This is first of series of patches which will allow us to have multiple
external libs and tools packaged for developer's convenience.

Change-Id: I884bd75fba96005bbf8cea92774682b2228e0e22
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-20 14:30:54 +02:00
Neale Ranns
9c0a3c423e UDP-Encap: name counters for the stats segment
change the ADD api so that is returns the 'ID' that can be used
by the client to read the stats from the stats segment and to
delete the object. Previously a similar value used required
to be chosen by the client, now VPP allocates one (like it
does e.g. for interfaces)

Change-Id: I563cf6092276eb990c52d5457c86e72546bcf69e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-20 10:57:25 +00:00
Neale Ranns
da8e180262 SR-MPLS: MPLS table checks (VPP-1422)
Change-Id: I397715ea8c1966f5ee61128f284d62d875c568e1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-20 10:57:07 +00:00
Florin Coras
0e88e851e0 session/svm: add want_tx_event flag to fifo
Have applications use explicit flag to request events from vpp when it
transmits from a full fifo.

Change-Id: I687c8f050a066bd5ce739d880eaec1f286038d95
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-20 10:05:48 +00:00
Neale Ranns
008dbe109c Route counters in the stats segment
route ADD API changed to return the stats segment index to use to read the counters

Change-Id: I2ef41e01eaa2f9cfaa49d9c88968897793825925
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-20 10:05:11 +00:00
Mohsin Kazmi
ee2e58f6ea vhost-user: Add disable feature support in api
Two flags to disable mergable rx buffers and indirect
descriptors are added to api.

Change-Id: Iba0ee9c48d19dfc3d3420a3fdaf44a1a1d325e99
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-20 09:12:12 +00:00
Juraj Sloboda
fe0aa76487 NAT44 virtual fragmentation reassembly for endpoint-dependent mode (VPP-1325)
Change-Id: I36ece2ef2eaef9fa559d69ec7f7f07e7c16a7a9d
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-09-20 07:15:03 +00:00
Steven
6e06d66795 vmxnet3: invoke vlib_buffer_enqueue_to_next() with the wrong buffers for chain buffers
If we invoke the subject API with 2 buffers, each with 2 chains, the content of
buffers[0] should be head of 1st buffer, and content of buffer[1] should be
head of 2nd buffer.

What the code did was to put
buffers[0] = head of 1st buffer
buffers[1] = next chain of 1st buffer
buffers[2] = head of 2nd buffer
buffers[3] = next chain of 2nd buffer

This is wrong and can cause crash.

The fix is to only increment bi when the entire packet is found which may consist
of multiple fragments.

Change-Id: If02cd5186a039d7a6c08a0959112840bdb242317
Signed-off-by: Steven <sluong@cisco.com>
2018-09-20 02:46:15 +00:00
juraj.linkes
cae64f896d VPP-1421: Reworked results gathering
The previous version sent the whole VPPTestResult object through pipe,
which uses pickle to transfer objects. Pickle does not support sending
any arbitrary objects and was causing issues. Now just a tuple of
(test_id, result) is sent.

Change-Id: I3a3a9e6f1b9ac9b05889babfc1f7560c7ac4471c
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-09-20 02:42:53 +00:00
Andrew Yourtchenko
a713254d68 bihash template: reinstate the check for the available memory in the arena
ffb14b9554afa1e58c3657e0c91dda3135008274 has changed the semantics
of alloc_arena_next to become an offset off alloc_arena, but
in the available memory check in BV (alloc_aligned) it still treats
it as a virtual address, resulting in the check always succeeding,
thus over a prolonged period bihash arena allocator
potentially overwriting whatever is following the arena.

Change-Id: I18882c5f340ca767a389e15cca2696a0a97ef015
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-19 19:21:45 +00:00
Neale Ranns
2646c80db8 GRE: fix 4o6 and 6o4 adj stacking
Change-Id: I13dc5eab8835c4f3b95906816d42dccfeee8b092
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-19 15:53:46 +00:00
Damjan Marion
a2e212919c dpdk: mask and warn if rx/tx offload is not available
Warning messsage is displayed in system log:
vpp# show log
1970/ 1/ 1 01:00:01:198 warn       dpdk       unsupported rx offloads requested on port 0: scatter

Change-Id: I40021066daf2d37ca5233e3adce55e412f0d3932
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-19 12:34:06 +00:00
Neale Ranns
7341b6d70f L2-fib-dump: send 1 or 0 rather than flag value
Change-Id: I487b3b480347f60ffe3af4029adfb22b6700cea7
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-19 12:22:35 +00:00
Florin Coras
8023ad4c41 socket api: do not delay sending of messages
Instead of relying on main epoll loop to send messages, try to send as
soon as possible.

Change-Id: I27c0b4076f3599ad6e968df4746881a6717d4299
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-19 09:45:30 +00:00
dongjuan
df865200c7 nat: free port_bitmap
Change-Id: Ied0fc50f1afb0f7fc563784544699726a6d03380
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
2018-09-19 07:32:36 +00:00
Florin Coras
568ebc76b5 session: improve close procedure
Change-Id: I6201a044e70ab6a58db8212960c57edc77c41f96
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-19 06:05:29 +00:00
Yichen Wang
5c7c49d152 Fix documentation for SHG in bridge domain
Change-Id: If094971cf011d09fa0daf3ff393f490e584c1151
Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-09-18 17:33:08 -07:00
Steven
33e6583e54 vmxnet3: add support for "non-default" next node
Support feature arc
Support set interface next node
Enqueue packet to either ip4, ip6, or ethernet_input based on packet type

Change-Id: I11fb6bba98ee0bfa1d057474fc6cf3be48ef1c48
Signed-off-by: Steven <sluong@cisco.com>
2018-09-18 22:50:21 +00:00
jdenisco
45e1cd92ca docs: Added Related Projects and Archive
Change-Id: I9a6076aa53d810ec44761d9f9459eb91f2c05974
Signed-off-by: jdenisco <jdenisco@cisco.com>
2018-09-18 21:03:06 +00:00
Klement Sekera
6c7bda9112 fix TEST_JOBS=auto max jobs detection
Change-Id: I63f747e92d239e878550392df24fb7aac2b5a3e3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-09-18 19:37:47 +00:00
Matthew Smith
c15d148f0f disable scatter/gather for ENA with DPDK 18.08
The scatter/gather rxmode flag was set for ENA when building
against DPDK >= 18.08. ENA does not support this, so disable
it. It looks like enabling it was a copy/paste error.

Also, after offloads are adjusted based on whether "no-multi-seg"
is set, those configurations are overwritten by copying
port_conf_template over the port config. That should only happen
for versions of DPDK older than 18.08 because 18.08 and newer
make changes directly on the port config instead of making changes
to the template. Make the clib_memcpy() conditional on the DPDK
version being less than 18.08. After doing so, compiler
errors complain about port_conf_template being declared but not
used, so make it's declaration conditional.

Change-Id: If81980d71c379a565b51dd700b953f8c811a8703
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-09-18 11:33:30 -05:00
Ole Troan
2f459d728b STATS: First go at documentation
Change-Id: I4d586456c46994b60ff7670d1411997a3615a284
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-18 13:27:07 +00:00
Florin Coras
3aa7af3bd7 svm: better march support for svm fifo
Change-Id: I6a4335654882a2ca66d3d465e35e350868242b8d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-18 13:26:14 +00:00
Ole Troan
b4603a70cb STATS: Optimistic concurrency handling in Python library.
Change-Id: I2135f3e77206fd171636a1e0b07c373c0bf093e4
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-18 11:06:33 +02:00
Ole Troan
45d5c87d86 STATS: Add Python 3 support to vpp_stats.py.
Change-Id: Iad0b0315fbd493b67e6ca490206ec8e8422790ea
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-18 10:32:48 +02:00
Ole Troan
58492a8372 STATS: Dynamically mapped shared memory segment
Move from using a hash to a vector with offsets into shared memory.
Limit exposure of VPP data structures and include files to
external stats library and applications.

Change-Id: Ic06129f12d10cf4c4946a86d9bc734eacff2c7da
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-17 10:07:27 +00:00
Dave Barach
40ea3f59dc Register cdp_input when enabled for the first time
Graceful handling of unknown tlv types

Change-Id: Idbc9ed524fc8b865c8e12571813cc73548bde480
Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-16 23:35:03 +00:00
Florin Coras
b023d59d4c vmxnet3: fix clang initialization error
Change-Id: I2958bd3bdec98d3e380a8ff8f970563020e28afd
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-16 14:52:57 -07:00
zhanglimao
64a80f2b79 fix nsh map index error, it will cause vpp appear Segmentation fault when vpp process double packages
Change-Id: Ib32bb351356b84aaf696c57398610b52a5a1f4dd
Signed-off-by: zhanglimao <zhanglimao0017@gmail.com>
2018-09-16 15:05:08 +00:00
Florin Coras
35e22ceafa tls: fix openssl engine write complete condition
Change-Id: Ic1526f6916970ce2b0c4fc0d148d4396fa629b5f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-15 08:11:40 +00:00
Florin Coras
4829babd79 session: ensure detach is done with worker barrier
Change-Id: I98a79f2c3b0268c414dd295c7ebfc561ce049d4b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-15 08:10:57 +00:00
Florin Coras
b5e94e3c85 tls: use application interface apis
This also exposes app to tls sessions. As a result "sh session verbose"
will show for each tls session both the application's session (app to
tls) and the tls session (tls to tcp).

Change-Id: I1e65c63362ce58f314e762d7db78b44479e1e3a5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-15 08:10:27 +00:00
Steven Luong
df7f8e8cff vmxnet3 device driver
Implemented vmxnet3 deivice driver for VMWare ESXi. Tested with Ubuntu 18.04
connected to ESXi 6.0

Ubuntu-18.04 (VPP) --- ESXi-6.0

Change-Id: I85fbc86f2d8532b017bc4271612d17e24e498e4d
Signed-off-by: Steven Luong  <sluong@cisco.com>
2018-09-14 14:27:41 -07:00
Neale Ranns
ef90ed08fb BIER API and load-balancing fixes
Change-Id: Ibda19d786070c942c75016ab568c8361de2f24af
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-14 18:21:43 +00:00
Dave Barach
ccf444d502 Remove scaffolding
Change-Id: I4acebbf76556428bb45356c8e5b85c72a85a1656
Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-14 15:32:06 +00:00
Damjan Marion
eeadc14ee2 cpack: add deb/rpm packaging to VPP module
This allows easy packaging of external projects, including
VOM and sample plugin.

i.e.

$ make -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install

$ ninja -C build-root/build-vpp-native/sample-plugin package

ninja: Entering directory `build-root/build-vpp-native/sample-plugin'
[0/1] Run CPack packaging tool...
CPack: Create package using DEB
CPack: Install projects
CPack: - Install project: sample-plugin
CPack: -   Install component: vpp-plugin-sample
CPack: -   Install component: vpp-plugin-sample-dev
CPack: Create package
CPack: - package: build-root/build-vpp-native/sample-plugin/vpp-plugin-sample_18.10~rc0~413~g1433e9d1-1_amd64.deb generated.
CPack: - package: build-root/build-vpp-native/sample-plugin/vpp-plugin-sample-dev_18.10~rc0~413~g1433e9d1-1_amd64.deb generated.

Change-Id: I6b3ec2433961e53edd976b19659ce214d272c40a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-14 14:00:51 +00:00
Damjan Marion
77bc1a5fb1 dpdk: add detection of mellanox PMDs
Change-Id: I523fc489f5e73ba726ab0711eab3fdde53dc35e8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-14 13:49:31 +00:00
Damjan Marion
633b6fd68b vlib: introduce user flags in vlib_frame_t
Those flags have local significance and they can be used for
sending hints to the next node.

Change-Id: Ic2596ee81c64cd16f96344365370e8fcdc465354
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-14 14:51:22 +02:00
Andrew Yourtchenko
93008c26e9 acl-plugin: do not do clib_smp_atomic_add on per-worker counters
Just do a regular increment, since we are not contending for these counters.
This also makes the tests pass on ARM ThunderX (VPP-1395).

Change-Id: I333aaa11d4145d13d322868900bc114df85a020d
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-14 09:25:28 +00:00
John Lo
1fc44b6fec Revert "L2-input: use vlib_buffer_enqueue_to_next"
The patch did not improve single input link performance and 
degrade performance with multiple input links.

This reverts commit b1232555e91b286feab5667b5a22f29aa8e96626.

Change-Id: Ib9336a2e0610088b9145a43cacbdadb52dabd522
Signed-off-by: John Lo <loj@cisco.com>
2018-09-14 08:38:43 +00:00
John Lo
e166fd90d6 Ehnance and fix vpp_api_test and custom_dump to support SR-MPLS
Change-Id: I2e06de176f4272b4b7475857b42fe0d106382b6f
Signed-off-by: John Lo <loj@cisco.com>
2018-09-14 08:33:13 +00:00
Florin Coras
86f04500ae vcl: keep track of unexpected events
If sessions are marked as blocking, events for other sessions received
while waiting for the blocking sessions, are added to a pending list and
processed later.

Change-Id: Ia6c71006b1c2bcb78af708390da0cd436af397cc
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-14 07:59:41 +00:00
Damjan Marion
958192dc2a cmake: use VPP package in VOM
Change-Id: I83b244be920521e580085beffb7e40613e67c8ee
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-14 07:21:51 +00:00
John Lo
d23d39cc01 Fix memory leak in API/CLI to create/modify SR policies
The segment list vector built by the API/CLI is not freed after
SR policy creation or modification.

Change-Id: If439005481cada6c6af7cb560fe7a4381dd49384
Signed-off-by: John Lo <loj@cisco.com>
2018-09-14 05:03:42 +00:00
Ping Yu
12a30202ec Add a polling configure to make thread bind with hardware engine
Change-Id: Ib4130098dd9bf45370bdee9a04e4804074df58b1
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-09-13 18:21:56 +00:00
Neale Ranns
c25eb4547a L2-FWD: use vlib_buffer_enqueue_to_next and cache prefetch fix
before:
  l2-fwd ...  1.72e1  256.00
after:
  l2-fwd ...  1.49e1  256.00

Change-Id: I24b29b799435776abc6e60df0dd0301b74aac99b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-13 15:35:16 +00:00
Damjan Marion
008eef3073 vppinfra: optmize clib_count_equal functions
Change-Id: Ia4c79d560bfa1118d4683a89a1209a08c5f546b3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-13 14:35:40 +02:00
Matus Fabian
bb4e022502 NAT: TCP MSS clamping
NAT plugin changes the MSS value in TCP SYN packets to avoid fragmentation.
If the negotiated MSS value is greater than the configured value it is changed
to the configured value. If the negotiated MSS value is smaller than the
configured value it remains unchanged.

Change-Id: Ic3c4f94a2f1b76e2bf79f50f3ad36a4097f3f188
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-09-13 02:36:25 -07:00
Paul Vinciguerra
c2b4dbe48a Trivial: Fix lisp flag label
Change-Id: Ic5339169124edc8ea1f82ffcba7cde8b7f224e83
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-12 18:02:21 -07:00
Neale Ranns
0bdd319b3b IP-neighbor: add and delete internal API
Change-Id: I4d1ab5ff0c8f0756e91bf63e045f88513bb7d039
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-13 00:32:57 +00:00
Paul Vinciguerra
9ce6a21aaa Fix: vppapigen make build fails on fresh install
Steps to reproduce:
  vagrant@localhost:/vagrant$ build-root/vagrant/build.sh
  ...
  @@@@ Building vpp in /vagrant/build-root/build-vpp-native/vpp @@@@
  [51/1169] Generating API header /vagrant/build-root/build-vpp-native/vpp/vlibmemory/memclnt.api.json
  FAILED: cd /vagrant/build-root/build-vpp-native/vpp/vlibmemory && mkdir -p /vagrant/build-root/build-vpp-native/vpp/vlibmemory && /vagrant/src/tools/vppapigen/vppapigen --includedir /vagrant/src --input /vagrant/src/vlibmemory/memclnt.api JSON --output /vagrant/build-root/build-vpp-native/vpp/vlibmemory/memclnt.api.json
  AttributeError: 'module' object has no attribute 'dumps'

  This seems to be due to JSON.py namespace colliding with the standard lib json.py

Change-Id: If389e4e05ef0c166b0c2b3bef7ec0185298679a8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-13 00:32:35 +00:00
Neale Ranns
b1232555e9 L2-input: use vlib_buffer_enqueue_to_next
use the same trick as l2-ouput to group the processing of packets
on the same interface.

Change-Id: Ib2a6a1b5f362372936197f5bb2fdd0fe9439226b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-13 00:25:20 +00:00
Dave Barach
48a30d3038 fix bihash test code
Change-Id: Ie71b99385c33122cbf55f80ebabdc2ccdb4cf2ae
Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-12 17:41:45 +00:00
Damjan Marion
0fa900e482 cmake: create cmake VPP module, update sample-plugin so it uses it
Change-Id: I32e91ba8e55797ffe169f98b09bdb42caa5c7de2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12 17:04:36 +00:00
Damjan Marion
79dcbc74cd Always use 'lib' instead of 'lib64'
It is packaging responsibility to put libs in the right place.
Use of lib64 resulted in huge amount of files with hardcoded lib64.
This patch simplifies things...

Change-Id: Iab0dea0583e480907732c5d2379eb951a00fa9e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12 16:38:59 +00:00
Pierre Pfister
350155329c Fix LB memory leak and remove useless code
Vector sort_arr was actually never freed.

This change also removes some nearby code which
happens to be totally useless.

Change-Id: I2f265c1b4770cbcd75a2fb69ea54e46e1b54245a
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2018-09-12 14:14:52 +00:00
Damjan Marion
e849da2449 fix missing extern in vnet/ethernet/node.c
Change-Id: Idabdd1112ba7e390a7b14a83cc7fbd198c8754df
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12 14:12:55 +00:00
Neale Ranns
f0fa31717b L2-Learn: use vlib_buffer_enqueue_to_next
before:
  l2-learn ... 2.00e1 256.00
after:
  l2-learn ... 1.77e1 256.00

Change-Id: I22fe9ab4ec995ee22c547cfe16bf88c04838520c
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-12 13:57:09 +00:00
Yichen Wang
28812a0d93 vhost: Fix VPP crash when reloading VM with mixed-type ports [VPP-1406]
When VM is having mixed type of vhost-user and SRIOV ports, QEMU (RedHat
v2.10) will not send disconnect signal to VPP, and just gives the new
memory region directly. VPP is not able to handle new memory region
mapping without disconnect signal first, which will result in a SEGV.
The fix will handle the VM reboot scenario without explict disconnect
signal from QEMU.

The fix is to invalidate the avail, desc, and used pointers in the txvq
when the new memory regions are received. This is because these pointers
are not valid anymore with the new memory regions. In the input node, check
to make sure the avail pointer is valid and punt if not.

Change-Id: Ieb8b427b202f4442a58907dab1661d63a03650de
Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-09-12 13:17:32 +00:00
Neale Ranns
79a05f5471 VXLAN-GBP: use common types on the API
Change-Id: I11ec0d7048d36c30a97d437e5b0abd05f06ab0eb
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-12 10:11:18 +00:00
Khers
0b48cdead5 device flags will set in dpdk_update_link_state.
Change-Id: If74acb0168bed2201d2a8b47bf3f860540d1574b
Signed-off-by: Khers <s3m2e1.6star@gmail.com>
2018-09-12 10:10:57 +00:00
Matthew Smith
768c290093 Add patch for ixgbe x550 SFP+ to DPDK 18.08
Patch for ixgbe which has been used with DPDK 18.02, 18.05.
If the link flaps before link status has been successfully
collected, the MAC will be reset and the PMD will not wait
long enough for it to come back up before giving up, which
will continue happening every time an attempt is made to
check the link status.

This patch was submitted to upstream DPDK in July 2018 but
it has not been included in a release yet.

Change-Id: Ib2100b33d2a986f3cf74e42fc5538412f76f42c7
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-09-12 10:10:43 +00:00
Sirshak Das
759226e668 Add and enable u32x4_extend_to_u64x2_high for aarch64 NEON intrinsics.
This is the high version of extendto. This function accomplishes the
same task as both shuffling and extending done by SSE intrinsics.
This enables the NEON version for buffer indexes to buffer pointer
translation.

Change-Id: I52d7bbf3d76ba69c9acb0e518ff4bc6abf3bbbd4
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Yi He <yi.he@arm.com>
Verified-by: Lijian Zhang <lijian.zhang@arm.com>
2018-09-12 10:09:50 +00:00
Ed Warnicke
dbecf18b8a Fix create memif socket
create interface memif [id <id>] [socket-id <socket-id>] ...

Can optionally take a socket-id.

You create a socket-id with:

create memif socket [id <id>] [filename <path>]

Unfortunately, this doesn't work because "create memif" was
deprecated.  It results in:

vpp# create memif socket id 0 filename /run/vpp/test.socket
command deprecated. Please use 'create interface memif' instead.

This fixes it by clipping out the

create memif

command entirely.

Change-Id: If503758706bf758b6cb46e958200527a5856c600
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2018-09-12 10:08:29 +00:00
Florin Coras
2cba8533cc vcl: add apis that expos fifo as buffer
Change-Id: I4bd9c9f73499711e04b38d53daa5c917a4285bf5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-12 09:13:16 +00:00
Florin Coras
41c9e04be0 vcl: improve read and fifo event handling
Change-Id: Ic1c51818b8aa8dbd164e70bb3b7471868e5af6f6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-12 09:13:16 +00:00
Dave Barach
ffb14b9554 bihash 32/64 bit shared memory interop
This patch makes 32/64 bit interoperable shared memory bihash tables
work regardless of where they're mapped.

Change-Id: If5b4a37ccdaa75410eba755c7d7195633de1b30b
Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-11 17:21:10 -04:00
Neale Ranns
9b2f51abb5 indent off in ip_lookup_set_buffer_fib_index
when the name of the structure crosses a line boundary it's painful to parse...

Change-Id: I5d0606900802fb8d64a065f31f3e2a53bd8a5f40
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-11 17:25:00 +00:00
Neale Ranns
eb1525f106 L2-learn; cache prefetch fix
the header is written (STORE) the data is only read (LOAD)

Change-Id: Ia3ac0c81224a0db736c329ed3e2e55b7417f08a0
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-11 17:24:07 +00:00
Neale Ranns
c0a9314341 GBP Endpoint Updates
- common types on the API
- endpoints keyed in various ways for DP lookup
- conparison functions for VPP IP address types

Change-Id: If7ec0bbc5cea71fd0983fe78987d147ec1bd7ec8
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-09-11 16:00:29 +00:00
Mohsin Kazmi
0d8cbc1b15 vat: remove the endiness for u8
Change-Id: I9636a4e631cacf22d3189e292888c34f615298b0
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-11 14:40:46 +00:00
Ole Troan
958cff701d VAT: plugin load errors
- NSH plugin overrode vat_api_hookup()
- Missing format function in mactime.

Change-Id: I2dcbc2522d8f525d223c2ee3bb667111d1b3b78e
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-11 12:12:51 +00:00
Matthew Smith
0be66e160f remove libvlib from libvlibmemoryclient libs
On CentOS 7, having libvlibmemoryclient link libvlib causes
a SEGV when a program or library is run which links against
libvlibmemoryclient and dlopen() is called. This is because
dlopen() executes any functions with __attribute((constructor))
set. The VLIB_CLI_COMMAND macro creates CLI registration
functions that have this attribute set. So CLI registration
functions end up being run by applications which are clients
of the VPP API.

This doesn't occur on ubuntu 16.04, because ld seems to
omit shared libraries that were listed on the command line
if they are not used to resolve any symbols.

Removing the link to libvlib on vlibmemoryclient to fix this
problem results in another problem. Tests of libvcl_preload
fail when running 'make test'. This happens because
libvcl_preload calls dlopen but does not link against libdl.
When libvlibmemoryclient had libvlib linked, these errors
did not occur since libvlib links libdl. Adjusted the build
of libvcl_preload to explicitly link libdl.

Change-Id: I271ba2f9226ce1602e1f6c1525f3b093bb0345ed
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-09-11 08:42:47 +00:00
dongjuan
58f50f1bb6 nat: fix busy ports of each thread
which can create dead loop in
nat_alloc_addr_and_port_default function

Change-Id: I468c25ce0f0a0b3f881de564623dea208b2ca700
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
2018-09-11 08:42:08 +00:00
Sirshak Das
6da42decd4 Replacing vtbl NEON intrinsic with rev NEON intrinsic for byte_swap.
Using rev16 vector intrinsic to reverse byteorder in each word
independently.

Change-Id: I071c40780baffe0bda614ec5d9dd92858f574b0d
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Brian Brooks <brian.brooks@arm.com>
Reviewed-by: Yi He <yi.he@arm.com>
Verified-by: Lijian Zhang <lijian.zhang@arm.com>
2018-09-11 08:40:46 +00:00
Sirshak Das
8e5d5db24e Add u32x4_extend_to_u64x2 for aarch64 using NEON intrinsics
This is used in vlib_get_buffers_with_offset.

Change-Id: If4ff776bc97d21a22e870300b164eeb6a5ec3638
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Brian Brooks <brian.brooks@arm.com>
Reviewed-by: Yi He <yi.he@arm.com>
Verified-by: Lijian Zhang <lijian.zhang@arm.com>
2018-09-11 08:39:49 +00:00
Sirshak Das
61f325d195 Add horizontal add (hadd) vector intrinsic via NEON.
Having the NEON equivalent of u32x4_hadd for CLIB_HAVE_VEC128

Change-Id: I210f96f7ecb9b80b4753311a68e5e09ccda7e95b
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Brian Brooks <brian.brooks@arm.com>
Reviewed-by: Yi He <yi.he@arm.com>
Verified-by: Lijian Zhang <lijian.zhang@arm.com>
2018-09-11 08:38:52 +00:00
Klement Sekera
34a962b728 vapi: support VLAs in typedefs
Change-Id: I3af3916b68189c2174020e5ecc29a7bc45b25efa
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-09-11 05:58:06 +00:00
Damjan Marion
19b4a4854e dpdk: clean interface link information on admin down / stop
Change-Id: Ie68814c8afc6cd67eb75da0b95dffa7b404cb7ba
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-10 21:45:42 +00:00
Andrew Yourtchenko
1606d3aa23 dpdk-plugin: do not request SCTP offload, some cards do not support it while supporting TCP/UDP
The DPDK plugin sets all of the offload flags, which may cause an initialization failure
on the NICs that do not support SCTP offload. The VPP code does not deal with the SCTP
offload at the moment at all, so after discussing with Damjan, we agreed
the best approach to fix the issue is to not request the SCTP offload.

The output of "show hardware" for the NIC in question before this patch:

            Name                Idx   Link  Hardware
GigabitEthernet1/0/0               1    down  GigabitEthernet1/0/0
  Ethernet address 00:e0:67:09:90:4b
  Intel 82540EM (e1000)
    carrier down
    flags: pmd pmd-init-fail maybe-multiseg tx-offload intel-phdr-cksum
    rx queues 1, rx desc 1024, tx queues 1, tx desc 1024
    cpu socket 0
  Errors:
    rte_eth_dev_configure[port:0, errno:-22]: Unknown error -22

And the excerpt from "show log":

1970/ 1/ 1 00:00:00:739 notice     dpdk       Ethdev port_id=0 requested Tx offloads 0x1c doesn't match Tx offloads capabilities 0xf in rte_eth_dev_configure()

Change-Id: I159d65c02fc3f044441972205f1f0ac08e52050c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-10 18:50:08 +00:00
Neale Ranns
255299c265 cmake VOM: j factor chosen based on number of cores
Change-Id: If1c27359cd93f6de6da9a93c3573997a51201959
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-10 15:42:17 +00:00
Damjan Marion
5beecec076 new multiversioning on ethernet input nodes
Change-Id: I1aa196756b3ff4969b8ff2f117778d2cd87d6dd5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-10 14:10:23 +00:00
Mohsin Kazmi
61b94c6bc4 vxlan-gbp: Add support for vxlan gbp
This patch implements vxlan with extension of group based
policy support.

Change-Id: I70405bf7332c02867286da8958d9652837edd3c2
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-10 12:38:30 +00:00
Damjan Marion
b414d0d23a cmake: put vpp_api_test back to packaging
Change-Id: I1ccd9bd2861d5d8e57b1bd7f9e2439147f603a58
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-10 10:32:00 +00:00
Florin Coras
2179513b71 session: lock app worker mq for io events
Also fixes vcl client/server stats and closing procedure.

Change-Id: I7d5a274ea0a3c8ea13062bf61bf402248dfe1a19
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-10 03:15:16 +00:00
Steven
97f592f474 vlib: crash in linux_epoll_input_inline for accessing free file index [VPP-1412]
Under rare scenario, epoll may still post an event to VPP although the file
descriptor is already deleted via epoll_ctl (EPOLL_CTL_DEL) and the file
descriptor is close. VPP tries to access the free file index entry and crash.

The fix is to throw away the events which the file descriptor is already deleted.

Change-Id: Ieca3a1873aecb28630c3abc42c40341f27c2faa7
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit aec7297ba012e1fe4bbf85cdaec8e810aa476cea)
2018-09-09 20:26:40 +00:00
Mohsin Kazmi
d4d7e8ad84 cmake: Move VOM to cmake
Change-Id: I352dbb8e972e59a4caae4acd507153446470ce6b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-09-09 20:24:47 +00:00
Neale Ranns
3b81a1e5f2 L2 BVI/FIB: Update L2 FIB table when BVI's MAC changes
also some moving of l2 headers to reduce dependencies

Change-Id: I7a700a411a91451ef13fd65f9c90de2432b793bb
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-08 14:51:48 +00:00
Florin Coras
3348a4cf07 vcl: set worker pthread stop key
Otherwise the key destructor is not called on pthread_exit.

Change-Id: I11e6b9683a926eecd3f40a44aab41924ff9c3101
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-08 12:12:13 +00:00
Florin Coras
de9f08b030 vcl: register workers in order
Change-Id: Ibc74e7f7587f8b17fc0dcec20cc4530b9dd4c3ca
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-08 12:12:13 +00:00
Florin Coras
da3eec1672 session: detect namespace for transport apps
Change-Id: I770607cb213d538a29d7bd5762682981b01e9d18
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-08 12:12:13 +00:00
Florin Coras
74cac8839e session: fix reentrant listens
Change-Id: I72d400401a308012b43513179870823f6f921e44
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-07 21:30:44 +00:00
Matthew Smith
d790c7e1fa update regex used by rpm build to find lib files
The old expression was '*.so.*.*.*' to find shared library
files with 3 components in the version.

Building from master gives you files with 2 components in
the version (e.g. libvnet.so.18.10). So most libs were not
getting included in vpp-lib.

Change-Id: Ib89d2f5aeb2417eed1b6b851089b9d22f540a226
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-09-07 19:39:54 +00:00
Dave Barach
36feebb42f Improve NTP / kernel time change event handling
clib_time_verify_frequency(...) rejects clock frequency changes
greater than 1%.

vlib_worker_thread_barrier_sync_int (...) continuously checks that the
barrier hold-down timer is not unreasonably far in the future.

Change-Id: I00ecb4c20e44de5d6a9c1499fa933e3dd834d11a
Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-09-07 19:38:50 +00:00
Damjan Marion
833de8cab6 cmake: set packaging component for different files
Change-Id: I033a1f5cdb24f77462cb5ec90a62226d93f52925
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-07 19:37:44 +00:00
Marco Varlese
0745036cb9 Cavium OcteonTX: cache line fix
According to Nitin Saxena ThunderX2 machine has 64B cache line whilst
all others are 128B. According to Damjan, Nitin's previous patch broke
compilation for all non-Cavium machines. This patch should make
everything happy again.

Change-Id: I8c5c2661f9f2f9c3e9b0965a277712f9a1eefa5f
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-09-07 19:36:48 +00:00
Ole Troan
4e588aa7ca VPP-API: Cancel timeout thread without sending READ_TIMEOUT message.
This caused a spurious message to be sent on the API ring causing debug messages.

Change-Id: Ief4ca655ae048aad386a88fed11e8c1114378dc7
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-07 15:00:13 +00:00
Neale Ranns
b54d081873 L2-FIB: replace bit-fields with flags
Change-Id: Ic31da442a0e0477569d53b4a72627bbb25e93365
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-07 13:35:58 +00:00
Neale Ranns
3b93be5d76 IP route update fix when multipath and drop set
Change-Id: I9cec7486cb6e3c5261d74d2b15a4d19469285a30
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-07 11:16:14 +00:00
Ole Troan
c84cbad785 PAPI: Unpack embedded types with variable length arrays.
Change-Id: Ic952ed5b837ac8409fd95e2b5cb92eb028ba0c40
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-07 11:08:06 +00:00
Damjan Marion
a85e0de8ae post move-to-cmake cleanup
Change-Id: I87b8f054bbb54895429578dfe565e72331beb5b2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-07 09:52:39 +00:00
Damjan Marion
4c842f8d75 Remove qsort.c from vppinfra
Change-Id: Ifcc2717efd242ae2016563d6f3e5cd57fe161e00
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-07 09:49:12 +00:00
Florin Coras
6d4bb42540 vcl: refactor test client to support workers
Change-Id: I7fcfddc2bc7d9a64f8aa0d57ba5d11d325a15ce1
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-07 09:36:00 +00:00
Hongjun Ni
49ca260111 Add flush flag on del as command
This patch depends on https://gerrit.fd.io/r/#/c/13260

Change-Id: If94968342935ebd24cf4ebed238e6a27d94959b7
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-09-07 07:33:31 +00:00
Zhiyong Yang
e4b202a414 geneve: fix variable initial value
It is not good enough to initialize sw_if_index0 = 0,
sw_if_index1 = 0, as it maybe causes the first two
incoming packets to miss necessary computation.

Change-Id: Ifcab408d9514820e0daa280f4c73956db13b59be
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2018-09-07 07:31:28 +00:00
Scott Keeler
d9668e7153 docs: what is vpp and features and performance
Change-Id: I5a9ae39ed0429b3de001b5109268d577a281cd46
Signed-off-by: Scott Keeler <skeeler@cisco.com>
2018-09-07 07:29:27 +00:00
Jakub Grajciar
568cc4674e libmemif: slave connecting bugfix
in case first connecting slave fails continue connecting others
add disconnect string to memif details

Change-Id: I9d83db4724de1cab60786dca566e004016cf1e59
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-09-07 07:28:17 +00:00
Nitin Saxena
66bff59f7c cmake: Fix compilation for OCTEONTx
Change-Id: I7b7183b4603076e5afac096545d820091ee7c495
Signed-off-by: Nitin Saxena <nitin.saxena@cavium.com>
2018-09-07 07:26:15 +00:00
Chris Luke
c5cb6380e1 Silence warning over ignored return value (CID 187932)
- We deliberately ignore the return value.

Change-Id: If467911b019e7336cf9dc6d4c95c2cd53a5af33f
Signed-off-by: Chris Luke <chrisy@flirble.org>
2018-09-07 06:56:15 +00:00
Zhiyong Yang
70fda4c443 vxlan: improve encap performance
1. For vxlan, prefetching one cacheline is enough.
2. Reduce vlib_increment_combined_counter functtion calling
if possible.

Change-Id: If3a72ac40c8988caaf0d5915b695f86d799f15a9
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2018-09-06 22:08:45 +00:00
Neale Ranns
ecdfb2cbee eth_mac_equal takes const pointers
Change-Id: I5a47d30d783dcf000e3ca2bcdc46e7d93654cc37
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-06 17:10:39 +00:00
Zhiyong Yang
6011b5e63b vxlan_gpe: optimize encap performance
The patch can reduce 13 cycles per packet for the graph node
vxlan-gpe-encap and increases 5% or so vxlan_gpe encap throughput
on Haswell platform for the best case (All pkts have the same
sw_if_index).

Change-Id: I9c70fd3e0f2f0a9d922cf64970d0b0d51b772024
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2018-09-06 15:50:44 +00:00
Dave Barach
ecbe6f5eb9 DOC ONLY: cmake / ninja build system doc
Change-Id: I69cdcf3f0940f8a5f60203034688a0c63446f65c
Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-06 14:40:51 +00:00
Chris Luke
a9cf6afa3e Fix Telnet option processing issue
- A check for the length of the buffer should have used the provided
  'len' variable, not 'vec_len' since the buffer pointer may be
  within a vector, but not the start of one. 'vec_len' reports 0
  in that case, causing premature exit from the options processing
  loop and a wait for further input before it checks the next option.
- Also add TCP_NODELAY to CLI sockets to disable Nagle on TCP
  connections for a possible improvement in interactive response.

Change-Id: Ie1f53c003ca7d66bed51f437d298183215bad38c
Signed-off-by: Chris Luke <chrisy@flirble.org>
2018-09-06 14:40:15 +00:00
Andrew Yourtchenko
483a54b8d0 acl-plugin: VPP-1400: fix crash when removing a session entry
bihash deletion operation may in turn do underlying memory operations,
so ensure it is using the correct (private) heap.

Change-Id: Ibef7ad7f9db6fa83da02316bf7509072ce579bc0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit f74b4d2b559b1d5697fd625d9c8e0f76ba5a4463)
2018-09-06 11:19:33 +00:00
Florin Coras
145987776f vcl/session/svm: fix coverity warnings
Change-Id: I27532b3ab244dc95955e836a42b229a6e4e32818
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-06 08:37:20 +00:00
Florin Coras
ab2f6dbf9f session: support multiple worker binds
Allows app workers to listen on the same session endpoint. Incoming
connects are spread across the workers in a round-robin fashion

Change-Id: Ib5f5817230d9abc6127a85cdbdcad70d980c0f7f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-06 08:35:51 +00:00
Neale Ranns
ed234e7f15 Enum type on the API for QoS sources
Change-Id: I877541ede6e26581c659821502f23b777903b82f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-06 08:14:02 +00:00
Matus Fabian
a7f8b228ff NAT: fix maximum out of order fragments (VPP-1399)
All fragments should be dropped when max_frag is 1 and 2 non-initial fragments are received before first fragment.

Change-Id: Id0c968f45629698e347e8226c5926f27b48b82d6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-09-06 07:32:30 +00:00
Matus Fabian
05ca4a3643 NAT: test cleanup (VPP-1252)
"assertEqual(len(capture), <expected packet count>)" no more needed since it is done by get_capture

Change-Id: I1cbe223cf55198cec946b8ea0883f2a4fa632005
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-09-06 00:13:40 +00:00
juraj.linkes
721872e051 Fix test summary and retries
There was an issue when tests crashed and weren't properly retried.

Change-Id: Id5ef828ecc9a8dc0f08c50183721db06e162e6c3
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-09-06 00:13:21 +00:00
Ole Troan
573c7af171 STATS: Update Prometheus port
Update temporary port allocation with fixed allocated from:
https://github.com/prometheus/prometheus/wiki/Default-port-allocations

Change-Id: I99a7e069fb95d00884458aeacaba06e4713fbb76
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-05 23:43:21 +00:00
Neale Ranns
3f812aaf63 Add missing API MAC address encode implementation
Change-Id: I4cb073f23a7f24f0fc16f2eda8b869dbe657f71b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-09-05 08:56:29 -04:00
Andrew Yourtchenko
3328e90114 acl-plugin: VPP-1400: VPP may crash when performing ACL modifications on applied ACLs
The partition_split() did not increment the refcount when using a mask type index,
thus subsequent modifications potentially resulted in double frees and in the best case
immediate crash, in the worst case delayed crash in another place.

Introduce the lock_mask_type_index() and call it, move the mask type index
related functions closer to the top of the file.

Make the assignment of the new mask type indices
for the tuplemerge case to use the assign_mask_type_index().

Keep some debugs in case we need to investigate this further at some point.

Change-Id: Iae370f5cd92e1fe1442480db34656a8a3442dbc0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 1edc406da3d4f6e63de2f278360b5753f55c00df)
2018-09-05 10:36:46 +00:00
Matus Fabian
5d28c7afbc NAT: add support for configurable port range (VPP-1346)
Change-Id: I6882b6daa05db866fe6e78a62b380ec331507f74
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-09-04 17:50:51 +00:00
Hongjun Ni
b17cd37bb9 Add Load Balancer plugin Maintainers
Change-Id: Ic6da1584ad8e03f2142fe10a8348fb0278c5060b
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-09-04 17:29:40 +00:00
Jakub Grajciar
3e483029f3 avf: fix random rss key
Change-Id: I622cdb969ea489d333888b90c15ab57c1820e2db
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-09-04 17:29:13 +00:00
Eyal Bari
ceb8d5afcb l2_output:skip processing if no features are enabled
Change-Id: I7fcc082376b451c6179ec2ef58f98c931adfed27
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-09-04 17:28:49 +00:00
Hongjun Ni
3b9bf6f1b4 Add JVPP for NSH plugin
Change-Id: Ie904cbaf571165021e49c6c1052cee3205cde3ae
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-09-04 14:39:16 +00:00
Florin Coras
293aa059a0 vcl: refactor test apps to use multiple workers
Change-Id: Ia931377004c2996826a5f504d16c3c934ca3b70d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-04 14:17:50 +00:00
Naoyuki Mori
004869d0d4 Fixed showing negative count in stats show CLI
Some counters (bytes, pkts) are formatted as signed instead of unsigned
in "show hardware-interfaces" and "show lb".
These stats counters are declared as u64.

Change-Id: Id1b588188bff4e36402beb8d07f779e9a5193956
Signed-off-by: Naoyuki Mori <naoyuki.mori@intel.com>
2018-09-04 19:17:41 +09:00
Ping Yu
7eedb5fb44 add option to allow user to set ciphers
Orignal code hard code TLS ciphers, and this patch allows user to
set ciphers via CLI, so that user can perform the TLS testing
without re-building the code.

Change-Id: I0d497f6d906af25bc7a33cee5747f9a1d63e0683
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-09-04 02:25:34 +00:00
Damjan Marion
8e71529ea8 Deprecate old buffer replication scheme
Change-Id: I1f54b994425c58776e1445c8d9fe142e7a644d3d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-03 18:41:13 +00:00
Andrew Yourtchenko
d5c70d5562 acl-plugin: fix the memory leak with colliding entries storage
Change-Id: I634971f6376a7ea49de718ade9139e67eeed48e5
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit d039281e11cfc4580fe140e72390c1c48688c722)
2018-09-03 17:31:39 +00:00
Damjan Marion
4dffd1c998 Compile vppinfra on macOS
Add missing calls to clib_mem_init to vppinfra test codes.

Change-Id: I53ffc6fc287d1a378065bb86c18b6e995ecdb775
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-03 16:51:40 +00:00
Matus Fabian
ea5b5be4ee NAT44: client-IP based session affinity for load-balancing (VPP-1297)
Enable client-IP based session affinity per LB NAT rule with specific timeout.

Change-Id: I9aade152e330218d21dfda99cc5e984d769ab806
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-09-03 14:48:54 +00:00
Klement Sekera
7ff0a265a8 vapi: init clib mem heap on connect if needed
Change-Id: Id45a3a37dd77771289622314406dccf50b64f04d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-09-03 12:35:27 +02:00
Ole Troan
732021070f STATS: Python binding to access VPP statistics and counters.
from vpp_papi.vpp_stats import VPPStats
s = VPPStats(socketname='/var/run/stats.sock')
c = s.ls('/if/rx')
counters = s.dump(c)
print(s.set_error_str())

Change-Id: I203ebe60b0c9ee5742aadc737c0f29051757959d
Signed-off-by: Ole Troan <ot@cisco.com>
2018-09-02 16:13:57 +00:00
Damjan Marion
855e26868f Switch to cmake
Change-Id: I982b69390c55b5ffbd744f355efc0aaf425b360c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-02 11:24:12 +02:00
Damjan Marion
edc4387602 cmake: cache line size detection
Change-Id: I9a0df8d15deefdf31cfead56c96433cd7220b802
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-02 11:24:12 +02:00
Damjan Marion
cc4eb994e4 cmake: respect TERM
Change-Id: I8e2dd1902f57ee173dd266743b46f5602548a4c1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-01 20:07:48 +02:00
Damjan Marion
ad1e1c5b2d cmake: pass linker flags, use devtoolset on centos 7
Change-Id: I8439fd070dc47a080e2df859c9f9ac67d8a08f04
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-01 20:06:50 +02:00
Damjan Marion
c6c0246e2e cmake: detect vpp version, set soversion, pretty config print
Change-Id: I5d0777421debe6c3e4b93d62ad6790912063a9e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-31 21:14:29 +02:00
Hongjun Ni
219cc90cb4 Support lb on both vip and per-port-vip case
Previously, a service is specified by vip.
This patch extend that a service is specified
by both vip and per-port-vip cases.

Change-Id: Icbfd1f972c6bafde7d85c6abb498576bd9ba250d
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-08-31 16:00:17 +00:00
Neale Ranns
d69f4396bf IPx address query functions take a const pointer
Change-Id: I45b0c48e89cb1ea556c795f6163a8346f2e2e0da
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-31 15:06:21 +00:00
Dave Barach
5fd95fba00 Fix typo
Change-Id: Iadf4ce27f56400b669b80f2e718b6d4330c949a5
Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-08-31 09:33:05 -04:00
Neale Ranns
75c276f9e3 Docs: update MPLS FIB section with text from the wiki
Change-Id: I9d903db89facc916fb5dd23d564417230e1c76e0
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-31 12:45:48 +00:00
Vanessa Rene Valderrama
98eb4c224d Add INFO.yaml file
Add INFO.yaml to list:
- Project description
- Properties
- Issue Tracking
- Contacts
- PTL information
- Meeting information
- Committer information

Change-Id: Ifed54c1cc648dc3dc7e276c63d87144812197505
Signed-off-by: Vanessa Rene Valderrama <vvalderrama@linuxfoundation.org>
2018-08-31 12:03:31 +00:00
Neale Ranns
4fa87e7b11 FIB path CLI fix for lookup-table IDs
Change-Id: I8c127d472e0010036061a8a076599d1ff85abab5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-31 11:59:16 +00:00
Neale Ranns
de5b08fb30 Introduce a mac_address_t on the API and in VPP
Change-Id: I05d6c2cb5d34de469eb050e4ee10dc6b954c986d
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-31 11:58:46 +00:00
shubing guo
45478933b2 VPP-1407: Fix the wrong length of udp header for buffer chains
Change-Id: I1669faeac15dfb69e335a1e96b6da118dc1892c1
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
2018-08-31 03:37:41 +00:00
shubing guo
aea5f39b64 VPP-1408: Fix bug that wrong tx fifo drop in buffer chains flow of dgram mode
-- Not drop session dgram hdr when to drop processed udp message from tx fifo

Change-Id: Id5ce5780817041bca05011f7b9b53e97a6d78da4
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
2018-08-31 01:37:35 +00:00
Florin Coras
134a996a02 vcl: add support for multi-worker apps
Add basic support for app registration of multiple workers. LDP does not
work with multi-worker apps.

Change-Id: I3fc421a2a591a077b275827463f874b261415a63
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-30 21:01:45 +00:00
Damjan Marion
ac5554c960 cmake: add missing header
Change-Id: Ie1aa5c34fa3a4f9940741b8ae55b93e021ced404
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30 22:57:01 +02:00
Damjan Marion
5ad62c3103 cmake: fix vppapigen install permissons
Change-Id: I0f49842d3e6690d0965bd310321495a2dc4c2350
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30 22:56:13 +02:00
Scitt Keeler
d9b2fcebef docs: Add features by release section
Change-Id: Ibcae8c8ecdf8a3c2d7bcf96bf7cd5b741e2fad22
Signed-off-by: Scitt Keeler <skeeler@cisco.com>
2018-08-30 18:45:51 +00:00
Dave Barach
e89be4ec55 Crude stat segment lock recovery
Make sure that vpp_get_stats main heap does not address-collide with
the stats segment, which lands "somewhere" in the vpp address space.

Add mising MAP_ANONYMOUS flag in clib_mem_vm_map

Change-Id: I8a671d174eefd8dd24771ad2ed9f1250e2c7a9f8
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-30 18:33:23 +00:00
Damjan Marion
d1318256bf cmake: missing dependencies
Change-Id: Iae03deb10d437286989dd3d45f8cc9690d463100
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30 20:28:21 +02:00
Neale Ranns
c8352bc43d Refactor the ARP throttle into a common type so it can be reused
Change-Id: Ic7f7af983d5b6d756748023aa0c650f53e9285cf
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-30 17:43:48 +00:00
Berenger Foucher
2ce8bd9621 Add SHA2 support to IKEv2 implementation
The following patch adds a stronger cryptographic suite to IKEv2 implementation.

The following algorithms can now be used for integrity checking in IKEv2 implementation (responder and initiator):
    - hmac-sha2-256-128
    - hmac-sha2-384-192
    - hmac-sha2-512-256

The default integrity checking method was set to hmac-sha2-256-128.

The default PRF function was set sha2-256.

Change-Id: Ia82b4cbbf3067b19b8487040dbefbaf4c9319548
Signed-off-by: Berenger Foucher <berenger.foucher@stagiaires.ssi.gouv.fr>
2018-08-30 17:13:10 +00:00
Neale Ranns
7c922dc404 SR-MPLS: fixes and tests
- the FIB path takes a vector of type fib_mpls_label_t not u32 so the untype safe vec_add did not work
- write som eSR-MPLS tests
- allow an MPLS tunnel to resolve through a SR BSID

Change-Id: I2a18b9a9bf43584100ac269c4ebc286c9e3b3ea5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-30 17:12:11 +00:00
Marco Varlese
70fee2df33 SUSE: fix spec to generate RPMs
Change-Id: I36ec5136d0f100c8277a19f89c8f6c9640e0614e
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-08-30 15:45:06 +00:00
jdenisco
0923a2376f docs: FIB 2.0 start
Change-Id: I87cd2eae133c9f5b9f7764a0f7a41bcc28523e4c
Signed-off-by: jdenisco <jdenisco@cisco.com>
2018-08-30 15:14:49 +00:00
juraj.linkes
5e2c54d029 Fix hanging test runner when child process dies
When fixing the test summary after a test run doesn't finish properly I
introduced a bug where child process which died would leave the whole
run hanging. This patch fixed the bug while still having the correct
test summary.

Change-Id: I206b1a7dab4032d24cbc50667b8dd0bdcebb67a6
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-08-30 13:57:39 +00:00
Jakub Grajciar
93a5dd1723 libmemif: external region support
region 0: descriptors
region 1: buffers (external)

Change-Id: Ia728967817b4c78bc00f8eed44606d0c5bc386b0
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-08-30 12:35:46 +00:00
Damjan Marion
43b0606301 cmake: a bit of packaging work
Change-Id: I40332c2348c4aab873d726532f2ac3c4abde7ec9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-30 12:35:28 +00:00
Lijian Zhang
ec2a9bbb89 Fix array bound failure in api_sr_localsid_add_del
When compiling VPP with GCC-8.2.0, it gives below error messages.

src/vat/api_format.c: In function ‘api_sr_localsid_add_del’:
src/vat/api_format.c:10839:7: error: ‘memcpy’ forming offset [5, 16] is out of the bounds [0, 4] of object ‘nh_addr4’ with type ‘ip4_address_t’ {aka ‘union <anonymous>’} [-Werror=array-bounds]
       clib_memcpy (mp->nh_addr6, &nh_addr4, sizeof (mp->nh_addr6));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/vat/api_format.c:10809:17: note: ‘nh_addr4’ declared here
   ip4_address_t nh_addr4;
                 ^~~~~~~~

Change-Id: I9065a3407d53c1f91974b32381972c4edb45144c
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2018-08-30 10:18:38 +00:00
juraj.linkes
be460e72d5 Fix the default step when using STEP=1 while testing
Change-Id: I6b2950dfd0d9023b20e24845b3bce20cf4ba66df
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-08-30 10:17:54 +00:00
Jakub Grajciar
149d0e2813 avf: RSS support
Change-Id: I59b8f08789f0704d6768258348e938da67e5b15b
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-08-30 10:10:45 +00:00
Neale Ranns
3b23e9d5af SR-mpls: do not pass empty label stack to fib
Change-Id: Ib1601d01a54296e72be3bbfa057fce965549b02b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-29 22:44:14 +00:00
Dave Barach
1e3417f72f Address bfd rpc scale issues
Remove the expensive RPC call for every received packet and replace it with
lock-protected direct calls. Reinstate RPC for the less frequent
notification traffic.

Adjust the wakeup event sending logic to minimize the number of events
sent, by measuring the time it takes from sending the event to processing
it, and subsequently not sending the event if the pending wake-up time
is within 2x or the event propagation delay.

Eventually: remove oingo / oingoes.

Change-Id: I0b3d33c5d029527b54867a97ab07f35f346aaa3d
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Steve Shin <jonshin@cisco.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-08-29 22:41:35 +00:00
Ping Yu
e6446a3cd5 Fix race condition in tls half open ctx get/put
Change-Id: I603094215162bfe7d41bbff1b9fe8ab974aa3fab
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-08-29 17:34:14 +00:00
Neale Ranns
77eb9073b1 Consolidate table->index conversion in fib-path CLI processing
Change-Id: I221cebddc45efbfdec428b7df2af96e2aedff2dd
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-29 11:10:50 +00:00
Hongjun Ni
e4fc3fbb78 Add NSH Plugin Maintainers
Change-Id: I420a563b5eb06f243833da9e8fb7c8a449ad3cc2
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-08-29 10:25:20 +00:00
Matthew Smith
7fc631fdea patch mlx PMDs for VPP w/ DPDK 18.05 or newer
Memory allocation changed in DPDK 18.05. The mlx4 and mlx5
PMDs did not support using externally allocated memory.

The patch for mlx5 was generated by Mellanox. That patch was
modified to apply to the mlx4 PMD and tested on Microsoft
Azure.

Change-Id: I92116b1d71a3896d5bf7b1f10c40c898d72540d6
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-08-29 09:47:17 +00:00
Ole Troan
2fee16787e STATS: stat_client updates.
New stat segment client library: vpp-api/client/stat_client.h
New stat segment query app: vpp_get_stats [ls | dump | poll ] <pattern ...>
Prometheus integration through: vpp_prometheus_export <pattern>

Change-Id: I6f370cf599e9fcf066f22965a62d3a8acd529994
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-29 09:39:38 +00:00
Damjan Marion
fcf9497d3b avf: deal willth tx ring full properly
Change-Id: I0b38e129ee01d212463253e5526bfc2d60fd88af
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28 19:45:51 +00:00
Brian Brooks
f2de90d724 cmake: fix marvell plugin build
Change-Id: I4ff1a6ed4e42381ed68a62362ba05e940b615da2
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
2018-08-28 14:14:56 -05:00
Klement Sekera
1732e476cd VAPI: bugfixes
Change-Id: I20cfbae8b704ca68fd8dda9c811dc282ce723871
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-08-28 18:05:42 +00:00
Dave Barach
9466c45cee 32/64 shmem bihash interoperability
Move the binary api segment above 4gb

Change-Id: I40e8aa7a97722a32397f5a538b5ff8344c50d408
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-28 18:05:16 +00:00
Damjan Marion
4638e94ac3 avf: add missing rx_redirect_to_node handler
Change-Id: If7fdcdef9a9e12fdf4b7af3c95e06602e39f1e10
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28 17:41:05 +00:00
Mohsin Kazmi
e04ffa4ecd cmake: Add perftool to cmake build
Change-Id: I921e92473a9dedde5952172d19676d47ffc4b53d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-28 16:03:14 +02:00
Damjan Marion
4a53e83a20 cmake: add python api
Change-Id: I7e899929843eba13fbee97caea51621423778cbe
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28 13:03:00 +00:00
Damjan Marion
258a4cf56a cmake: don't install some test executable
To be equal in what autotools do...

Change-Id: Ib9f1609f803622a364a08e2c73d6c0fae3d85f3f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28 11:42:44 +00:00
Damjan Marion
e7e5de0693 cmake: add g2 and elftool tools
Change-Id: I901c5a2c0ac81421a69b8ade9307c304aa38582b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28 13:40:44 +02:00
Damjan Marion
0abd4a2e0e cmake: install vppapigen
Change-Id: If5bf1708a07acde73ed34639eeed95babdcf1ccd
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28 11:02:01 +00:00
Damjan Marion
6462742d82 cmake: compile libs and plugins with -Wall
Change-Id: I1edf236295eeb934943d6ca2aed04241e9cde362
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28 11:01:34 +00:00
Damjan Marion
69abe4442b vlib: add 'show node' and 'set node function' CLI
Change-Id: I084d7c9e34329f10b5fe45e0b157c4defe0f2811
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28 11:11:24 +02:00
Florin Coras
57791ad4de tls: fix handling of failed connects
Change-Id: I48f32fdf1859420d2966dd8553f3a8f9a082e2ae
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-28 08:24:50 +00:00
Florin Coras
070453d872 vcl: remove session locks
Support for multi-worker apps will be added in future patches. This also
disables vce.

Change-Id: I43b0ed2d5daa2b3d8f8a12fb18bd89dcdfa0619d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-28 08:24:11 +00:00
Florin Coras
6011699556 vcl/session: use mq for bind replies
Change-Id: Iac6e1c32cf99c5392a29f7366401b7fc39e463e3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-28 08:23:51 +00:00
Hongjun Ni
d313f9e6f7 Port NSH plugin to VPP
Please refer to https://wiki.fd.io/view/NSH_SFC

Change-Id: Iba7e33e4dbb064c1527aaddbe8dce4b6b63a627a
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2018-08-28 06:04:57 +00:00
Eyal Bari
a5679e86af vxlan: decap use vlib_buffer_enqueue_to_next
Change-Id: I43832cdadda820772ba9052890bba59b24e70c6c
Signed-off-by: Eyal Bari <ebari@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28 00:47:37 +00:00
Neale Ranns
30d53645de Adjacency walks protected by 'walk in progress' flag
Change-Id: I3281f65f7dec792d56de48afb39efcc2fed8578b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-27 21:49:40 +00:00
Matus Fabian
f96d0a105d NAT44: fix nat44_ed_not_translate_output_feature for multiple VRF (VPP-1404)
Change-Id: I44acc5aeff59dc25d18369e29618bbe39d30a1b3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-27 19:35:59 +00:00
Klement Sekera
2108c0c6da VAPI: support enums & unions
Change-Id: I76ac7e4eeb6a300538d52a0e355d66937764a4d1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-08-27 19:35:30 +00:00
Mohsin Kazmi
ef89e4d680 VOM: Add support bridge domain arp entry dump
Change-Id: I5d563e1ebc3bd0a40e9347eaf0d00cad1f86a382
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-27 17:50:24 +00:00
Neale Ranns
fe0a2c5a45 IGMP: enable command on cli
Change-Id: I1f741b66ab8e3ecbb5c0d248b72e52c56545d5f3
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-27 17:11:13 +00:00
Neale Ranns
9514fab042 MPLS: allow 16 as a valid output label
Change-Id: I7e6045514d58010258889cadd220b7efcef7c1b9
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-27 17:10:55 +00:00
Mohsin Kazmi
f8520159d5 cmake: Fix plugins .h includes
Change-Id: I90600d000afb02e8969f3c01bcf9e4b5c10a7d39
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-27 16:28:15 +02:00
Mohsin Kazmi
b3abec7c1f cmake: Fix VAPI .hpp generation
Change-Id: I2bec3b2511f00d017f9b3a727809631695222c1a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-27 16:28:04 +02:00
John DeNisco
2ba9dcf408 docs: Finish event logger, viewer and cleanup.
Change-Id: I3de038439bf0ab5755777c0f4930aec0514f5b63
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-08-27 14:18:25 +00:00
Damjan Marion
33ed3e4c7d cmake: fix clang build and few minor fixes
Change-Id: If5b850c939f7a5383f9a7eff8ac41708c3428a90
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27 16:00:17 +02:00
Neale Ranns
917dc3b39d CMake: fix install lib and iOMA missing symbol
Change-Id: I929a5c3779cb40c9fde64e88ebe5183a95faf6ff
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-27 08:35:25 -04:00
Damjan Marion
4c64b6edc8 cmake: add vapi build
Change-Id: Id939a0cbe35601478ad262f49bb0a1abdb62aa45
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27 12:25:48 +00:00
Damjan Marion
3ce5f914ed ioam: fix vat plugin issue introduced by last commit
Change-Id: I06c14544503b7a072e8c6437c4489c32798a1701
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27 12:24:46 +00:00
Matus Fabian
878c646aea NAT44: add support for session timeout (VPP-1272)
NAT44 (vanilla/simple and endpoint-dependent mode) now lazily delete expired
sessions. When inserting to session lookup hash and bucket is full, expired
session is overwritten.

Change-Id: Ib1b34959f60f0ca4f5b13525b1d41dd2f992288d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-27 12:17:25 +00:00
Damjan Marion
d2dcd200fe cmake: add missing vat plugins
Change-Id: Ib61f0299c17c0f021408ab0a44c5b54f55f8a8ec
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27 10:05:23 +00:00
Damjan Marion
c261760d90 cmake: use lib64 for lib dir
While not sure if this is right or not, this is what autotools do

Change-Id: I01f22281302b1383b0e69c3f03e5c8f8a8961358
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-27 11:58:18 +02:00
Damjan Marion
4553c95ab7 cmake: add add_vpp_library and add_vpp_executable macros
Change-Id: I1382021a6f616571b4b3243ba8c8999239d10815
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-26 13:50:53 +02:00
Damjan Marion
d16004d56c cmake: move functions to src/cmake
Change-Id: Ibcb7105fa7e3c09efdce01bccd4de235fe33ea99
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-26 10:41:08 +02:00
Damjan Marion
c0ccefddbf cmake: handle api_test_plugins in add_vpp_plugin macro
Change-Id: I76a1711af0a920cce66e6dfb07d019ba505d55b7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-25 22:09:58 +02:00
Damjan Marion
b0f5bad55b ioam: one api test plugin instead of five
Change-Id: I715dade7c81f2ba6a0a5297123f588563833c3fb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-25 22:09:58 +02:00
Damjan Marion
74449b8b68 cmake: improve add_vpp_plugin macro
Change-Id: Iffd5c45ab242a919592a1f686f7f880936b68a1a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-25 11:56:03 +02:00
Damjan Marion
2bfdda76d8 cmake: add more headers to the install list
Change-Id: I3a0f48381232fcac1727034aa6d2504a8d1edb04
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-25 09:55:17 +00:00
juraj.linkes
0219b8dfbf Fix logging to file and summary for crashed tests
Logging was not being logged to log.txt
Crashed tests were not reported properly when running tests in one
process

Change-Id: Ica2d703d88351cc8a94bad86764ae4376dc79590
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-08-25 00:40:54 +00:00
Pierre Pfister
ffb3813dd3 Add int cast to fit '.*' printf expectations
Sometimes, compiler would throw an error:
  error: field precision specifier ‘.*’ expects argument of type
  ‘int’, but argument 5 has type ‘u64 {aka long unsigned int}’

This change adds the requested cast.

Change-Id: I43edeac0ee565a1fcee38b9d2942e49c8dd63116
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2018-08-25 00:40:10 +00:00
Florin Coras
c9fbd66cdb vcl: remove unused binary api handlers
Change-Id: Ifc36e3934574ba479f71157f797b2d0745b1d100
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-25 00:39:15 +00:00
Florin Coras
c3638fece1 session: fix coverity warnings
Change-Id: I2a25bba675fc9c84e5d391533e92b9a041637405
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-24 13:58:49 -07:00
Florin Coras
1553197f9a session: add support for multiple app workers
Refactor session layer to support multiple workers per application.

Change-Id: Ie67354688d396449d14bbbb8c56050206e307cd8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-24 19:05:25 +00:00
Dave Barach
f8b8586b69 Clean up packet tracer, especially "clear trace"
There are multiple trace enablement schemes. It's easy to end up in
vlib_add_trace with tracing disabled insofar as the packet tracer is
concerned. When that happens, return the address of a per-system
dummy trace record.

Change-Id: I929391b8be4ed57e26e291afdc509a15f09a3160
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-24 19:03:12 +00:00
Neale Ranns
a9aedb681f MPLS tunnel: don't reuse hw-indices
this is the same behaviour as other tunnel types

Change-Id: I6439f692bc2bc18f12eea599e0e06b9eaa5eb128
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-24 17:00:18 +00:00
Mohsin Kazmi
54f7c51fd5 rx-placement: Add API call for interface rx-placement
Change-Id: I9228ce29e9d2fc862a2d076b4072bcdd728d6dd1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-24 15:01:44 +00:00
Eyal Bari
bb3768842e l2:bvi-dont aceess sup hw int for broadcasts
sup hw int is needed only for unicast validation

Change-Id: I5e5753c09d1c16fdb2435b4db5628a2379fe6f96
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-08-24 13:36:09 +00:00
Dave Barach
af7dd5b32e Rename struct mallinfo -> struct dlmallinfo
Also: don't #include /usr/include/malloc.h in dlmalloc.h

Change-Id: Ic73ff8862cc8aba371488b912255e28dd96374ff
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-24 11:04:18 +00:00
Damjan Marion
d897adcebb cmake: fix -DVPP_USE_DLMALLOC=OFF
Change-Id: Ib8dc37b1a39c92a0c7b22cebdf985c6afa8229d9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-24 08:15:40 +00:00
Florin Coras
3ec66b0232 tcp: fix cc recovery re-entry and persist timer pop
Change-Id: I89e8052f2d2c36dd3de5255c4ee570722dc58227
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-24 07:05:47 +00:00
Florin Coras
fcbda8951e session: fix retrieval of local sessions if app is detached
Change-Id: I0f5c1dc99610b65646c3b5cf8da7aea273371e4d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-23 19:27:03 -07:00
Damjan Marion
869031c585 bihash: remove unused counters
Change-Id: I1f0aae16e4ace850d7d79b9c2c644a3e0d002636
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-23 21:33:57 +00:00
Dave Barach
b76590ac59 clib_mem_is_heap_object() needs to recognize sys_alloc segments
Preferably without mistaking -pie (address randomized) segment
addresses for heap objects.

Change-Id: Idca6b966f14b1caf6b4637843fe407dbc5017535
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-23 20:00:08 +00:00
Damjan Marion
3ea2d6c130 cmake: keep 'make test-debug' on autotools for now
Change-Id: Ia073a0e13da174d434f6562efe0833ee35ea40e2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-23 18:06:01 +00:00
Marco Varlese
038d2614bf sctp: https://jira.fd.io/browse/VPP-1396
Reducing the number of clients and mbytes transferred to make the test a
functional test rather than a stress one.

Change-Id: I715ab5db087b96c40da37d4221f3030b10519fd0
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-08-23 16:19:54 +00:00
Damjan Marion
ca3ff1a25f ip4: rework rewrite node to use vlib_buffer_enqueue_to_next()
- perf improvement is around 3 clock per packet
- it properly prefetches ip header and rewrite area

Credits to zhiyong.yang@intel.com for spotting that in some cases
rewrite area is not prefetched.

Change-Id: Ie02913de7bd7f42b7df2617fb5fa87c74ab53c23
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-23 14:36:15 +00:00
juraj.linkes
184870ac5a CSIT-1139: Implement parallel test execution
The implementation of parallel test execution in VPP Test Framework.
- VPPTestCase test methods are grouped together
- tests are running in separate processes
- VPP instances spawned by tests are assigned to different cores
- output from these processes is redirected through pipes and printed
out testcase by testcase
- TEST_JOBS env var is used to specify the number of parallel processes
- improved test summary
- a bit of code cleanup

Change-Id: I9ca93904d9fe2c3daf980500c64a8611838ae28c
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-08-23 14:19:35 +00:00
Mohsin Kazmi
99ddcc3f8b CMake: Add Cmake support for Vat
Change-Id: I3e8efce9eacba46ec9913d4024d66f00fe326095
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-23 13:58:06 +00:00
Mohsin Kazmi
b24dfec57e coverity: l2 arp termination dump
This patch resolves the coverity warning.

Change-Id: I3f5e664b442fa9bcafd28c67283596570dc1244d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-23 12:24:19 +02:00
Lijian Zhang
b749c21814 fix dpdk_plugin.so load failure with DPDK 18.08
load_one_plugin:189: Loaded plugin: abf_plugin.so (ACL based Forwarding)
load_one_plugin:189: Loaded plugin: acl_plugin.so (Access Control Lists)
load_one_plugin:189: Loaded plugin: avf_plugin.so (Intel Adaptive Virtual Function (AVF) Device Plugin)
load_one_plugin:191: Loaded plugin: cdp_plugin.so
load_one_plugin:145: /home/lijian/tasks/_ipsum/vpp/build-root/install-vpp-native/vpp/lib64/vpp_plugins/dpdk_plugin.so: undefined symbol: mnl_socket_close
load_one_plugin:146: Failed to load plugin 'dpdk_plugin.so'
load_one_plugin:189: Loaded plugin: flowprobe_plugin.so (Flow per Packet)
load_one_plugin:189: Loaded plugin: gbp_plugin.so (Group Based Policy)

Change-Id: I4f885f2bd3e548dbb2f7afec3363ed8ae09b3eca
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2018-08-23 08:28:34 +00:00
Francois Clad
4295424765 srv6-ad: Adding support for L2 traffic
Change-Id: I3c14555113c2b58f3be629600051beb7f6716cfe
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-08-22 20:32:53 +00:00
Francois Clad
bcd4c4a2c4 srv6-ad: Adding test cases
Change-Id: I32704267cf2ff6628f86335a5e7da1c3b116df1d
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-08-22 20:32:44 +00:00
Neale Ranns
6150211538 IPIP and SIXRD tunnels create API needs table-IDs not fib-indexes
Change-Id: Ifaef196a24fa9b6924f2b9692318f69763cee5e1
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-22 20:29:40 +00:00
Neale Ranns
5779a441ac show command for lookup DPOs
Change-Id: I4907f48e6c4a4e91343fd0d4fface00f09e5fa2b
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-22 18:18:34 +00:00
Eyal Bari
78cfeb4322 l2:remove unused members of input, output configs
reorder structs for less padding

Change-Id: Id05123f5bac870e1c585b3aa2177d9e3a6f8d70b
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-08-22 16:04:19 +00:00
Neale Ranns
571ab20d1d Consolidate the [un]format_mac_address implementations
Change-Id: Ic4c42c5610a827234e6582501f0ddcba47aa34ee
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-22 16:03:26 +00:00
Matus Fabian
828d27ea0e bihash: add support for reuse of expired entry when bucket is full (VPP-1272)
Applications such as NAT that dynamically create entries require these entries to expire after some time.
Bihash user can now lazily delete expired entries. When inserting and bucket is full, expired entry is overwritten.

Change-Id: I6852305df399b546159407f1729c856afde5a634
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-22 15:14:29 +00:00
Matus Fabian
69ce30d6ab NAT: update nat_show_config_reply API (VPP-1403)
Change-Id: I85383e428cb54c4c09ab387811dd6390f7c61d97
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-22 13:39:00 +00:00
Francois Clad
a7e6cd90b8 srv6-ad: Adding rewrite counters
Change-Id: I0af61b27f3336861af2ad5e5b1053c61607b970c
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-08-22 10:41:18 +00:00
Hongjun Ni
0ad7011384 Refactor vnet.am to expose arp feature
vppsb router plugin need include arp.h file.

Change-Id: Id8137948213f3f10a5390811052ed73f6112965e
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-08-22 10:20:37 +00:00
Neale Ranns
ffec786497 CMake: install .json files in ROOT/share/... for papi.
Change-Id: I1a5325c5f026ba5e8d89608c285e934a6e1c16e6
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-22 08:06:55 +00:00
Jessica Tallon
505ec22c64 VPP-1268: Add option for memory channels DPDK uses
This adds a `num-mem-channels` option for DPDK enabling support for
choosing the number of memory channels used.

Change-Id: I1663dd866ac60592b6dd02261af66d87c64acdb1
Signed-off-by: Jessica Tallon <tsyesika@igalia.com>
2018-08-21 19:54:48 +00:00
Damjan Marion
7ee11827dd dpdk: bump DPDK version to 18.08
Change-Id: Ia1b188492138a0ca0e95daf6eb8e761e8db081ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-21 17:05:58 +00:00
Marco Varlese
aa839cab98 SUSE: rpm-packaging fixes
Change-Id: Ic7ddc34bbb2fe414d41a083efd8caf35a12488ab
Signed-off-by: Marco Varlese <marco.varlese@suse.de>
2018-08-21 14:46:28 +00:00
Marco Varlese
a74ee1f7aa NASM: update to latest stable 2.13.03
Change-Id: I04cdd296bc3de0460308351d0bbb00d7cbbf023e
Signed-off-by: Marco Varlese <marco.varlese@suse.de>
2018-08-21 14:40:14 +00:00
Neale Ranns
6a36705915 CMake: stats clients depend on the .api header generation
Change-Id: I5bdc57a8dd13ef34799052cc642fc45b78bafdc6
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-21 05:32:02 -07:00
Ed Kern
6604ddea99 Makefile: opensuse 15.0 reporting change
A change in /etc/os-release reporting for opensuse leap15.0
means this change is required so that builds are allowed.

Change-Id: I35fb55a4c63b5d6d9d313c7e75ff6b039280df96
Signed-off-by: Ed Kern <ejk@cisco.com>
2018-08-21 07:09:10 +00:00
Ed Warnicke
148cc01a56 Add Dockerfiles for run/build.
build-root/docker/build/ contains Dockerfiles for building vpp

build-root/docker/run. contains Dockerfiles for creating
Docker containers for runnining vpp.

xenial, bionic, and centos7 are supported

Change-Id: I90dd96ed9e01da14eead0395e597219717eead88
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2018-08-20 20:24:53 +00:00
Pierre Pfister
052c2dc7e1 Enable storing state in flowhash hash tables
Flowhash user can now rely on the table to be initialized
to zero and know when an entry is cleaned up by the
garbage collector.

This is usefull to store state in flowhash entries without
the need for callbacks when an entry timeouts.

Change-Id: Ieece6b7277241f84ea3f2473d0771c6ee8ce460c
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2018-08-20 19:30:22 +00:00
Klement Sekera
324454492c make test: remove excessive prints
Change-Id: Iad57387991d4330d7797cb85fef1157a36e8e897
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-08-20 15:06:10 +00:00
Neale Ranns
5ff0e0b186 CMake: generate .json from .api files
Change-Id: Ic18aa0fb42a72b5e0ebbfbebdefc7582cb46b5ea
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-20 15:05:07 +00:00
Marco Varlese
23722e6bfa cmake: add packages for opensuse
Change-Id: I6fd9090c59a8b2b3bdfb0c3a217e69c513bfaeed
Signed-off-by: Marco Varlese <marco.varlese@suse.de>
2018-08-20 15:02:50 +00:00
Pierre Pfister
0af1852eed Detect support for memfd_create at compilation
Compilation was failing on systems without memfd_create.
This uses check_c_source_compiles to check whether the memfd_create
function is available on the system.

Credits to Damjan for his help troubleshooting.

Change-Id: I136d9504d7978e3a09438d0d76b2de1042702b2c
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2018-08-20 14:43:01 +00:00
Neale Ranns
2ddfe75240 CMakeLists file for vpp-api
Change-Id: I140e5df0a4a09dabafea8189586c3347952598a8
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-20 14:41:47 +00:00
Zhiyong Yang
3575abb79c vxlan_gpe_encap: fix packet len error
Change-Id: I294be184764b45777d6e5e44f5d742b2c8732de4
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2018-08-20 12:13:18 +00:00
Damjan Marion
9f540ed348 cmake: highlight warning and error messages
Change-Id: Id4b73368382b5e78c138987fe092429af5cb0afd
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-18 14:36:58 +02:00
Damjan Marion
74dfaa665b cmake: DPDK rte_config.h parsing
Change-Id: I53cad8e7787a132a5d6bacd5fda3fe67b7d59b44
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-18 14:04:29 +02:00
Damjan Marion
612dd6a955 CMake as an alternative to autotools (experimental)
Change-Id: Ibc59323e849810531dd0963e85493efad3b86857
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-17 22:14:39 +00:00
Mohsin Kazmi
5d82d2f149 l2: arp termination dump
VPP-1368

Change-Id: I6373f76ba87184a91b517712eafb4ee1f5cea59e
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-17 21:57:36 +00:00
Ole Troan
b3655e5592 VPP-1392: VXLAN fails with IP fragmentation
Not only is it wasteful to send all fragments back through ip4-lookup, but
it doesn't work with tunnel mechanisms that don't have IP enabled on their
payload side.

Change-Id: Ic92d95982dddaa70969a2a6ea2f98edec7614425
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-17 21:38:47 +00:00
Lijian Zhang
ee4efa7c39 Fix a bug in function pipe_rx
GCC 7 found this issue with a compiling warning,
and this bug has been confirmed by module owner.

Change-Id: If29e857b3a87f91f08674aee6993b075fcff87e7
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2018-08-17 19:41:12 +00:00
John DeNisco
a5db42f366 docs: Moved installing up a level, removed guides.
Change-Id: Ie4b2939b693698585f1f2d12391a0009e80bac0b
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-08-17 19:40:10 +00:00
Steven
bf21dc8505 lacp: issue with slave interface admin up after it is added to the bond group
When the slave interface is admin up after it is added to the bond group,
lacp does not send lacp pdu's to the interface because its periodic timer
is not running.

The issue was the slave interface's variables got reset after the state
machines were initialized.

Change-Id: I2942556ce29a4acc97db3be40293e69bed7b6679
Signed-off-by: Steven <sluong@cisco.com>
2018-08-17 19:39:03 +00:00
Lijian Zhang
4af47b89c6 Update AArch64 CSIT machines into FD.io VPP docs
The outlook will appear as below.
The FD.io CSIT is implemented with below platforms:

        x86/64
        ARM-AArch64

                Huawei TaiShan 2280
                Marvell MACCHIATObin

Change-Id: Ie84a99c53a0fc2186ea6992baca9558b6d96c7f8
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2018-08-17 17:30:09 +00:00
John DeNisco
c4c72d2835 docs: Rework the VPP progressive Tutorial.
Change-Id: If5b0d07ea90d978c6b1f11210a661876b7929653
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-08-17 17:28:28 +00:00
juraj.linkes
a60c3ed14b Add psutil to testing virtualenv
Change-Id: I650c9f226bcdc6328a7b4ff2dc4bd20cea8a512a
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-08-17 16:16:59 +00:00
Ping Yu
decda5b466 optimize init_server to reduce session overhead
move un-necessary session based operation to listener
split orignal openssl ctx to be session based ctx and listen ctx

Change-Id: Id6c54f47b0e2171fd8924a45efcd5266ce5402d5
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-08-17 14:48:10 +00:00
Florin Coras
38b99d06ad tls: add maintainers
Change-Id: I948739642f8fe0b6219ffcd8232a9ad486cabc4b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-17 14:47:40 +00:00
Florin Coras
ec54e11a84 vlibapi: validate private segment rotor prior to use
If the dead client scan removes the rotor position we're about to check
next, we end up outside the private registration pool's bounds.

Change-Id: If4e715593deeac4c06ae6b3fededc1965b042094
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-17 14:47:24 +00:00
Florin Coras
60f1fc1c17 vcl: unset fifo events only in read/write
Avoids accumulation of io event messages when the receiver is slow to
read.

Change-Id: I3a713d339a6ac0781c010be1fbad5a7963ab02c6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-17 14:46:57 +00:00
Lijian Zhang
f315410543 fix compiling warnings with GCC
GCC 7 plus Ubuntu-16.04 default ccache 3.2.4 reports warnings on switch case fall-through code,
which is commonly seen in DPDK code, which will cause image building failure finally.
It requires newer ccache version to support -Wimplicit-fallthrough.
To suppress the warning, if GCC is version 7 or higher, and it's old ccache version,
will disable the fall-through check.

dpdk-18.05/drivers/net/ark/ark_ethdev_rx.h:39:0,
                  from dpdk-18.05/drivers/net/ark/ark_ethdev_rx.c:36:
dpdk-18.05/arm64-armv8a-linuxapp-gcc/include/rte_mbuf.h: In function ‘rte_pktmbuf_alloc_bulk’:
dpdk-18.05/arm64-armv8a-linuxapp-gcc/include/rte_mbuf.h:1292:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
     idx++;
     ~~~^~

Change-Id: I4d12492471fadef9d349ba9e853a6799512f76f5
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2018-08-17 11:39:30 +00:00
Ping Yu
a0c29a9a8a Fix a segment fault issue in TLS
The root cause is it uses a dangling reference after memory move
Need to call session_alloc first, then use index to get the app
listener point

Change-Id: If5b7e0d6ddc761e5327660c47ce620e375319b4d
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-08-16 19:11:05 -04:00
Ondrej Fabry
e29cb67b7c Edit some warning messages in vpp-api client
- fix one typo: cnacel -> cancel
- edit log about returned value to be consistent with others

Change-Id: I09560eee8a9da361fa51e35f316d44361292bdb2
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2018-08-16 13:56:11 +00:00
Damjan Marion
9daf8fb6b3 dpdk: fix rss hash function handling
DPDK 18.08 verifies if all set bits are supported and fails if not....

Change-Id: Ia87242fcda11147dff3bebe2e2bef32f0a8891fb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-16 13:55:17 +00:00
shubing guo
4657c27b88 VPP-1386: fix wrong ip address of hash key for creating user in unknown protocol
Change-Id: I6239e930a8805207f8e42d15e8b17d444047e3f3
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
2018-08-16 13:40:46 +00:00
Florin Coras
452378a544 tcp: add tcp_error.def to installed headers list
Change-Id: I38351900bad9d727e7df6117597da488dbf5e12c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-15 15:32:39 +00:00
Ondrej Fabry
6bd197ebb9 Remove client_index field from replies in API
- replies should not need to contain client_index since
  it is used to identify sender of requests to VPP

Change-Id: Iece3853b3f020054ee1652b149d0cf8d9580db4e
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2018-08-15 13:09:16 +00:00
Matus Fabian
182e37e33f NAT44: fix next_src_nat (VPP-1384)
Use rx_fib_index instead of sm->inside_fib_index for session lookup key.

Change-Id: I2d6cce5b9376fa8ac4d75a9bbfa8498be0fd1493
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-15 13:08:56 +00:00
shubing guo
762a493890 VPP-1387:foreach outside address vector to find correct index when free outside address and port
Change-Id: Ie5452350a8ebe2c1b62085fcab50dbc0138d3ae2
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
2018-08-15 07:10:30 +00:00
Matus Fabian
38bc30802f NAT44: fix bug in snat_interface_add_del (VPP-1380)
Should not enable nat44-hairpinning node in deterministic mode

Change-Id: I5790323a6842ee71a62c6c91c49166a2839eac12
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-15 07:10:19 +00:00
Matus Fabian
8fed4240be NAT64: fix TCP session expire (VPP-1390)
Add missing call of nat64_tcp_session_set_state to set TCP session state.

Change-Id: Ifd297ea3ffe20870e1e34a95449b5c9404ec13eb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-15 07:10:05 +00:00
Ondrej Fabry
b11f903ae8 Fix context field position in API definition
- context should be first field for reply messages,
  just like it is for all other 545 replies

Change-Id: Ib291036d3389dbc26c8e9194966d01cab81534aa
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
2018-08-14 21:16:10 +00:00
Dave Barach
e324898958 Run interior graph nodes before process nodes
Reduces the chance of tripping over vectors in flight, especially in
single-core cases.

Change-Id: I132cdd3689f8e634f9a983af57219503817b8560
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-14 20:19:09 +00:00
Kyle Mestery
acc1fbcb5e Make vagrant work behind a proxy
Without this change, I cannot get the in-tree VPP Vagrant to work behind
a proxy. This commit fixes that by ensuring when we run sudo we're passing
environment variables, amongst some other cleanups.

Change-Id: Ica98a1238d40e6e6ccf80c472f52559c95af52f0
Signed-off-by: Kyle Mestery <mestery@mestery.com>
2018-08-14 20:16:51 +00:00
John DeNisco
ce96dda447 DOCS: Moved multiarch and build system, Incorprated Scott's changes
Change-Id: I5a57846db2d4faac1aa24db4629b612657f59afb
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-08-14 20:13:21 +00:00
andrew
9f0c02053f DOCS: Updated startup.conf parameters
Change-Id: Id1f4ff7409e8a833b8f7e6030d7287d8c1274c2d
Signed-off-by: andrew <andrew.olechtchouk@gmail.com>
2018-08-14 20:12:46 +00:00
Ping Yu
998dfd3c0f reduce polling and resume overhead by checking if inflight request exists
Change-Id: I0777a00f0cc082bab3348be8ec0be39faa50ffed
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-08-14 16:49:49 +00:00
ahdj007
22130e163e neighbor advertisement must with target_link option
Change-Id: Ic20eea8f2fd19dd3c1728a1f7c622ef0c9728f81
Signed-off-by: ahdj007 <dong.juan1@zte.com.cn>
2018-08-14 11:11:18 +00:00
John DeNisco
758dc46072 DOCS: Cleanup Getting Started
Change-Id: I4766773779f8d5c30a24bfed48090d7305c80ec5
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-08-13 17:00:22 -04:00
Juraj Sloboda
34eb5d423d classify_add_del_session API: Use more descriptive docstring (VPP-1385)
Change-Id: I30788c0dd1ee012e786bb3127bf2743ab0bfdc70
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-08-13 17:13:19 +00:00
Damjan Marion
c9dad5d945 Multiarch for ip4 forwarding nodes
Change-Id: I68b55fc641da9dacc3343628b3e0cf77d3533313
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-13 14:34:22 +00:00
Damjan Marion
6e36351faf Multiarch handling in different constructor macros
This significantly reduces need for

...

in multiarch code. Simply constructor macros will jost create static unused
entry if CLIB_MARCH_VARIANT is defined and that will be optimized out by
compiler.

Change-Id: I17d1c4ac0c903adcfadaa4a07de1b854c7ab14ac
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-13 14:33:54 +00:00
Damjan Marion
3bf6c2bfe5 dpdk: support for DPDK 18.08
Change-Id: If1b93341c222160b9a08f127620c024620e55c37
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-13 14:32:03 +00:00
shubing guo
060c3a7e5a VPP-1381: Fix the incorrect if condition when delete session for static mapping
-- The session should not be deleted when either ip address or port doesn't same with static mapping.

Change-Id: I09ab7379947654d2780a8c40c5340ce430541b12
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
2018-08-11 22:32:19 +00:00
Mohsin Kazmi
dd8e7d0e51 Multiversioning: Device (tx) function constructor
Change-Id: I39f87ca161c891fb22462a23188982fef7c3243f
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-08-11 15:01:42 +00:00
Damjan Marion
7f1f7e7865 avf: fix prefetch bug
Change-Id: I4e774dc53b08746cd4ab42393f33676dcc78e791
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-11 09:17:51 +00:00
Dave Barach
d7a37a7562 emacs skeletons: add quad/single, avx2/avx512 support
Change-Id: Ib8095ad69620308d6199ab030a754ee45f92e59b
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-11 00:07:10 +00:00
Ole Troan
7eb9d9608b IP fragmentation buffer chains, part 2.
Change-Id: I8d1072cf9ff9f502302fd906c5590e0f3698dc60
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-10 20:31:13 +00:00
Florin Coras
9936831502 vcl: support for eventfd mq signaling
- support eventfd based mq signaling. Based on configuration, vcl
epoll/select can use either condvars or epoll on mq eventfds.
- add vcl support for memfd segments
- vpp explicitly registers cut-through segments with apps/vcl
- if using eventfd, make ldp allow one call to libc_epoll_create. Needed
for the message queue epfd
- update svm_queue_t to allow blocking calls with eventfd signaling.

Change-Id: I064151ac370bbe29bb16c968bf4e3659c8286bea
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-10 20:26:24 +00:00
Dave Barach
f46663c65b DOC-ONLY: document latest multi-arch support scheme
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I613415c109f648248ee04dd76d5e652dbf21bc7f
2018-08-10 11:15:55 -04:00
Dave Barach
8e83bcb9ae DOC-ONLY: build system details
The tables need some TLC from someone familiar with making pretty
tables.

Fixed text-wrapping onto newlines for all tables in our docs.
Changed Environment Variables to ENV Variables so that the specific
column header fits properly.

Change-Id: Ie758612e561eefe44e771dac63b63bf026a52c2d
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-10 15:05:09 +00:00
andrew
a38d001cfe docs: A little cleanup and added some gdb examples.
docs: Added section on running VPP for developers.

Change-Id: I98b5c6f1c9fee60b297e3947e78ec33f950f598a
Signed-off-by: andrew <andrew.olechtchouk@gmail.com>
2018-08-10 15:04:46 +00:00
Ole Troan
4146c65f0d IP fragmentation to handle buffer chains.
Change-Id: Iff557f566ebc9ab170d75da1233997d83b8c8a66
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-10 12:02:51 +00:00
shubing guo
3074629b25 VPP-1382: Fix ip6 address cann't display completely when show ip6 neighbors
Change-Id: Iadfbe3c0d0c6dcec2b4ccf1695bd234358f6969a
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
2018-08-10 09:27:01 +00:00
Neale Ranns
d0df49f26e Use IP address types on UDP encap API
Change-Id: I3c714c519b6d0009329b50947ce250c18ee2a85a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-10 08:26:00 +00:00
Neale Ranns
404d88edce Add test of the IP unnumbered dump
Change-Id: Ic3e978faf58b43adb8a9fd0dea36eb4513fe0c64
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-10 07:47:46 +00:00
Neale Ranns
99a3c6c483 Use the bihash walk function
... rather than re-implementing the loop

Change-Id: I20bede8403c804cbec654db9b7020a4d01e5bc18
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-10 00:33:14 +00:00
andrew
df50b45e23 DOCS: General cleanup (did not move any sections)
Change-Id: I67cc42769661c10d2793f8c6cdb3b232b803d145
Signed-off-by: andrew <andrew.olechtchouk@gmail.com>
2018-08-09 18:03:05 +00:00
javierfernandezvalles
7d84c16eb6 DOCS: modified writing docs section
Change-Id: Ic3ec16dba1a6374785f25f622b2cdc9b6415a13b
Signed-off-by: javierfernandezvalles <JaviervallesF@gmail.com>
2018-08-09 18:02:42 +00:00
John DeNisco
faa9300867 DOCS: Restructure Events
Change-Id: I135ced20b58cdb72fbd0784015af037bb6e7ad28
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-08-09 18:02:20 +00:00
John Lo
fe80c49740 Fix L2 flooding to BVI with error return not working
Change-Id: Id0b0e9bf1a7ba02144ec75783378352423f7a4b9
Signed-off-by: John Lo <loj@cisco.com>
2018-08-09 17:03:01 +00:00
Dave Barach
49433adb91 Thread-safe ARP / ND throttling
Change-Id: I810d834c407bd404d5f0544cdec0674f0bb92d31
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-08-09 16:10:09 +00:00
Andrew Yourtchenko
7fad624b09 acl-plugin: fix failures in some of IPv4 test-debug testcases
Commit 1c7bf5d41737984907e8bad1dc832eb6cb1d6288 added the poisoning
of the newly freed memory in debug builds, exposing a logic
error in mask assignment code - it passed a pointer to
within a pool to a function which might potentially expand the pool.

This resulted in a failure of the test in the debug version.

Fix that by making a local copy of the value before passing
a pointer to it.

Change-Id: I73f3670672c3d86778aad0f944d052d0480cc593
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-08-09 15:45:03 +00:00
Yalei Wang
f7f4e399e0 Fix the fifo-size limitation in tcp_echo
Correct the size verification when send_test_chuck, tcp send process
will not be broken when avalable fifo queue size less then the
min_chuck.

Change-Id: Ide13169283c0311cf2fb18d2606bc869065a2a1b
Signed-off-by: Yalei Wang <william.wangyalei@huawei.com>
2018-08-09 15:17:54 +00:00
Ole Troan
eabd607d3a PAPI: Python 3.7 uses async keyword.
Change-Id: I01e99c85598a7cb5bc1a506c7fd1fc3f6789d72e
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-09 12:37:04 +00:00
Matus Fabian
68ba880792 NAT44: delete user with zero sessions (VPP-1282)
Change-Id: I756e3ad3de9ffe1494221ef95c1943c8591f8f50
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-09 11:59:19 +00:00
Eyal Bari
85a2555f0c bfd:fix NULL session free/put
Change-Id: If9f1f8c16c098c453bb53591e50a4cbd7cb192e4
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-08-09 11:58:14 +00:00
Juraj Sloboda
7528245795 Fix "Old Style VLA" build warnings
Change-Id: I8d42f6ed58ec34298d41edcb3d783e7e9ded3eec
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-08-09 07:34:25 +00:00
Korian Edeline
40e6bdfff7 fix typo in bitmap.h
Change-Id: I11587fc382a529cfd9c0971cc2ad59cd97dd6a13
Signed-off-by: Korian Edeline <korian.edeline@ulg.ac.be>
2018-08-08 16:51:47 +00:00
Neale Ranns
9da2e542c6 Remove unnecessary routes during vrf-multi-instances tests
Change-Id: I0a7fd0df90eff522366cb55ad224fe24a3121e56
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-08 14:08:17 +00:00
andrew
740302661b DOC ONLY: Add a new doc for integrating a plugin with VPP
Convert doxygen docs (vpp api module and binary api support) to .rst

Added a brief explanation of binary api message numbering for plugins

Change-Id: If7d37f29aa65a884b51f3d27957f80d1357ed29b
Signed-off-by: andrew <andrew.olechtchouk@gmail.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-08 11:42:00 +00:00
andrew
bcddab220f docs: Cleaned up a little removed instructions for mac.
docs: Updated section on using git-review

Change-Id: I180f67e3478b57b1de03df95fc67a0cfdd44dfb5
Signed-off-by: andrew <andrew.olechtchouk@gmail.com>
2018-08-07 20:50:30 +00:00
Dave Barach
ec954310e3 DOC ONLY: document bihash table walker rules
Change-Id: I0c48e0f4b87065d8f42009e2cc9709c6b7f5e851
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-07 15:27:22 -04:00
Dave Barach
28374cada0 Fix dangling reference in l2fib_scan(...)
Deleting a bihash kvp frees the bucket's backing storage when the
bucket reference count reaches zero. l2fib_scan MUST check for that
condition, and stop scanning the bucket if it occurs. One of the L2
FIB extended "make test" vectors caused this issue 100% of the time.

Change-Id: I250bcc4c1518e16042120fbc4032227a759a602e
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-07 18:05:23 +00:00
Florin Coras
e25c9bf62e api: compute msg table for private registrations
Change-Id: Ibaa236c09c2eeea72ee8a8cc603d407217b4af23
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-07 15:52:07 +00:00
Ole Troan
1d20f4748c PAPI: Move unit tests to fix packaging issues.
Change-Id: I67a0f168254367c657eb11d4413f9dc0c5356b3c
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-07 11:47:35 +02:00
Neale Ranns
a88c916e5d dlmalloc compiles errors with clang
of the form:
/home/nranns/Src/vpp/build-data/../src/vppinfra/dlmalloc.c:4327:7: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
  if (!(ms)->magic == mparams.magic) {
/home/nranns/Src/vpp/build-data/../src/vppinfra/dlmalloc.c:4696:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
  if (((ms)->magic == mparams.magic)) {

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

$ clang --version
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Change-Id: If6d70a87420bd54c8e1b8be1d9e9031f6c699c45
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-06 15:46:15 +00:00
Neale Ranns
6763a1d134 re-indent UDP encap documentation
Change-Id: Ieb53860769f511205bcd3f1605e76a80e65d4939
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-06 15:16:08 +00:00
Eyal Bari
4d2eb4ca81 dpdk-flow:fix raw item init
dpdk raw item match string changed from flexible array member to a
pointer member

Change-Id: I930f05112ce04b0cdb3feb985d755e730b102084
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-08-06 14:44:22 +00:00
Dave Barach
ca45ee73d7 fix dangling reference in foreach_key_value_pair
When the user deletes the last entry in a bihash bucket, the bihash
infra frees the bucket's backing storage. If this happens under
clib_bihash_foreach_key_value_pair - and the freed bucket happens to
be the bucket being traversed - the resulting dangling reference can
easily make the wheels fall off.

Simple fix: if (bucket-is-now-empty) double-break.

Change-Id: Idc44247a82ed5d0ba548507b4a53d4c8503ba8bb
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-06 08:44:59 -04:00
Florin Coras
466f289c27 socket api: multiple fds in one msg
Change-Id: I77a6e092a42290eed7201ad4a62e0d00ef997d2b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-04 16:00:32 +00:00
Ole Troan
e7a9b3d254 API: Remove legacy vlibsocket code.
The API implementation now supports Unix domain sockets.
The vlibsocket code has not been included in builds for
a long time and is superfluous.

Change-Id: I67a773d0e86e2318eacecf33f82d075553146ee9
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-03 17:40:05 +00:00
John DeNisco
c8e7f419fe Added missing file
docs: Incorporate Javier's progressive VPP tutorial

Change-Id: Iecee041039c7ed81713bc0530fc536e989c71497
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-08-03 17:38:40 +00:00
Ole Troan
b199e98fef PAPI: Union pad at the end of short fields instead of at head.
Hopefully that's going to be consistent across platforms, compilers and ABI.

Change-Id: I0b82565288d88fd046278d4d8288ec1488273ba5
Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-03 15:44:46 +00:00
Dave Barach
b257fc9fc2 Fix typo in trace trajectory init
plugin won't compile if VLIB_BUFFER_TRACE_TRAJECTORY is set. The
quad loop was OK, bug in single loop only.

Change-Id: I11262bf6a223680eeac7ed23238ceda425a02c1b
Signed-off-by: Dave Barach <dave@barachs.net>
2018-08-03 15:42:45 +00:00
Jakub Grajciar
248ff9280a avf: add avf_create_reply_handler to avf_test
Change-Id: I2f376a777081da131110227e760ca0069438c918
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-08-03 14:43:59 +00:00
Radu Nicolau
717de096c4 ipsec: add udp-encap option to debug cli commands
Change-Id: I3195afd952f6783da87224d7ceb9df13ddd39459
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2018-08-03 14:36:08 +00:00
Neale Ranns
ce9e0b4d48 loop counter to prevent infiinte number of look ups per-packet
Change-Id: I59235d11baac18785a4c90cdaf14e8f3ddf06dab
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-03 11:49:39 +00:00
Florin Coras
40f92469c6 vlib: avoid double process dispatch
Change-Id: I46467b1f149be9dfbd00e3ea6d60681d19acf235
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-08-03 09:12:02 +00:00
Florin Coras
c470e22f12 svm: add support for eventfd signaling to queue
Support the use of eventfds to signal queue updates between consumer
and producer pairs.

Change-Id: Idb6133be2b731fff78ed520daf9d2e0399642aab
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-03 09:11:41 +00:00
John DeNisco
c64ba6dc6a docs: Incororate Scott's overall review
Change-Id: Ic70a62e17891fa9291a5274400ae89f1d6194b6e
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-08-03 09:07:18 +00:00
Yichen Wang
5c482a9de3 Documentation fix on "set interface ip[6] table"
Change-Id: I8dc6230b65e57ddc07f974bf6726393d8dbfd4a2
Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-08-03 07:26:34 +00:00
Andrew Yourtchenko
0e10dd17b6 acl-plugin: fill in the 5tuple structure all at once, avoid short writes
This change avoids the long-read-after-short-write, resulting
in a small performance improvement.

Change-Id: Ic01d1fd19182e96100ccaf441d7ab5e5898b9734
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-08-03 01:18:13 +00:00
Damjan Marion
c76d6e2c4a Temporrary disable japi packaging for opensuse
To unbreak verify job, caused by following message:

19:06:58 RPM build errors:
19:06:58     File not found: /w/workspace/vpp-verify-master-osleap15/build-root/rpmbuild/BUILDROOT/vpp-18.10-rc0~105_g0578e3f9~b1992.x86_64/usr/share/java/*
19:06:58 make[2]: *** [Makefile:50: RPM] Error 1
19:06:58 make[2]: Leaving directory '/w/workspace/vpp-verify-master-osleap15/extras/rpm'
19:06:58 make[1]: *** [Makefile:476: pkg-rpm] Error 2
19:06:58 make[1]: Leaving directory '/w/workspace/vpp-verify-master-osleap15'
19:06:58 make: *** [Makefile:541: verify] Error 2
19:06:58 Build step 'Execute shell' marked build as failure

Change-Id: Ie1300cbf70bedb9dd861a3f31feeddf1eb810eaf
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-02 23:39:18 +02:00
Florin Coras
9686eacfa4 vcl: fix debug messages output before heap cfg
Change-Id: Ifaef7ab2bc2fd4f5b4822d894facbcae01849031
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-02 20:12:00 +00:00
Matus Fabian
c6c0d2a077 NAT44: LB NAT - local backends in multiple VRFs (VPP-1345)
Add support for local backends in multiple VRFs for load-balancing NAT rules.

Change-Id: I64e6818bd67a7e69985003498cf1f16f7200c334
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-02 17:17:47 +00:00
Yi He
e4a9eb7873 Improve cpu { coremask-% } configure option
Accept any sized hexadecimal bitmask specification to
support platforms with hundreds of cores.

Change-Id: Ib881db0cf60f78bdeffa13acfc2fc7fe7e128cc4
Signed-off-by: Yi He <yi.he@arm.com>
2018-08-01 20:41:04 +00:00
Damjan Marion
cc4a5e8089 Move java api to extras/
Change-Id: Ibd5cbbdfb22a235442cddaebc9eae9a3c4e35ec9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-01 20:28:53 +00:00
John DeNisco
a14c166740 docs: change code blocks from "shell" to "console"
Change-Id: I136fccfc06e07fb68d11df686c59687362fb8827
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-08-01 20:21:23 +00:00
Eyal Bari
e126cc5331 vxlan:optimize cached entry compare
the bihash key compare was doing the extra step of loading both keys into
vector regs and comparing those - instead of using the temporary values
created.

Change-Id: Ic557bfa56cd6aa60c71e7f28c880f85e1eb1e6ec
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-08-01 18:37:57 +00:00
Damjan Marion
5f21e1bd61 Store USE_DLMALLOC in vppinfra/config.h
Change-Id: Ib596e7f525b83dc7e830bcf6a126cd210216ce86
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-01 14:39:58 +02:00
Sirshak Das
afc725afae Add support for shuffle vector intrinsic via Neon in ARM
This adds byte_swap (variant of shuffle) and shuffle vector intrinsic
for ARM based on Neon, concuring with same signature as SSE vector
intrinsic.

Change-Id: I386fd2b1dcc83654e4ad9f90a6065d7736e4ce5c
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
2018-08-01 10:52:56 +00:00
Dave Barach
1c7bf5d417 Poison freed memory objects
When compiled w/ -DCLIB_DEBUG=1, paint 0x13 across freed memory
blocks. Should result in a characteristic SIGSEGV if someone
dereferences a pointer in a freed vector element, etc.

Change-Id: I5f78970f4342310bfbe7adeddb56feff21f0de2c
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-31 20:37:47 +00:00
Eyal Bari
7d92c09b55 vxlan:decap.c conform coding style
Change-Id: I7bab9800c267dd6ea85288fd3d9ca88dff9f554b
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-31 17:22:17 +00:00
Yi He
d05ce97724 Fix undefined symbol: fformat_append_cr in vat plugins loading
Several test plugins report undefined symbol while being loaded
by load_one_vat_plugin. Fix this by adding VPP_API_TEST_BUILTIN
into CFLAGS for building these plugins.

Change-Id: I908720fd0d01da1ead30ba17027ba10358f6bdf1
Signed-off-by: Yi He <yi.he@arm.com>
2018-07-31 14:07:19 +00:00
Jakub Grajciar
15c3a6ad80 memif: socket filename fix
create runtime dir when adding default socket filename.

Change-Id: Iad7e751fcab7ce773e0907302414a06ea44dd6cd
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-07-31 14:05:41 +00:00
Andrew Yourtchenko
937c089ab7 acl-plugin: move the acl epoch calculation into inline function
Change-Id: Ifc8b3d30d66c7ade1e3584844ce3f82d42d2fb94
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-07-31 11:38:32 +00:00
Neale Ranns
16be62e384 fix 'sh vxlan tunnels'
this receipe:
  /* Get a line of input. */
  if (!unformat_user (input, unformat_line_input, line_input))
    return 0;
only works if there is more data following the registered command name.
So it is not so good for show commands...

Change-Id: I54249865a44526ade4b40e2d6207138a2d056e40
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-31 11:37:16 +00:00
Florin Coras
460dce6e2d vcl: add read/write udp support
Change-Id: Ie6171c12055cde6915856de340839f5da1b1b1da
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-31 11:36:54 +00:00
Ed Warnicke
e939bf1b50 Update Release Notes for 18.07 Release
Change-Id: I2b58bca6d360badb4fd17022121e244aee5713b8
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2018-07-30 21:33:07 +00:00
Neale Ranns
579092c4ba SIXRD: fix post introduction of the directed subnet broadcast
Change-Id: I9ce801e9b257eaa6be0cbe2ad3bfe630717f8c67
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-30 20:04:28 +00:00
Neale Ranns
c5d4317ad0 FIB: return entry prefix by const reference to avoid the copy
Change-Id: I09b8406168df4b6b28df3ede24ee839681be0195
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-30 08:04:40 -07:00
Rajesh Saluja
1f895c9a40 Reverse the logic of flagging malformed packet in fragmentation code to allow padding
Change-Id: I051c137ae18fd436a798a12a56a9d12f8eaa2e08
Signed-off-by: Rajesh Saluja <rajsaluj@cisco.com>
2018-07-30 11:22:59 +00:00
Florin Coras
d3ca8ffd0f session/dlmalloc: coverity fixes
Change-Id: I17ffec018f5d2fb06a7a3af6d8bc6128ffee3ae6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-28 04:53:30 -07:00
Florin Coras
d055475773 dlmalloc: use static magic constant for debug images
Avoids crashes on restarts if svm root region backing file was not
cleaned up.

Change-Id: I608cf5711aa8c3f9620900473bdf76bde8b918de
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-27 11:39:14 -07:00
Dave Barach
cd2190e124 Fix build-break when compiling -O0 / TAG=vpp_debug
Without inlining [TAG=vpp_debug], gcc7 (at least) refuses to produce
the indicated vector unit instruction.

Change-Id: I0f0400ad74b1e498dce7963a85c47d33afe0a768
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-27 20:07:05 +00:00
Florin Coras
54693d2330 vcl: use events for epoll/select/read/write
Have vcl poll and wait on the event message queues as opposed to
constantly polling the session fifos. This also adds event signaling to
cut through sessions.

On the downside, because we can't wait on multiple condvars, i.e., when
we have multiple message queues because of cut-through registrations, we
do timed waits.

Change-Id: I29ade95dba449659fe46008bb1af502276a7c5fd
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-27 17:40:29 +00:00
Damjan Marion
5df580eec9 128-bit SIMD version of vlib_get_buffers
Change-Id: I1a28ddf535c80ecf4ba4bf31659ff2fead1d8a64
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-27 14:15:50 +00:00
Carl Smith
28d4271d1a mips64: Add timer and longjump support
Also correct types.h for mips64 which could never be hit
as _mips was part of the previous ifdef.

Change-Id: Id0435c8fc960c5d25c43129b9d9f1606e39ba8e3
Signed-off-by: Carl Smith <carl.smith@alliedtelesis.co.nz>
2018-07-27 12:04:37 +00:00
Neale Ranns
fc5dda3d0a vector indicies walk in reverse
Change-Id: Iddc8a940601230f8b209c5601e4e5bd04b103c6a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-27 12:02:44 +00:00
Juraj Sloboda
d7f58cc4f0 Fix memory leak in processing of ICMPv6 RA event (VPP-1360)
Change-Id: I7c3e5e91391b1c9b36e8ea8bacee9a107da1ae96
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-07-27 11:24:05 +02:00
Dave Barach
db0a7ec72a -DCLIB_DEBUG => turn on extra checks in dlmalloc
Also: call os_panic() on a heap botch crash, attempt to generate a
post-mortem API dump, etc.

Add an "ugly" test case to vec_test.c, to cause a configurable block
overrun.

Change-Id: I7b29a7645277f9e485e06ff83335306fedc24b71
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-27 07:50:11 +00:00
John DeNisco
2d1a04371a Fix .gitignore so docs/Makefile is not ignored. Add README and Makefile. Fis gitreview.
Change-Id: I3d664d9c881ce127a09b9d68c1181a7098a39074
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-07-27 00:13:36 +00:00
Brian Brooks
9bae0ca53b pp2: change default queue size
Reduce default queue size to twice the vlib frame size. This throttles
the PP from transferring more packets than are necessary for the next
round of graph execution on a core. When combined with DMA'ing into L3
cache, Mpps for 64B packets increases 35%.

Change-Id: I0afe426d23560f262fdc56accb6302b099bd0076
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
2018-07-26 20:18:12 +00:00
Dave Barach
f91080c011 Clean up dpdk plugin rx/tx pcap tracing
Needed a spinlock to protect the data vector. Cleaned up debug cli so
the output makes sense, and so that various parameters exist in one
place. Removed a nonsense memset-to-zero which led to ultra-confusing
results.

Change-Id: I91cd14ce7fe84fd2eceab86e016b5ee001993be4
Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-07-26 19:24:32 +00:00
Dave Barach
9594b56e6f Improve the sample plugin node dispatch function
Three separate implementations, which vary by nearly a factor of two
in performance. Most of the performance difference is due to swapping
the src/dst mac addresses with an avx2 vector shuffle instruction.

Change-Id: Ieb36546d6074e4ac720d452a99d013c698135c57
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-26 19:09:14 +00:00
John DeNisco
06dcd45ff8 Initial commit of Sphinx docs
Change-Id: I9fca8fb98502dffc2555f9de7f507b6f006e0e77
Signed-off-by: John DeNisco <jdenisco@cisco.com>
2018-07-26 18:34:47 +00:00
Neale Ranns
1d65279ffe VPP-API client: timeout thread loop variable
calling thread cancel on the timeout thread whilst it was
sleep on condwait and then send the cond signal did not reliably
wake up the thread.
instead don;t cancel the thread, use a loop variable to terminate it.

Change-Id: Ibc8ab6f21db7e4a98266bdf88b8b208b887820dd
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-26 08:05:57 -07:00
Lukasz Majczak
b842ae1178 VPP-1359 Wrong vl_msg_id
Wrong vl_msg_id set in vl_api_stats_get_poller_delay_t_handler while reporting stats delay.

Change-Id: I7d6ad14359e41c717b976390c58e254e3602e0ff
Signed-off-by: Lukasz Majczak <lma@semihalf.com>
2018-07-26 14:16:13 +00:00
Damjan Marion
c4b094eae0 avf: used tx queue should be enabled
Change-Id: I51cc4522df2dd6682148a13e7e1903850b4b3d08
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-26 12:25:32 +00:00
Damjan Marion
48a87f2c95 vppinfra: add SSE4.2 version of u8x16_shuffle
Change-Id: I4bf1cfe5a9492092a7362675079c47629b6f0ee8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-26 10:58:52 +00:00
Jakub Grajciar
ae9118055f avf: request queues support
Change-Id: I3a4529ff8dae70da99ec95c39ddf788c9498f478
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-07-26 10:58:27 +00:00
Neale Ranns
055b231d25 L2 Flood: use the buffer clone API rather than buffer recycle
Change-Id: I40e4efd8061369efc535f0d49b2f63668b6d1d15
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-26 09:15:54 +00:00
Damjan Marion
351b3a0c3e avf: fix interrupt mode
- assign rx thread on interface create, not on admin up
- keep interrupts unmasked all the time as they are needed for writeback
- forward interrupt to graph dispatcher only if queue is in the interrupt mode

Change-Id: I5cc5afe24960143bef08f12d59fbd80ae0c6ccf8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-26 07:19:56 +00:00
Neale Ranns
3451d98550 Generate vppinfra/config.h from config.in script (same as we do for vlib/config.h)
Change-Id: I55549b589e34a62d3704f788fce801392de22f46
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-25 21:46:26 +00:00
Jakub Grajciar
605afa0cd9 VPP-1332 memif: add/del socket filename bugfix
in case of relative path, create subdirs inside runtime dir.
in case of absolute path, if folder does not exist return error.

Change-Id: I01fe018102c69deb105160cfa18b741541d76c82
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-07-25 19:58:45 +00:00
Jakub Grajciar
4e6014fc9e avf: api fix
avf_create_reply returns software index for the new interface

Change-Id: I8a6b1a1985b072efafa24eb258b1f2cb1bea1110
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-07-25 12:05:29 +00:00
Jan Gelety
e8b68a3da2 make_test: Add equal-cost multi-path routing tests
Jira: CSIT-1181

Change-Id: I78f85cf58696369070314bdf05ae8b3acf2ca84c
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-07-25 08:06:12 +00:00
Dave Barach
8b5dc4fd5e Create a unit-test plugin
Move the tcp unit test to the plugin
Add a bihash unit test and a "make test" program to call it
Adjust framework.py to load the plugin, which is disabled by default

Change-Id: Ic229d386a56a9d28dbd54974f231149053ca8f93
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-24 16:45:53 +00:00
Neale Ranns
1678236897 test frame work pump thread exit: set flag then wake
Change-Id: Id95b8a7ad1bf550f615c50d77b16a530cc8fc2c4
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-24 16:44:52 +00:00
Ping Yu
006e6f8add tls: avoid possible async handler duplication
One handler is good enough when engine sends out a retry status
Thus this patch will just go one branch

Change-Id: Id81cb3fa67d2b322b0fe1b2f62cd866cf3491eb4
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-07-23 22:18:19 +00:00
Florin Coras
8409955e4b session: send rx events only if session ready
Change-Id: I8d631121b104fb40c20701d4c1b428f2b71e5785
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-23 20:23:58 +00:00
Neale Ranns
6b9b41c832 L2 EFP: byteswap sw_if_index, enable flag can be u8 on .api
Change-Id: Ib99d02e84e468726feae4c386733da405b298e4f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-23 19:58:46 +00:00
Matus Fabian
c79396e1f8 NAT44: fix forwarding feature bug (VPP-1349)
Change-Id: I5009fcfde5c627d59dea3edda15486b9392134a2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-07-23 19:38:46 +00:00
Neale Ranns
5b8ed986f9 Buffer clone: copy opaque2
Change-Id: I06e1dbfa0782bc03f2d0e77295b38b4fde7df35e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-23 19:37:34 +00:00
Dave Barach
66446b9888 Update pipeline.h: use vlib_get_buffers
It's not clear that fine-graind pipelining will ever produce optimal
performance. That having been written, it's an easier coding model for
folks interesting in decent results without having to manually
implement 2 or 4 way fine-grained parallelism.

Change-Id: Ida877292832eaf759ffbb6d2e16012f8fbd427e5
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-23 18:28:43 +00:00
Eyal Bari
cd30774fa9 fix vector index range checks
Change-Id: I63c36644c9d93f2c3ec6606ca0205b407499de4e
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-23 15:37:01 +00:00
Neale Ranns
b7d41fc18e make test-ext: a new test target that builds VOM (existing one no longer do)
Change-Id: If590e90b2a1c3b884863ec15a92ea4353ac9eb7c
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-22 21:16:55 +00:00
Dave Barach
78451a6a66 Loopback tx: support multiple tx intfcs per frame
Can happen if code bypasses the per-interface output node, and
dispatches packets directly to the tx node.

Switch to vlib_get_buffers(...) ... vlib_buffer_enqueue_to_next (...),
quad/single loop coding pattern.

Change-Id: Ic0e5d3b9748230f4e545a54186e6e64e7a782bb1
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-21 16:11:51 -04:00
Matthew Smith
e375067142 fix IP directed broadcast node declarations
The dev build ('make build') was failing because
ip4_rewrite_bcast() and ip6_rewrite_bcast() are declared static
and were not referenced.

The node functions that were set for directed broadcast rewrite:

ip4_rewrite_bcast_node - ip4_rewrite()
ip6_rewrite_bcast_node - ip6_rewrite()

Changed to:

ip4_rewrite_bcast_node - ip4_rewrite_bcast()
ip6_rewrite_bcast_node - ip6_rewrite_bcast()

The release build ('make build-release') succeeds because there is
a VLIB_NODE_FUNCTION_MULTIARCH() call referencing the function. That
macro is empty for dev builds.

Change-Id: I2a05f00ca43d0eae8ff2e3026991e69917003fe1
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-21 11:56:10 +00:00
Damjan Marion
2a03efe4c2 bihash: give hint to CPU that we are spinlocking
Change-Id: I78c0a6da5d8fc63c1ced43589c42abc15ab12b16
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-20 21:48:59 +02:00
Damjan Marion
78fd7e810c Add congestion drop in interface handoff
This prevents deadlock in case when worker A sends to B and worker B
sends to A

Change-Id: Id9436960f932c58325fe4f5ef8ec67b50031aeda
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-20 19:43:36 +02:00
Dave Barach
508498f74d Fine-grained add / delete locking
Add a bucket-level lock bit. Use a spinlock only when actually
allocating, freeing, or splitting a bucket. Should improve
multi-thread add/del performance.

Change-Id: I3e40e2a8371685457f340d6584dea14e3207f2b0
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-20 17:38:35 +00:00
Damjan Marion
13637632b8 physmem: fix alloc when dlmaloc is used
Change-Id: I4b6cdf95ac694c8408eb6cf3259b335a8148b5aa
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-20 17:38:22 +00:00
Damjan Marion
3e13c092a5 fix issue with missing sample_main in sample plugin
Change-Id: Ia17511e3997cdcf1d0991e62e8e2d3fb8812d133
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-20 15:32:19 +00:00
Neale Ranns
8d753f906e QOS: mark/record fix feature ordering c-n-p error
vnet_feature_arc_init:215: feature node 'mpls-qos-mark' not found (after 'vlan-mpls-qos-record', arc 'mpls-input')
vnet_feature_arc_init:215: feature node 'ip6-qos-mark' not found (after 'vlan-ip6-qos-record', arc 'ip6-multicast')
...etc...

Change-Id: I22cb98d57e2480f5978fff315b77b9cbb6a9f9dd
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-20 13:21:17 +00:00
Neale Ranns
1855b8e48d IP directed broadcast
with ip direct broadcast enable a packet to the interface's
subnet broadcast address with be sent L2 broadcast on the
interface. dissabled, it will be dropped. it is disabled by
default, which preserves current behaviour

Change-Id: If154cb92e64834e97a541b32624354348a0eafb3
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-20 13:21:03 +00:00
Damjan Marion
631de0dffe avf: don't enable interrupts before interface is admin up
Change-Id: I0fc19dd109e569f2c407a85e8fa32758e06676b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-20 13:06:08 +02:00
Matus Fabian
4994958e5c NAT44: in+out interface in STN setup improvement (VPP-1344)
Change-Id: Iad7e0337a577ef8a0dfb7bde1968cc115d176043
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-07-20 09:33:07 +00:00
Neale Ranns
0809f6c030 QoS: marking and recording for MPLS and VLAN
Change-Id: Icec79aa9039d5d7835d311fde0b7c1a0c76c9eb1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-20 09:32:52 +00:00
Steven
c34b2e0f7c avf: Support interrupt mode
DBGvpp# set interface rx-mode AVF0/4/2/0 interrupt
set interface rx-mode AVF0/4/2/0 interrupt
DBGvpp# sh int rx
sh int rx
Thread 0 (vpp_main):
  node dpdk-input:
    FortyGigabitEthernet6/0/0 queue 0 (polling)
  node avf-input:
    AVF0/4/2/0 queue 0 (interrupt)
DBGvpp# sh int addr
sh int addr
AVF0/4/2/0 (up):
  L3 133.1.1.10/24
FortyGigabitEthernet6/0/0 (dn):
VirtualEthernet0/0/0 (up):
  L3 192.168.42.1/24
DBGvpp# clear run
clear run
DBGvpp# clear interfaces
clear interfaces
DBGvpp# sh int rx
sh int rx
Thread 0 (vpp_main):
  node dpdk-input:
    FortyGigabitEthernet6/0/0 queue 0 (polling)
  node avf-input:
    AVF0/4/2/0 queue 0 (interrupt)
DBGvpp# ping 133.1.1.3 repeat 1
ping 133.1.1.3 repeat 1
64 bytes from 133.1.1.3: icmp_seq=1 ttl=64 time=.6237 ms

Statistics: 1 sent, 1 received, 0% packet loss
DBGvpp# sh int
sh int
              Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     Counter          Count
AVF0/4/2/0                        5      up          9000/0/0/0     rx packets                     1
                                                                    rx bytes                      98
                                                                    tx packets                     1
                                                                    tx bytes                      98
                                                                    drops                          1
                                                                    ip4                            1
FortyGigabitEthernet6/0/0         1     down         9000/0/0/0
VirtualEthernet0/0/0              2      up          9000/0/0/0
local0                            0     down         9000/0/0/0
DBGvpp# sh run
sh run
Time 41.9, average vectors/node 1.00, last 128 main loops 0.00 per node 0.00
  vector rates in 2.3858e-2, out 2.3858e-2, drop 2.3858e-2, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
AVF0/4/2/0-output                active                  1               1               0          1.24e4            1.00
AVF0/4/2/0-tx                    active                  1               1               0          4.28e4            1.00
api-rx-from-ring                any wait                 0               0               2          6.94e4            0.00
avf-input                     interrupt wa               1               1               0          1.09e4            1.00
avf-process                     any wait                 0               0              47          1.01e4            0.00
...
DBGvpp#
DBGvpp# set interface rx-mode AVF0/4/2/0 polling
set interface rx-mode AVF0/4/2/0 polling
DBGvpp# sh int rx
sh int rx
Thread 0 (vpp_main):
  node dpdk-input:
    FortyGigabitEthernet6/0/0 queue 0 (polling)
  node avf-input:
    AVF0/4/2/0 queue 0 (polling)
DBGvpp# ping 133.1.1.3 repeat 1
ping 133.1.1.3 repeat 1
64 bytes from 133.1.1.3: icmp_seq=1 ttl=64 time=.2038 ms

Statistics: 1 sent, 1 received, 0% packet loss
DBGvpp#

Change-Id: Ib7d2b505ae4bb74a052263af766ca37d9df7bfe4
Signed-off-by: Steven <sluong@cisco.com>
2018-07-20 09:30:50 +00:00
Dave Barach
ed2fe93fd1 Fix coverity warning / legitimate minor bug
Of the form "if ((foo & 0x10) == 1)", as opposed to
"if (foo & 0x10)"

Change-Id: I6a6d276aeed4af7c1c6c78546ee68d598d54d7db
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-19 23:20:29 +00:00
Matthew Smith
3a9702a05f dpdk: eliminate vpp-dpdk-devel RPM conflict
Both vpp-devel and vpp-dpdk-devel have /usr/include/dpdk
in their files list. CentOS 7 won't allow them to both be
installed at the same time as a result.

Change vpp-dpdk-devel to /usr/include/dpdk/* so both can
be installed. It is useful to have both installed on a
development system.

Change-Id: I94b6cca299dfbd991638e43c41006db0d8f7ee8b
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-19 22:34:17 +00:00
Matthew Smith
88dbf98fe7 dpdk: fix Mellanox Connect-X3 VF ID
Fix a typo from previous patch. Change 0x104 to 0x1004.

Change-Id: I82230a8a0ec01567eb1d4bc12ac02062c2a98347
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-19 22:33:12 +00:00
Marek Gradzki
7064c338f1 test_jvpp: improve error message when JVpp JARS are missing
The java command fails with missing class error,
when some of the JARs given by -cp are missing,
which may be missleading.

This patch fixes that by adding os.path.isfile check to test_jvpp.py.

Change-Id: I3a0b6ef338c7f70cfd0ba78ee0888efe0b0957b3
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2018-07-19 22:31:45 +00:00
Damjan Marion
7d98a12f29 Remove unused argument to vlib_feature_next
Change-Id: Ieb8b53977fc8484c19780941e232ee072b667de3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-19 22:31:11 +00:00
Florin Coras
3d0fadc01f session: coverity warnings
Change-Id: I4505954c737e8c6a3d4177c6833f2b12099e6dd4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-19 21:15:28 +00:00
Ping Yu
970a0b87bb Add a new communication channel between VPP and openssl engine
Thus when engine buffer is full during a burst in performance
tesing, this code will help VPP handle retry machansim.

Change-Id: I0f9fc05d3dba8a54d34dca4c6137700d6c80f714
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-07-19 18:32:54 +00:00
Damjan Marion
4d56e059f7 Cleanup of handoff code
- removed handoff-dispatch node
- removed some unused buffer metadata fields
- enqueue to thread logic moved to inline function

Change-Id: I7361e1d88f8cce74cd4fcec90d172eade1855cbd
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-19 18:26:01 +00:00
Eyal Bari
a17158b872 qos record:fix disable on interface delete
handle the case where qos record was enabled more than once

Change-Id: Ic901b2f5b400751e82d57655983d10457ec62243
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-19 18:02:43 +00:00
Neale Ranns
8a03e4f979 ip4-input and ip4-input-no-checksum should be siblings
each edge/arc from these nodes must be the same.

Change-Id: Id5dace61bca0af71ad1df98583425226e81fd0de
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-19 15:25:24 +00:00
Damjan Marion
005849ec34 Set default STARTUP_DIR to be toplevel dir
Change-Id: I5ccc5f1770ab1f8fb9c4824395f4ee6d48346410
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-19 15:24:56 +00:00
Andreas Schultz
e73b6b7bac Fix IPv6 csum calculation in GTP-U encapsulation
The length field is included in the checksum. Therefor, we need
to update it before calculating the checksum.

Change-Id: Id23234efb80ea3747a0f8a5c7bf8621748d27635
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
2018-07-19 14:02:19 +00:00
Matthew Smith
43f02bb8a7 dpdk: set log write fd to non-blocking
If a PMD writes too many log messages using rte_vlog(), the
pipe for logging can fill and then rte_vlog() will block
on fflush() while it waits for something to read from the other
side of the pipe. That will never happen since the process node
that would read the other side of the pipe runs in the
same thread.

Set the write fd to non-blocking before the call to
rte_openlog_stream(). If the pipe is full, calls to write() or
fflush() will fail but execution will continue.

Change-Id: I0e5d710629633acda5617ff29897d6582c255d57
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-19 12:47:35 +00:00
Matthew Smith
25668c899e dpdk: add device IDs for Mellanox ConnectX-3
Recognize the PF and VF device IDs for the Mellanox adapter
used on Azure.

Change-Id: Ic7b36b37ac93db2b696354ffe6fa2b6d62ee3801
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-07-19 12:47:17 +00:00
Ole Troan
2a7563b024 PAPI: Remove logging calls from pack/unpack
This slowed down the decoder. Improved from 16s to 13s for 1000 dump/details
messages.

Change-Id: Iae78136b020cdd9344f3b2170ce426d0f074b6e6
Signed-off-by: Ole Troan <ot@cisco.com>
2018-07-19 12:17:22 +00:00
Mohsin Kazmi
22b3b84682 gbp: Add support for ACL
Change-Id: I7513c41307e62068ab5d9739cac393675c6066f8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-07-19 07:51:32 +00:00
Eyal Bari
07f3586c5a qos mark/record: fix disable-sw_if_index range check
Change-Id: I2abb3ceebae3a32cee9aa2a999bd47c37719d3ac
Signed-off-by: Eyal Bari <ebari@cisco.com>
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-07-18 21:09:35 +00:00
Marco Varlese
400378f056 DPDK: coverity scan warnings
This patch addresses the coverity scan warnings reported for the DPDK
plugin.

Change-Id: Ie7ac7ffcf4a6c63245eae0f9910a193ab1e318a8
Signed-off-by: Marco Varlese <marco.varlese@suse.de>
2018-07-18 18:54:56 +00:00
Florin Coras
e91bdb3783 svm: make message queue more compact
Change-Id: Id45957163c2b95a2300a8ac9104fc92b9cc928ed
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-18 18:54:07 +00:00
Ed Warnicke
19668e8a39 Change configure.ac to match the release tag on master
Change-Id: I7e53b563fb801dd8508af47452ad44d4837cb68d
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2018-07-18 07:53:08 -05:00
Dave Barach
6a5adc3695 Add config option to use dlmalloc instead of mheap
Configure w/ --enable-dlmalloc, see .../build-data/platforms/vpp.mk

src/vppinfra/dlmalloc.[ch] are slightly modified versions of the
well-known Doug Lea malloc. Main advantage: dlmalloc mspaces have no
inherent size limit.

Change-Id: I19b3f43f3c65bcfb82c1a265a97922d01912446e
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-18 12:09:42 +00:00
Jan Gelety
2a3fb1a28b make_test: dhcp - add lease time test and wrong XID in OFFER test
- negative test with wrong XID in OFFER not implemented as issue
  reported in Jira ticket VPP-99 still not fixed

Jira: CSIT-1147

Change-Id: I4ebc622bd81fed421919bc0397a12e32cb26fa1d
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2018-07-18 08:31:33 +00:00
Klement Sekera
8aedf5e287 vpp-api: improve naming for easier debugging
Change-Id: I487ccf2adabfbd22dac9f492ecff679d38046724
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-07-18 08:30:47 +00:00
Hongjun Ni
54d0ac39f7 VPP crash when run "lb set interface nat4 in <intc>" VPP-1343
Change-Id: I23be9c29227e7dd1bb11b5b7fa910bb61c2be6c9
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
(cherry picked from commit b4b2488202ff4282cc4a7bd779cc33934286c5cd)
2018-07-18 04:41:09 +00:00
Andreas Schultz
d6dfd00232 Fix GTP-U length header field in encoding
The length in the GTPU header does not specify the length of the
payload. It does specify the number of bytes following the fixed
part (the first 8 bytes) of the GTPU header (see 3GPP TS 29.060,
Sect. 9.3.1).

Change-Id: I8ce73df015e1cf1f38d306666962c0058756111c
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
2018-07-18 04:39:56 +00:00
Andreas Schultz
96cc67dd80 Fix GTP-U header in 4x IPv4 vector encapsulation
The fourth GTP-U packet had a wrong reference, leading to data
corruption.

Change-Id: Id82f87368183d5e8b7047133c5ea799f2a9cb43c
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
2018-07-18 01:39:15 +00:00
Damjan Marion
882fcfe6f0 vppinfra: increase max bihash arena size to 512GB
Change-Id: Ic636297df4c03303fdcb176669f0268d80e22123
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-18 00:03:55 +00:00
Damjan Marion
96f40a0563 memif: vectorized buffer enqueue in input node
Change-Id: If6970788396c85415634f12304f49eed0d812281
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-17 21:27:13 +00:00
Neale Ranns
6a0f7dd302 Bump the VPP version in configure.ac
How many engineers does it take to change a lightbulb?

Change-Id: I28a34e0ae49ce4f95b12a342c4664198a20f4574
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-17 16:46:32 -04:00
Eyal Bari
b52c034c7d loopback:fix delete to check interface class
Change-Id: Ia563b279e85b5da93f79db5a2a4d9b8c04f5be99
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-07-17 15:26:22 +00:00
Florin Coras
52207f1b7b session: send ctrl msg over mq
Change-Id: I242056bc46ddb671064665916b2687860292dcb2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-17 09:02:17 +00:00
Florin Coras
3c2fed5145 session: use msg queue for events
Change-Id: I3c58367eec2243fe19b75be78a175c5261863e9e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-17 09:02:17 +00:00
Florin Coras
5da96a77a8 session: make sure segment sizes are page aligned
Change-Id: Ibbba75d069ca1bbf9e5a1b8bd2f405d32021c656
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-07-17 09:01:46 +00:00
Neale Ranns
208c29aac5 VOM: support for pipes
Change-Id: I5c381dfe2f926f94a34ee8ed8f1b9ec6038d5fe2
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-07-17 08:53:33 +00:00
Neale Ranns
4faab21a75 Adjacency-BFD: assume BFD down on create
Change-Id: I13279a1a96df457209fb25748a643c01b18ff4e0
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-07-16 18:14:00 +00:00
Andrew Yourtchenko
15dff72342 acl-plugin: fix coverity errors 186574,186575,186576,186577,183451
Fix the copypaste-triggered errors in load-from-file ACL test code.
Also, add an explicit exit(1) after clib_error() to convince coverity
that code path is terminal indeed.

Change-Id: I1deedb49144559c9183449005ada0433c24db18a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-07-16 17:13:41 +00:00
Damjan Marion
4fce7f73e7 vppinfra: AVX2 interleave functions
Change-Id: I8688f700fccd87484da3e202ca3a070cc14eb267
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-16 14:55:07 +00:00
Ping Yu
cd2fc207cf Enable openssl TLS async support in client for HW accleration
Change-Id: I003e41786c549c6451a1e9e178f5871d32c20e6e
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-07-16 06:09:35 -04:00
1487 changed files with 106299 additions and 40363 deletions

15
.gitignore vendored
View File

@ -21,10 +21,11 @@
/build-root/vapi_test/
/build-root/vom_test/
/build-config.mk
/dpdk/*.tar.gz
/dpdk/*.tar.xz
/dpdk/vpp-dpdk*.deb
/dpdk/vpp-dpdk*.changes
/build/external/*.tar.gz
/build/external/*.tar.xz
/build/external/vpp-*.deb
/build/external/vpp-*.changes
/build/external/downloads/
/path_setup
/tools/
# start autotools ignore
@ -66,7 +67,6 @@ test-driver
.cproject
.pydevproject
.vscode/
CMakeLists.txt
cmake-build*/
# cscope and ctags
@ -82,6 +82,9 @@ GTAGS
/build-root/docs
/build-root/.doxygen-bootstrap.ok
/build-root/.doxygen-siphon.dep
/docs/_build
/sphinx_venv
!/docs/Makefile
# indent backup files
*.BAK
@ -101,4 +104,4 @@ GTAGS
/src/scripts/vppctl-cmd-list
# No core files
**/core
**/core

View File

@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/1810

106
INFO.yaml Normal file
View File

@ -0,0 +1,106 @@
---
project: 'vpp'
project_creation_date: '2015-12-08'
project_category: ''
lifecycle_state: 'Incubation'
project_lead: &vpp_ptl
name: 'Dave Barach'
email: 'openvpp@barachs.net'
id: 'dbarach'
company: ''
timezone: ''
primary_contact: *vpp_ptl
issue_tracking:
type: 'jira'
url: 'https://jira.fd.io/projects/vpp'
key: 'VPP'
mailing_list:
type: 'groups.io'
url: 'https://lists.fd.io/g/vpp-dev'
tag: '<[sub-project_name]>'
realtime_discussion:
type: 'irc'
server: 'freenode.net'
channel: 'fdio-vpp'
meetings:
- type: 'zoom'
agenda: 'n/a'
url: 'https://wiki.fd.io/view/VPP/Meeting'
server: 'n/a'
channel: 'fdio-vpp'
repeats: 'weekly'
time: '08:00 PT'
repositories:
- 'vpp'
committers:
- <<: *vpp_ptl
- name: 'Keith Burns'
company: 'gmail'
email: 'alagalah@gmail.com'
id: 'alagalah'
timezone: ''
- name: 'Chris Luke'
company: 'comcast'
email: 'chris_luke@comcast.com'
id: 'chrisluke'
timezone: ''
- name: 'Dave Barach'
company: 'barachs'
email: 'openvpp@barachs.net'
id: 'dbarach'
timezone: ''
- name: 'Damjan Marion'
company: 'cisco'
email: 'damarion@cisco.com'
id: 'dmarion'
timezone: ''
- name: 'Dave Wallace'
company: 'gmail'
email: 'dwallacelf@gmail.com'
id: 'dwallacelf'
timezone: ''
- name: 'Florin Coras'
company: 'gmail'
email: 'florin.coras@gmail.com'
id: 'florin.coras'
timezone: ''
- name: 'Ed Warnicke'
company: 'gmail'
email: 'hagbard@gmail.com'
id: 'hagbard'
timezone: ''
- name: 'John Lo'
company: 'cisco'
email: 'loj@cisco.com'
id: 'lojohn'
timezone: ''
- name: 'Marco Varlese'
company: 'suse'
email: 'marco.varlese@suse.de'
id: 'marco.varlese'
timezone: ''
- name: 'Neale Ranns'
company: 'cisco'
email: 'nranns@cisco.com'
id: 'nranns'
timezone: ''
- name: 'Ole Trøan'
company: 'employees'
email: 'otroan@employees.org'
id: 'otroan'
timezone: ''
- name: 'Sergio Gonzalez Monroy'
company: 'outlook'
email: 'sergio.gonzalez.monroy@outlook.com'
id: 'smonroy'
timezone: ''
tsc:
# yamllint disable rule:line-length
approval: ''
changes:
- type: 'removal'
name: ''
link: ''
- type: 'promotion'
name: ''
link: ''

View File

@ -28,6 +28,11 @@ Doxygen
M: Chris Luke <chrisy@flirble.org>
F: doxygen/
Sphinx Documents
M: John DeNisco <jdenisco@cisco.com>
M: Ray Kinsella <raykinsella78@gmail.com>
F: docs/
DPDK Development Packaging
M: Damjan Marion <damarion@cisco.com>
F: dpdk/
@ -46,7 +51,6 @@ VLIB API Libraries
M: Dave Barach <dave@barachs.net>
F: src/vlibapi/
F: src/vlibmemory/
F: src/vlibsocket/
VNET Bidirectonal Forwarding Detection (BFD)
M: Klement Sekera <ksekera@cisco.com>
@ -134,15 +138,22 @@ VNET GENEVE
M: Marco Varlese <mvarlese@suse.de>
F: src/vnet/geneve/
VNET IPIP
M: Ole Troan <otroan@employees.org>
F: src/vnet/ipip/
VNET TLS and TLS engine plugins
M: Florin Coras <fcoras@cisco.com>
M: Ping Yu <ping.yu@intel.com>
F: src/vnet/tls
F: src/plugins/tlsopenssl
F: src/plugins/tlsmbedtls
Plugin - ACL
M: Andrew Yourtchenko <ayourtch@gmail.com>
F: src/plugins/acl/
F: src/plugins/acl.am
VNET IPIP
M: Ole Troan <otroan@employees.org>
F: src/vnet/ipip/
Plugin - flowprobe
M: Ole Troan <otroan@employees.org>
F: src/plugins/flowprobe/
@ -154,9 +165,9 @@ F: src/plugins/gtpu/
F: src/plugins/gtpu.am
Plugin - PPPoE
M: Hongjun Ni <hongjun.ni@intel.com>
F: src/plugins/pppoe/
F: src/plugins/pppoe.am
M: Hongjun Ni <hongjun.ni@intel.com>
F: src/plugins/pppoe/
F: src/plugins/pppoe.am
Plugin - IPv6 Segment Routing Dynamic Proxy
M: Francois Clad <fclad@cisco.com>
@ -173,6 +184,19 @@ M: Francois Clad <fclad@cisco.com>
F: src/plugins/srv6-as/
F: src/plugins/srv6_as.am
Plugin - Load Balancer
M: Pierre Pfister <ppfister@cisco.com>
M: Hongjun Ni <hongjun.ni@intel.com>
F: src/plugins/lb/
F: src/plugins/lb.am
Plugin - NSH
M: Hongjun Ni <hongjun.ni@intel.com>
M: Keith Burns <alagalah@gmail.com>
M: Vengada <venggovi@cisco.com>
F: src/plugins/nsh/
F: src/plugins/nsh.am
Test Infrastructure
M: Klement Sekera <ksekera@cisco.com>
F: test/

View File

@ -17,6 +17,7 @@ CCACHE_DIR?=$(BR)/.ccache
GDB?=gdb
PLATFORM?=vpp
SAMPLE_PLUGIN?=no
STARTUP_DIR?=$(PWD)
MACHINE=$(shell uname -m)
SUDO?=sudo
@ -65,6 +66,7 @@ DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
DEB_DEPENDS += lcov chrpath autoconf indent clang-format libnuma-dev
DEB_DEPENDS += python-all python-dev python-virtualenv python-pip libffi6 check
DEB_DEPENDS += libboost-all-dev libffi-dev python-ply libmbedtls-dev
DEB_DEPENDS += cmake ninja-build
ifeq ($(OS_VERSION_ID),14.04)
DEB_DEPENDS += openjdk-8-jdk-headless
DEB_DEPENDS += libssl-dev
@ -75,7 +77,7 @@ else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8)
else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-9)
DEB_DEPENDS += default-jdk-headless
DEB_DEPENDS += libssl1.0-dev
else
else
DEB_DEPENDS += default-jdk-headless
DEB_DEPENDS += libssl-dev
endif
@ -86,6 +88,7 @@ RPM_DEPENDS += numactl-devel
RPM_DEPENDS += check check-devel
RPM_DEPENDS += boost boost-devel
RPM_DEPENDS += selinux-policy selinux-policy-devel
RPM_DEPENDS += cmake3 ninja-build
ifeq ($(OS_ID)-$(OS_VERSION_ID),fedora-25)
RPM_DEPENDS += subunit subunit-devel
@ -105,6 +108,7 @@ else
RPM_DEPENDS += openssl-devel
RPM_DEPENDS += python-devel python-ply
RPM_DEPENDS += python-virtualenv
RPM_DEPENDS += devtoolset-7
RPM_DEPENDS_GROUPS = 'Development Tools'
endif
@ -115,7 +119,7 @@ RPM_DEPENDS += chrpath libffi-devel rpm-build
SUSE_NAME= $(shell grep '^NAME=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
SUSE_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g' | cut -d' ' -f2)
RPM_SUSE_BUILDTOOLS_DEPS = autoconf automake ccache check-devel chrpath
RPM_SUSE_BUILDTOOLS_DEPS += clang indent libtool make python-ply
RPM_SUSE_BUILDTOOLS_DEPS += clang cmake indent libtool make ninja python-ply
RPM_SUSE_DEVEL_DEPS = glibc-devel-static java-1_8_0-openjdk-devel libnuma-devel
RPM_SUSE_DEVEL_DEPS += libopenssl-devel openssl-devel mbedtls-devel
@ -127,22 +131,21 @@ RPM_SUSE_PLATFORM_DEPS = distribution-release shadow rpm-build
ifeq ($(OS_ID),opensuse)
ifeq ($(SUSE_NAME),Tumbleweed)
RPM_SUSE_DEVEL_DEPS = libboost_headers-devel libboost_thread-devel gcc
RPM_SUSE_DEVEL_DEPS = libboost_headers1_68_0-devel-1.68.0 libboost_thread1_68_0-devel-1.68.0 gcc
RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv
endif
ifeq ($(SUSE_ID),15.0)
RPM_SUSE_DEVEL_DEPS = libboost_headers-devel libboost_thread-devel gcc6
RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv
else
RPM_SUSE_DEVEL_DEPS += boost_1_61-devel gcc6
RPM_SUSE_DEVEL_DEPS += libboost_headers1_68_0-devel-1.68.0 gcc6
RPM_SUSE_PYTHON_DEPS += python-virtualenv
endif
endif
ifeq ($(OS_ID),opensuse-leap)
ifeq ($(SUSE_ID),15.0)
RPM_SUSE_DEVEL_DEPS = libboost_headers-devel libboost_thread-devel gcc6
RPM_SUSE_PYTHON_DEPS += python2-ply python2-virtualenv
RPM_SUSE_DEVEL_DEPS = libboost_headers-devel libboost_thread-devel gcc
RPM_SUSE_PYTHON_DEPS += python3-ply python2-virtualenv
endif
endif
@ -169,6 +172,13 @@ endif
.PHONY: test test-debug retest retest-debug test-doc test-wipe-doc test-help test-wipe
.PHONY: test-cov test-wipe-cov
define banner
@echo "========================================================================"
@echo " $(1)"
@echo "========================================================================"
@echo " "
endef
help:
@echo "Make Targets:"
@echo " install-dep - install software dependencies"
@ -187,6 +197,7 @@ help:
@echo " test-debug - build and run (basic) functional tests (debug build)"
@echo " test-all - build and run (all) functional tests"
@echo " test-all-debug - build and run (all) functional tests (debug build)"
@echo " test-ext - build and run 'extras' functional tests"
@echo " test-shell - enter shell with test environment"
@echo " test-shell-debug - enter shell with test environment (debug build)"
@echo " test-wipe - wipe files generated by unit tests"
@ -196,7 +207,7 @@ help:
@echo " run-vat - run vpp-api-test tool"
@echo " pkg-deb - build DEB packages"
@echo " pkg-rpm - build RPM packages"
@echo " dpdk-install-dev - install DPDK development packages"
@echo " install-ext-deps - install external development dependencies"
@echo " ctags - (re)generate ctags database"
@echo " gtags - (re)generate gtags database"
@echo " cscope - (re)generate cscope database"
@ -205,6 +216,9 @@ help:
@echo " doxygen - (re)generate documentation"
@echo " bootstrap-doxygen - setup Doxygen dependencies"
@echo " wipe-doxygen - wipe all generated documentation"
@echo " docs - Build the Sphinx documentation"
@echo " docs-venv - Build the virtual environment for the Sphinx docs"
@echo " docs-clean - Remove the generated files from the Sphinx docs"
@echo " test-doc - generate documentation for test framework"
@echo " test-wipe-doc - wipe documentation for test framework"
@echo " test-cov - generate code coverage report for test framework"
@ -281,17 +295,25 @@ endif
@sudo -E apt-get update
@sudo -E apt-get $(APT_ARGS) $(CONFIRM) $(FORCE) install $(DEB_DEPENDS)
else ifneq ("$(wildcard /etc/redhat-release)","")
ifeq ($(OS_ID),rhel)
@sudo -E yum-config-manager --enable rhel-server-rhscl-7-rpms
else ifeq ($(OS_ID),centos)
@sudo -E yum install $(CONFIRM) centos-release-scl-rh
endif
@sudo -E yum groupinstall $(CONFIRM) $(RPM_DEPENDS_GROUPS)
@sudo -E yum install $(CONFIRM) $(RPM_DEPENDS)
@sudo -E debuginfo-install $(CONFIRM) glibc openssl-libs mbedtls-devel zlib
else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
else ifeq ($(filter opensuse-tumbleweed,$(OS_ID)),$(OS_ID))
@sudo -E zypper refresh
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
else ifeq ($(filter opensuse-leap,$(OS_ID)),$(OS_ID))
@sudo -E zypper refresh
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
@sudo -E zypper refresh
@sudo -E zypper install -y $(RPM_SUSE_DEPENDS)
else
$(error "This option currently works only on Ubuntu, Debian, Centos or openSUSE systems")
$(error "This option currently works only on Ubuntu, Debian, RHEL, CentOS or openSUSE systems")
endif
define make
@ -353,7 +375,7 @@ export VPP_PYTHON_PREFIX ?= $(BR)/python
libexpand = $(subst $(subst ,, ),:,$(foreach lib,$(1),$(BR)/install-$(2)-native/vpp/$(lib)/$(3)))
define test
$(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-install vom-install,)
$(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-install,)
$(eval libs:=lib lib64)
make -C test \
TEST_DIR=$(WS_ROOT)/test \
@ -379,6 +401,11 @@ test-all:
$(eval EXTENDED_TESTS=yes)
$(call test,vpp,vpp,test)
test-ext:
$(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=vpp TAG=vpp_debug vom-install japi-install,)
$(eval EXTENDED_TESTS=yes)
$(call test,vpp,vpp_debug,test-ext)
test-all-debug:
$(eval EXTENDED_TESTS=yes)
$(call test,vpp,vpp_debug,test)
@ -420,7 +447,6 @@ retest:
retest-debug:
$(call test,vpp,vpp_debug,retest)
STARTUP_DIR ?= $(PWD)
ifeq ("$(wildcard $(STARTUP_CONF))","")
define run
@echo "WARNING: STARTUP_CONF not defined or file doesn't exist."
@ -451,7 +477,7 @@ run-release:
debug:
$(call run, $(BR)/install-$(PLATFORM)_debug-native,$(GDB) $(GDB_ARGS) --args)
build-coverity:
build-coverity:
$(call make,$(PLATFORM)_coverity,install-packages)
debug-release:
@ -473,7 +499,11 @@ pkg-srpm: dist
make -C extras/rpm srpm
dpdk-install-dev:
make -C dpdk install-$(PKG)
$(call banner,"This command is deprecated. Please use 'make install-ext-libs'")
make -C build/external install-$(PKG)
install-ext-deps:
make -C build/external install-$(PKG)
ctags: ctags.files
@ctags --totals --tag-relative -L $<
@ -513,25 +543,37 @@ doxygen:
wipe-doxygen:
$(call make-doxy)
define banner
@echo "========================================================================"
@echo " $(1)"
@echo "========================================================================"
@echo " "
endef
# Sphinx Documents
export DOCS_DIR = $(WS_ROOT)/docs
export VENV_DIR = $(WS_ROOT)/sphinx_venv
export SPHINX_SCRIPTS_DIR = $(WS_ROOT)/docs/scripts
verify: install-dep $(BR)/.deps.ok dpdk-install-dev
.PHONY: docs-venv docs docs-clean
docs-venv:
@($(SPHINX_SCRIPTS_DIR)/sphinx-make.sh venv)
docs: $(DOCS_DIR)
@($(SPHINX_SCRIPTS_DIR)/sphinx-make.sh html)
docs-clean:
@($(SPHINX_SCRIPTS_DIR)/sphinx-make.sh clean)
verify: install-dep $(BR)/.deps.ok install-ext-deps
$(call banner,"Building for PLATFORM=vpp using gcc")
@make -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
$(call banner,"Building sample-plugin")
@make -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
$(call banner,"Building libmemif")
@make -C build-root PLATFORM=vpp TAG=vpp libmemif-install
$(call banner,"Building JAPI")
@make -C build-root PLATFORM=vpp TAG=vpp japi-install
$(call banner,"Building VOM")
@make -C build-root PLATFORM=vpp TAG=vpp vom-install
$(call banner,"Building $(PKG) packages")
@make pkg-$(PKG)
ifeq ($(OS_ID)-$(OS_VERSION_ID),ubuntu-16.04)
$(call banner,"Running tests")
@make COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test
endif

View File

@ -39,7 +39,6 @@ Details of the changes leading up to this version of VPP can be found under
| @ref src/vlib | VPP application library |
| @ref src/vlibapi | VPP API library |
| @ref src/vlibmemory | VPP Memory management |
| @ref src/vlibsocket | VPP Socket I/O |
| @ref src/vnet | VPP networking |
| @ref src/vpp | VPP application |
| @ref src/vpp-api | VPP application API bindings |

File diff suppressed because it is too large Load Diff

View File

@ -10,4 +10,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

View File

@ -11,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
external_source = build
ifneq (,$(findstring debug,$(TAG)))
DPDK_DEBUG=y
else
@ -18,8 +20,8 @@ else
endif
DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \
DPDK_BUILD_DIR=$(PACKAGE_BUILD_DIR) \
DPDK_INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
BUILD_DIR=$(PACKAGE_BUILD_DIR) \
INSTALL_DIR=$(PACKAGE_INSTALL_DIR) \
DPDK_DEBUG=$(DPDK_DEBUG)
DPDK_MLX5_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx5_pmd))
@ -27,6 +29,11 @@ ifneq ($(DPDK_MLX5_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y
endif
DPDK_MLX5_PMD_DLOPEN_DEPS=$(strip $($(PLATFORM)_uses_dpdk_mlx5_dlopen_deps))
ifneq ($(DPDK_MLX5_PMD_DLOPEN_DEPS),)
DPDK_MAKE_ARGS += DPDK_MLX5_PMD_DLOPEN_DEPS=y
endif
DPDK_MLX4_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx4_pmd))
ifneq ($(DPDK_MLX4_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX4_PMD=y
@ -42,8 +49,8 @@ ifneq ($(DPDK_MAKE_EXTRA_ARGS),)
DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)"
endif
dpdk_configure = echo
external_configure = echo
dpdk_make_args = $(DPDK_MAKE_ARGS) ebuild-build
external_make_args = $(DPDK_MAKE_ARGS) -C external ebuild-build
dpdk_install = make $(DPDK_MAKE_ARGS) ebuild-install
external_install = make $(DPDK_MAKE_ARGS) -C external ebuild-install

View File

@ -0,0 +1,6 @@
japi_configure_depend = vpp-install
japi_source = extras
japi_configure_subdir = japi
japi_CPPFLAGS = $(call installed_includes_fn, vpp) $(call installed_includes_fn, vpp)/vpp_plugins
japi_LDFLAGS = $(call installed_libs_fn, vpp)

View File

@ -17,3 +17,29 @@ sample-plugin_configure_depend = vpp-install
sample-plugin_CPPFLAGS = $(call installed_includes_fn, vpp)
sample-plugin_LDFLAGS = $(call installed_libs_fn, vpp)
sample-plugin_PATH = $(call package_install_dir_fn,vpp)/bin
ifneq ($(shell which cmake3),)
CMAKE?=cmake3
else
CMAKE?=cmake
endif
sample-plugin_cmake_args ?=
sample-plugin_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
sample-plugin_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
sample-plugin_cmake_args += -DCMAKE_SHARED_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
sample-plugin_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(PACKAGE_INSTALL_DIR)/../vpp"
# Use devtoolset on centos 7
ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
sample-plugin_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
endif
sample-plugin_configure = \
cd $(PACKAGE_BUILD_DIR) && \
$(CMAKE) -G Ninja $(sample-plugin_cmake_args) \
$(call find_source_fn,$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR)
sample-plugin_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS)
sample-plugin_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install

View File

@ -1,6 +1,41 @@
# Copyright (c) 2017-2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
vom_configure_depend = vpp-install
vom_source = extras
vom_configure_subdir = vom
vom_CPPFLAGS = $(call installed_includes_fn, vpp)
vom_LDFLAGS = $(call installed_libs_fn, vpp)
ifneq ($(shell which cmake3),)
CMAKE?=cmake3
else
CMAKE?=cmake
endif
vom_cmake_args ?=
vom_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
vom_cmake_args += -DCMAKE_CXX_FLAGS="$($(TAG)_TAG_CPPFLAGS)"
vom_cmake_args += -DCMAKE_SHARED_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
vom_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(PACKAGE_INSTALL_DIR)/../vpp"
# Use devtoolset on centos 7
ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
vom_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
endif
vom_configure = \
cd $(PACKAGE_BUILD_DIR) && \
$(CMAKE) -G Ninja $(vom_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE))$(PACKAGE_SUBDIR)
vom_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS)
vom_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install

View File

@ -13,39 +13,34 @@
vpp_source = src
ifeq ($($(PLATFORM)_dpdk_shared_lib),yes)
vpp_configure_args = --enable-dpdk-shared
ifneq ($(shell which cmake3),)
CMAKE?=cmake3
else
vpp_configure_args =
CMAKE?=cmake
endif
# Platform dependent configure flags
vpp_configure_args += $(vpp_configure_args_$(PLATFORM))
vpp_cmake_prefix_path = /opt/vpp/external/$(shell uname -m)
vpp_cmake_prefix_path += $(PACKAGE_INSTALL_DIR)external
vpp_cmake_prefix_path := $(subst $() $(),;,$(vpp_cmake_prefix_path))
vpp_CPPFLAGS =
vpp_LDFLAGS =
ifneq ($($(PLATFORM)_uses_dpdk),no)
ifeq ($($(PLATFORM)_uses_external_dpdk),yes)
vpp_CPPFLAGS += -I$($(PLATFORM)_dpdk_inc_dir)
vpp_LDFLAGS += -L$($(PLATFORM)_dpdk_lib_dir)
else
vpp_configure_depend += dpdk-install
vpp_CPPFLAGS += $(call installed_includes_fn, dpdk)/dpdk
vpp_LDFLAGS += $(call installed_libs_fn, dpdk)
vpp_CPPFLAGS += -I/usr/include/dpdk
endif
ifeq ($($(PLATFORM)_uses_dpdk_mlx5_pmd),yes)
vpp_configure_args += --with-dpdk-mlx5-pmd
endif
ifeq ($($(PLATFORM)_uses_dpdk_mlx4_pmd),yes)
vpp_configure_args += --with-dpdk-mlx4-pmd
endif
else
vpp_configure_args += --disable-dpdk-plugin
vpp_cmake_args ?=
vpp_cmake_args += -DCMAKE_INSTALL_PREFIX:PATH=$(PACKAGE_INSTALL_DIR)
vpp_cmake_args += -DCMAKE_C_FLAGS="$($(TAG)_TAG_CFLAGS)"
vpp_cmake_args += -DCMAKE_LINKER_FLAGS="$($(TAG)_TAG_LDFLAGS)"
vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(vpp_cmake_prefix_path)"
ifeq ("$(V)","1")
vpp_cmake_args += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
endif
ifeq ($($(PLATFORM)_enable_tests),yes)
vpp_configure_args += --enable-tests
# Use devtoolset on centos 7
ifneq ($(wildcard /opt/rh/devtoolset-7/enable),)
vpp_cmake_args += -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
endif
vpp_configure_depend += external-install
vpp_configure = \
cd $(PACKAGE_BUILD_DIR) && \
$(CMAKE) -G Ninja $(vpp_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE))
#vpp_make_args = --no-print-directory
vpp_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR)
vpp_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install | grep -v 'Set runtime path'

View File

@ -71,10 +71,6 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
echo ../../src/scripts/vppctl_completion /etc/bash_completion.d \
>> deb/debian/vpp.install ; \
\
: move dictionary of vppctl commands ; \
echo ../../src/scripts/vppctl-cmd-list /usr/share/vpp \
>> deb/debian/vpp.install ; \
\
: add log directory ; \
echo /var/log/vpp/ \
>> deb/debian/vpp.dirs ; \
@ -82,11 +78,11 @@ install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
: dev package needs a couple of additions ; \
echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/bin/vppapigen /usr/bin \
>> deb/debian/vpp-dev.install ; \
echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/share/vpp/C.py /usr/share/vpp \
echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/share/vpp/vppapigen_c.py /usr/share/vpp \
>> deb/debian/vpp-dev.install ; \
echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/share/vpp/JSON.py /usr/share/vpp \
echo ../$(INSTALL_PREFIX)$(ARCH)/vpp/share/vpp/vppapigen_json.py /usr/share/vpp \
>> deb/debian/vpp-dev.install ; \
echo ../../src/vpp-api/java/jvpp/gen/jvpp_gen.py /usr/bin \
echo ../../extras/japi/java/jvpp/gen/jvpp_gen.py /usr/bin \
>> deb/debian/vpp-dev.install ; \
for i in $$(ls ../src/vpp-api/java/jvpp/gen/jvppgen/*.py); do \
echo ../$${i} /usr/lib/python2.7/dist-packages/jvppgen \

View File

@ -19,30 +19,8 @@ vpp_arch = native
ifeq ($(TARGET_PLATFORM),thunderx)
vpp_dpdk_target = arm64-thunderx-linuxapp-gcc
endif
vpp_native_tools = vppapigen
vpp_uses_dpdk = yes
# Uncoment to enable building unit tests
# vpp_enable_tests = yes
vpp_root_packages = vpp vom
# DPDK configuration parameters
# vpp_uses_dpdk_mlx4_pmd = yes
# vpp_uses_dpdk_mlx5_pmd = yes
# vpp_uses_external_dpdk = yes
# vpp_dpdk_inc_dir = /usr/include/dpdk
# vpp_dpdk_lib_dir = /usr/lib
# vpp_dpdk_shared_lib = yes
# Use '--without-libnuma' for non-numa aware architecture
vpp_configure_args_vpp =
# load balancer plugin is not portable on 32 bit platform
ifeq ($(MACHINE),i686)
vpp_configure_args_vpp += --disable-lb-plugin
endif
vpp_root_packages = vpp vom japi
vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 \
-fstack-protector-all -fPIC -Werror
@ -56,6 +34,7 @@ vpp_TAG_CXXFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror -pie -Wl,-z,now
vpp_clang_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_clang_TAG_CXXFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_clang_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -Werror -fprofile-arcs -ftest-coverage

View File

@ -4,7 +4,6 @@ After=network.target
[Service]
Type=simple
ExecStartPre=-/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api
ExecStartPre=-/sbin/modprobe uio_pci_generic
ExecStart=/usr/bin/vpp -c /etc/vpp/startup.conf
ExecStopPost=/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api

View File

@ -1,12 +1,11 @@
description "vector packet processing engine"
author "Cisco Systems, Inc <listname@cisco.com>"
author "Cisco Systems, Inc <vpp-dev@lists.fd.io>"
manual
respawn
pre-start script
rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api || true
# should be there via dkms, but if not, start anyway
modprobe uio_pci_generic || true
end script

View File

@ -15,11 +15,11 @@
rm -f $2
for i in ${1}/vpp/lib64/vpp_plugins/*.so; do
for i in ${1}/vpp/lib/vpp_plugins/*.so; do
echo ../${i} /usr/lib/vpp_plugins >> ${2}
done
for i in ${1}/vpp/lib64/vpp_api_test_plugins/*.so; do
for i in ${1}/vpp/lib/vpp_api_test_plugins/*.so; do
echo ../${i} /usr/lib/vpp_api_test_plugins >> ${2}
done

View File

@ -15,7 +15,7 @@
rm -f $2
for i in $(find ${1}/vpp/share/java/ -type f -print); do
for i in $(find ${1}/japi/share/java/ -type f -print); do
echo ../${i} /usr/share/java >> ${2}
done

160
build/external/Makefile vendored Normal file
View File

@ -0,0 +1,160 @@
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Scripts require non-POSIX parts of bash
SHELL := /bin/bash
DL_CACHE_DIR = $(HOME)/Downloads
MAKE ?= make
MAKE_ARGS ?= -j
BUILD_DIR ?= $(CURDIR)/_build
INSTALL_DIR ?= $(CURDIR)/_install
PKG_VERSION ?= $(shell git describe --abbrev=0 | cut -d- -f1 | cut -dv -f2)
PKG_SUFFIX ?= $(shell git log --oneline v$(PKG_VERSION)-rc0.. . | wc -l)
JOBS := $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo),\
$(shell grep -c ^processor /proc/cpuinfo), 2)
B := $(BUILD_DIR)
I := $(INSTALL_DIR)
include packages.mk
include packages/nasm.mk
include packages/ipsec-mb.mk
include packages/dpdk.mk
.PHONY: clean
clean:
@rm -rf $(B) $(I)
##############################################################################
# .deb packaging
##############################################################################
DEB_VER := $(PKG_VERSION)
DEB_ARCH=$(shell dpkg --print-architecture 2> /dev/null)
DEV_DEB=vpp-ext-deps_$(DEB_VER)-$(PKG_SUFFIX)_$(DEB_ARCH).deb
INSTALLED_VER=$(shell dpkg-query --showformat='$${Version}' --show vpp-ext-deps 2> /dev/null)
.PHONY: build-deb install-deb check-deb
deb/debian/changelog: Makefile
@echo "vpp-ext-deps ($(DEB_VER)-$(PKG_SUFFIX)) unstable; urgency=low" > $@
@echo "" >> $@
@echo " * Version $(DEB_VER)" >> $@
@echo "" >> $@
@echo " -- VPP Dev <vpp-dev@lists.fd.io> $(shell date -R)" >> $@
$(DEV_DEB): deb/debian/changelog
@cd deb && dpkg-buildpackage -b -uc -us
git clean -fdx deb
build-deb: $(DEV_DEB)
install-deb:
ifneq ($(INSTALLED_VER),$(DEB_VER)-$(PKG_SUFFIX))
@echo "=========================================================="
@echo " Out of date vpp-ext-deps package installed."
@echo " Installed: $(INSTALLED_VER)"
@echo " Needed: $(DEB_VER)-$(PKG_SUFFIX)"
@echo "=========================================================="
@make $(DEV_DEB)
@sudo dpkg -i $(DEV_DEB)
else
@echo "=========================================================="
@echo " Up-to-date vpp-ext-deps package already installed"
@echo "=========================================================="
endif
check-deb:
ifneq ($(INSTALLED_VER),$(DEB_VER)-$(PKG_SUFFIX))
@echo "=========================================================="
@echo " Outdated DPDK package detected:"
@echo " Installed: vpp-ext-deps $(INSTALLED_VER)"
@echo " Current: vpp-ext-deps $(DEB_VER)-$(PKG_SUFFIX)"
@echo ""
@echo " Please upgrade by invoking 'make install-ext-deps'"
@echo " from the top level directory."
@echo "=========================================================="
endif
##############################################################################
# .rpm packaging
##############################################################################
RPM_VER := $(PKG_VERSION)
RPM_ARCH=$(shell rpm --eval "%{_arch}" 2> /dev/null)
DEV_RPM=vpp-ext-deps-$(RPM_VER)-$(PKG_SUFFIX).$(RPM_ARCH).rpm
INSTALLED_RPM_VER=$(shell rpm -q --queryformat '%{VERSION}-%{RELEASE}' vpp-ext-deps 2> /dev/null | grep -v "not inst")
.PHONY: build-rpm install-rpm check-rpm
$(DEV_RPM): Makefile rpm/vpp-ext-deps.spec
@rpmbuild -bb \
--define "_topdir $(CURDIR)/rpm" \
--define "_version $(RPM_VER)" \
--define "_release $(PKG_SUFFIX)" \
$(CURDIR)/rpm/vpp-ext-deps.spec
mv rpm/RPMS/$(RPM_ARCH)/*.rpm .
@git clean -fdx rpm
build-rpm: $(DEV_RPM)
install-rpm:
ifneq ($(INSTALLED_RPM_VER),$(RPM_VER)-$(PKG_SUFFIX))
@$(MAKE) $(DEV_RPM)
sudo rpm -Uih $(DEV_RPM)
else
@echo "=========================================================="
@echo " Up-to-date DPDK package already installed"
@echo "=========================================================="
endif
check-rpm:
ifneq ($(INSTALLED_RPM_VER),$(RPM_VER)-$(PKG_SUFFIX))
@echo "=========================================================="
@echo " Outdated DPDK package detected:"
@echo " Installed: vpp-ext-deps $(INSTALLED_RPM_VER)"
@echo " Current: vpp-ext-deps $(RPM_VER)-$(PKG_SUFFIX)"
@echo ""
@echo " Please upgrade by invoking 'make install-ext-deps'"
@echo " from the top level directory."
@echo "=========================================================="
endif
##############################################################################
# ebuild support
##############################################################################
.PHONY: ebuild-build ebuild-install
ebuild-build:
ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),)
@echo "=========================================================="
@echo "Building DPDK from source. Consider installing development"
@echo "package by invoking 'make install-ext-deps' from the"
@echo "top level directory"
@echo "=========================================================="
make config
else
ifneq ($(INSTALLED_VER),)
make check-deb
endif
ifneq ($(INSTALLED_RPM_VER),)
make check-rpm
endif
endif
ebuild-install:
ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),)
make install
endif

13
build/external/deb/debian/control vendored Normal file
View File

@ -0,0 +1,13 @@
Source: vpp-ext-deps
Section: net
Priority: extra
Maintainer: vpp-dev@lists.fd.io
Build-Depends: debhelper (>= 9), dkms
Standards-Version: 3.9.4
Package: vpp-ext-deps
Architecture: any
Depends: ${shlibs:Depends}
Description: VPP developer package containing dependencies
Replaces: vpp-dpdk-dev
Conflicts: vpp-dpdk-dev

28
build/external/deb/debian/rules vendored Executable file
View File

@ -0,0 +1,28 @@
#!/usr/bin/make -f
DH_VERBOSE = 1
DEB_BUILD_OPTIONS = noddebs
PKG=vpp-ext-deps
VERSION = $(shell dpkg-parsechangelog | sed -nr '/^Version:/s/Version: //p')
BASE_VER = $(word 1, $(subst -, ,$(VERSION)))
export BUILD_DIR=$(CURDIR)/_build
export INSTALL_DIR=$(CURDIR)/debian/tmp/opt/vpp/external/$(shell uname -m)/
MAKE_ARGS=-C ..
include /usr/share/dpkg/default.mk
%:
dh $@
override_dh_clean:
make $(MAKE_ARGS) clean
override_dh_auto_configure:
make $(MAKE_ARGS) config
override_dh_install:
make $(MAKE_ARGS) install
dh_install -p$(PKG) --autodest /opt

150
build/external/packages.mk vendored Normal file
View File

@ -0,0 +1,150 @@
# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
define h1
@echo "--- $(1)"
endef
define package
$1_tarball_strip_dirs ?= 0
$1_src_dir ?= $(B)/src-$1
$1_patch_dir ?= $(CURDIR)/patches/$1_$($1_version)
$1_build_dir ?= $(B)/build-$1
$1_install_dir ?= $(I)
$1_config_log ?= $(B)/$1.config.log
$1_build_log ?= $(B)/$1.build.log
$1_install_log ?= $(B)/$1.install.log
##############################################################################
# Download
##############################################################################
downloads/$($1_tarball):
mkdir -p downloads
@if [ -e $(DL_CACHE_DIR)/$($1_tarball) ] ; \
then cp $(DL_CACHE_DIR)/$($1_tarball) downloads/ ; \
else \
echo "Downloading $($1_url)" ; \
curl -o downloads/$($1_tarball) -LO $($1_url) ; \
fi
@rm -f $(B)/.download.ok
$(B)/.$1.download.ok: downloads/$($1_tarball)
@mkdir -p $(B)
$$(call h1,"validating $1 $($1_version) checksum")
@SUM=$$(shell openssl md5 $$< | cut -f 2 -d " " -) ; \
([ "$$$${SUM}" = "$($1_tarball_md5sum)" ] || \
( echo "==========================================================" && \
echo "Bad Checksum!" && \
echo "Expected: $($1_tarball_md5sum)" && \
echo "Calculated: $$$${SUM}" && \
echo "Please remove $$< and retry" && \
echo "==========================================================" && \
false ))
@touch $$@
.PHONY: $1-download
$1-download: $(B)/.$1.download.ok
##############################################################################
# Extract
##############################################################################
$(B)/.$1.extract.ok: $(B)/.$1.download.ok
$$(call h1,"extracting $1 $($1_version)")
@mkdir -p $$($1_src_dir)
@tar \
--directory $$($1_src_dir) \
--extract \
--strip-components=$$($1_tarball_strip_dirs) \
--file downloads/$($1_tarball)
@touch $$@
.PHONY: $1-extract
$1-extract: $(B)/.$1.extract.ok
##############################################################################
# Patch
##############################################################################
$(B)/.$1.patch.ok: $(B)/.$1.extract.ok
$$(call h1,"patching $1 $($1_version)")
ifneq ($$(wildcard $$($1_patch_dir)/*.patch),)
@for f in $$($1_patch_dir)/*.patch ; do \
echo "Applying patch: $$$$(basename $$$$f)" ; \
patch -p1 -d $$($1_src_dir) < $$$$f ; \
done
endif
@touch $$@
.PHONY: $1-patch
$1-patch: $(B)/.$1.patch.ok
##############################################################################
# Config
##############################################################################
ifeq ($$(call $1_config_cmds),)
define $1_config_cmds
@cd $$($1_build_dir) && \
CFLAGS="$$($1_cflags)" \
$$($1_src_dir)/configure \
--prefix=$$($1_install_dir) \
$$($1_configure_args) > $$($1_config_log)
endef
endif
$(B)/.$1.config.ok: $(B)/.$1.patch.ok $(addsuffix -install,$($1_depends))
$$(call h1,"configuring $1 $($1_version) - log: $$($1_config_log)")
@mkdir -p $$($1_build_dir)
$$(call $1_config_cmds)
@touch $$@
.PHONY: $1-config
$1-config: $(B)/.$1.config.ok
##############################################################################
# Build
##############################################################################
ifeq ($$(call $1_build_cmds),)
define $1_build_cmds
@$(MAKE) $(MAKE_ARGS) -C $$($1_build_dir) > $$($1_build_log)
endef
endif
$(B)/.$1.build.ok: $(B)/.$1.config.ok
$$(call h1,"building $1 $($1_version) - log: $$($1_build_log)")
$$(call $1_build_cmds)
@touch $$@
.PHONY: $1-build
$1-build: $(B)/.$1.build.ok
##############################################################################
# Install
##############################################################################
ifeq ($$(call $1_install_cmds),)
define $1_install_cmds
@$(MAKE) $(MAKE_ARGS) -C $$($1_build_dir) install > $$($1_install_log)
endef
endif
$(B)/.$1.install.ok: $(B)/.$1.build.ok
$$(call h1,"installing $1 $($1_version) - log: $$($1_install_log)")
$$(call $1_install_cmds)
@touch $$@
.PHONY: $1-install
$1-install: $(B)/.$1.install.ok
ALL_TARGETS += $1-install
endef

File diff suppressed because it is too large Load Diff

43
build/external/packages/ipsec-mb.mk vendored Normal file
View File

@ -0,0 +1,43 @@
# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ipsec-mb_version := 0.49
ipsec-mb_tarball := v$(ipsec-mb_version).tar.gz
ipsec-mb_tarball_md5sum_0.49 := 3a2bee86f25f6c8ed720da5b4b8d4297
ipsec-mb_tarball_md5sum_0.50 := c847ed77ae34da551237349f1c9db1e9
ipsec-mb_tarball_md5sum := $(ipsec-mb_tarball_md5sum_$(ipsec-mb_version))
ipsec-mb_tarball_strip_dirs := 1
ipsec-mb_depends := nasm
ipsec-mb_url := http://github.com/01org/intel-ipsec-mb/archive/$(ipsec-mb_tarball)
define ipsec-mb_config_cmds
@true
endef
define ipsec-mb_build_cmds
@true
endef
define ipsec-mb_install_cmds
@mkdir -p $(ipsec-mb_install_dir)/include
@make -C $(ipsec-mb_src_dir) -j \
SHARED=n \
EXTRA_CFLAGS=-fPIC \
NASM=$(ipsec-mb_install_dir)/bin/nasm \
PREFIX=$(ipsec-mb_install_dir) \
install > $(ipsec-mb_install_log)
endef
$(eval $(call package,ipsec-mb))

21
build/external/packages/nasm.mk vendored Normal file
View File

@ -0,0 +1,21 @@
# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
nasm_version := 2.13.03
nasm_tarball := nasm-$(nasm_version).tar.xz
nasm_tarball_md5sum := d5ca2ad7121ccbae69dd606b1038532c
nasm_tarball_strip_dirs := 1
nasm_url := http://www.nasm.us/pub/nasm/releasebuilds/$(nasm_version)/$(nasm_tarball)
nasm_cflags := -Wno-implicit-fallthrough -std=c11
$(eval $(call package,nasm))

View File

@ -6,19 +6,19 @@ accepted upstream and made available in the next DPDK release.
The following is the method used to generate these patches:
1. Git clone the DPDK to a new directory:
1. Git clone the package to a new directory:
# git clone http://dpdk.org/git/dpdk dpdk
2. Create a branch based on the DPDK release you wish to patch.
2. Create a branch based on the release you wish to patch.
Note, “git tag” will show you all the release tags. The following example is
for DPDK release tag “v2.2.0” and will create a branch named “two_dot_two”.
# cd dpdk
for release tag “v2.2.0” and will create a branch named “two_dot_two”.
# cd <root dir>
# git checkout -b two_dot_two v2.2.0
3. Apply all the existing VPP DPDK patches to this new branch.
# git am <VPP directory>/dpdk/dpdk-2.2.0_patches/*
3. Apply all the existing patches to this new branch.
# git am </path/to/existing/patches/*>
4. Make your changes and commit your change to your DPDK repository.
4. Make your changes and commit your change to your repository.
# <edit files>
# git commit -s
@ -26,9 +26,5 @@ for DPDK release tag “v2.2.0” and will create a branch named “two_dot_two
for your branch (two_dot_two), with your latest commits as the last ones.
# git format-patch master..two_dot_two
6. Copy, add and commit the new patches into the VPP patches directory.
# cp <new patch files> <VPP directory>/dpdk/dpdk-2.2.0_patches
# cd <VPP directory>
# git add dpdk/dpdk-2.2.0_patches/<new patch files>
# git commit -s
6. Copy, add and commit the new patches into the patches directory.

Some files were not shown because too many files have changed in this diff Show More