vpp.git
6 years agoVCL: add vpp api q length to config file. 68/9668/2
Dave Wallace [Thu, 30 Nov 2017 03:46:32 +0000 (22:46 -0500)]
VCL: add vpp api q length to config file.

Change-Id: Ibe3e6cea0ea2fc700ef0a284c8ea5fe5d5476514
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agommap-based fixed-size record double-buffered logger 32/9632/2
Dave Barach [Wed, 29 Nov 2017 21:59:01 +0000 (16:59 -0500)]
mmap-based fixed-size record double-buffered logger

Change-Id: I760b482b9de457bbb17de817db7079b57d3f5ec1
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoVCL-LDPRELOAD: Fix connect return value handling. 94/9594/3
Dave Wallace [Mon, 27 Nov 2017 22:07:51 +0000 (17:07 -0500)]
VCL-LDPRELOAD: Fix connect return value handling.

Change-Id: I51d82f39d450834f0ba4d9415aa3e62eb61fc1e9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL: drain the vpp app event queue. 16/9616/2
Dave Wallace [Wed, 29 Nov 2017 08:24:06 +0000 (03:24 -0500)]
VCL: drain the vpp app event queue.

Change-Id: If988b8ad33465819d0e5ab9ef92ffd69b3c7851c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoAdd some indent-off to the node declarations in ip4-forward 20/9620/3
Neale Ranns [Wed, 29 Nov 2017 10:39:53 +0000 (02:39 -0800)]
Add some indent-off to the node declarations in ip4-forward

Change-Id: Icab8f1411da22bd56ef0de3b100eaa9519a42f52
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agosession: fix preallocation of local endpoint table 18/9618/2
Florin Coras [Wed, 29 Nov 2017 05:07:11 +0000 (00:07 -0500)]
session: fix preallocation of local endpoint table

Change-Id: I67a73e31bda9e497859297fcc1765e880572884a
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoNAT: Remove old SNAT API (VPP-1070) 17/9617/2
Matus Fabian [Wed, 29 Nov 2017 07:27:36 +0000 (23:27 -0800)]
NAT: Remove old SNAT API (VPP-1070)

Change-Id: I3d936d456ee27b2e0857843295efb60a9f2d0be7
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoRevert "Dpdk: 17.08 tarball updated 11/27" 22/9622/2
Damjan Marion [Wed, 29 Nov 2017 11:28:38 +0000 (12:28 +0100)]
Revert "Dpdk: 17.08 tarball updated 11/27"

DPDK tarball was changed by mistake and now it is reverted back.

This reverts commit 3d786efcb087533320e89f80077127fc507cfd99.

Change-Id: I1a07b96fbc3f4fe13bb4a5c401036cae4ac5d346
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoInclude allocated table memory in 'sh fib mem' output 19/9619/2
Neale Ranns [Wed, 29 Nov 2017 08:59:31 +0000 (00:59 -0800)]
Include allocated table memory in 'sh fib mem' output

DBGvpp# sh fib mem
FIB memory
  Tables:
             SAFI              Number   Bytes
         IPv4 unicast             2    673066
         IPv6 unicast             2    1054608
             MPLS                 1    4194312
        IPv4 multicast            2     2322
        IPv6 multicast            2      ???
  Nodes:
             Name               Size  in-use /allocated   totals
             Entry               96     20   /    20      1920/1920
         Entry Source            32      0   /    0       0/0
     Entry Path-Extensions       60      0   /    0       0/0
        multicast-Entry         192     12   /    12      2304/2304
           Path-list             40     28   /    28      1120/1120
           uRPF-list             16     20   /    20      320/320
             Path                72     28   /    28      2016/2016
      Node-list elements         20     28   /    28      560/560
        Node-list heads          8      30   /    30      240/240

Change-Id: I8c8f6f1c87502a40265bf4f302d0daef111a4a4e
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoDES-CBC/3DES-CBC support for VPP IPSec Core 08/9608/2
“mukeshyadav1984” [Tue, 28 Nov 2017 18:52:34 +0000 (10:52 -0800)]
DES-CBC/3DES-CBC support for VPP IPSec Core

Change-Id: I876f215b129e5e59d3acc6447ce40458cc341eba
Signed-off-by: “mukeshyadav1984” <mukyadav@cisco.com>
6 years agoUsing $(CURDIR) to fix the absolute path issue 00/9600/2
Marco Varlese [Tue, 28 Nov 2017 13:50:45 +0000 (14:50 +0100)]
Using $(CURDIR) to fix the absolute path issue

Change-Id: Ic26edd34a2980fc8cf34514433a7b7076660316e
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoConfigure vat-plugin-path and vat-plugin-name-filter 12/9612/2
Dave Barach [Tue, 28 Nov 2017 23:55:09 +0000 (18:55 -0500)]
Configure vat-plugin-path and vat-plugin-name-filter

To facilitate in-tree plugin API testing, via the "binary-api..."
debug CLI command.

Change-Id: If7ee88a6a0dbc8e8f4555cb41e259db24e378a64
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoDpdk: 17.08 tarball updated 11/27 06/9606/4
Ed Kern [Tue, 28 Nov 2017 18:17:00 +0000 (11:17 -0700)]
Dpdk: 17.08 tarball updated 11/27

The dpdk package posted on static.dpdk.org for 17.08
was updated 11/27. This updates the checksum thats
statically included in makefile. Looks like they
also changed the dir structure to add -stable.
fast.dpdk.org has issues with its mirrors being in
sync...changing to static.dpdk.org for now

Change-Id: Id81e328b07873700ae3f76e1ca819f94f26f38c8
Signed-off-by: Ed Kern <ejk@cisco.com>
6 years agoVOM: logging, populate and stats fixes 14/9614/2
Neale Ranns [Wed, 29 Nov 2017 06:29:13 +0000 (22:29 -0800)]
VOM: logging, populate and stats fixes

logging: allow a client to register a callback handler to recieve log messages
         that way the client can maintain a correctly sequenced log
populate: fix the creation of interface and the setting of the handle
stats: the reset promise idea is not defined behaviour.
       Use an eanble/disable command pair

Change-Id: I347720bb65df2874c7619e722d593bc863ee2bf1
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoMake whole version string available in core files 13/9613/2
Florin Coras [Wed, 29 Nov 2017 00:35:44 +0000 (19:35 -0500)]
Make whole version string available in core files

Change-Id: I1f292e6035e1ff9e7bdca8f0a9275ebd3d4d8d0a
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVPP-246 Coding standards cleanup - vnet/vnet/classify 80/9580/3
khemendra kumar [Mon, 27 Nov 2017 09:45:53 +0000 (15:15 +0530)]
VPP-246 Coding standards cleanup - vnet/vnet/classify

Signed-off-by: khemendra kumar <khemendra.kumar13@gmail.com>
Change-Id: I0d94ef604d34da6981e7c2d2b4da5ec3ec5fb19a

6 years agoVPP-268 Coding standards cleanup - vnet/vnet/plugin 46/9546/3
Krishanpal singh [Thu, 23 Nov 2017 13:13:08 +0000 (18:43 +0530)]
VPP-268 Coding standards cleanup - vnet/vnet/plugin

Change-Id: Ida719f3997cb14ad869e97f6d8de301a0d19c370
Signed-off-by: Krishanpal singh <krish.singh03@gmail.com>
6 years agoShut down session queue input nodes on exit 02/9602/1
Dave Barach [Tue, 28 Nov 2017 15:11:42 +0000 (10:11 -0500)]
Shut down session queue input nodes on exit

Shut off (especially) worker-thread session queue input nodes.
Otherwise, vpp can crash when the main thread unmaps the API segment.

Change-Id: Idf855e7570e0066cc921ae34bc53afabaa9e1dba
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agotcp: fix retransmissions under buffer shortage 79/9579/6
Florin Coras [Mon, 27 Nov 2017 09:34:14 +0000 (04:34 -0500)]
tcp: fix retransmissions under buffer shortage

- add debugging scaffolding for simulating buffer shortage

Change-Id: Ice519d74f9c4e4094c4586c548185135b7bb5f2d
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agonet/virtio: support modern device id 96/9596/2
Gabriel Ganne [Tue, 28 Nov 2017 08:55:07 +0000 (09:55 +0100)]
net/virtio: support modern device id

Add legacy and modern macros to pci_config header.

This follows dpdk commit: 4c7903658f6b5a8f4901224ef405445541b91e4a
And PCI Device Conformance doc :
docs.oasis-open.org/virtio/virtio/v1.0/cs02/virtio-v1.0-cs02.html#x1-640001

Change-Id: Iacd40ea8c06f220736ca0bc7ce68bcf1e55b68f6
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoIPSec AH protocol enhancement in VPP native core 38/9538/5
“mukeshyadav1984” [Thu, 23 Nov 2017 10:39:33 +0000 (02:39 -0800)]
IPSec AH protocol enhancement in VPP native core

Change-Id: Iec5804d768485f4015bbf732d8d19ef2f24e6939
Signed-off-by: “mukeshyadav1984” <mukyadav@cisco.com>
6 years agodpdk: fix issue when tx offload stops working after MTU change 92/9592/2
Damjan Marion [Mon, 27 Nov 2017 18:55:14 +0000 (19:55 +0100)]
dpdk: fix issue when tx offload stops working after MTU change

Change-Id: I3713b4c460a3cd414b560e16aac054aee2e1181b
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovcl: fix session handle in accept reply 91/9591/2
Florin Coras [Mon, 27 Nov 2017 18:37:05 +0000 (10:37 -0800)]
vcl: fix session handle in accept reply

Change-Id: I5afd840c07714fc457bb37f8f40e1fcc0bd11314
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agosession: return bound listener for proxy accepts 82/9582/3
Florin Coras [Mon, 27 Nov 2017 11:12:00 +0000 (03:12 -0800)]
session: return bound listener for proxy accepts

This, if such a listener exists.

Change-Id: I974cc858c1e2fee50189c3c67e4abb76be32a98a
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agodpdk: fix trajectory compilation 71/9571/2
Florin Coras [Mon, 27 Nov 2017 02:43:25 +0000 (18:43 -0800)]
dpdk: fix trajectory compilation

Change-Id: I53f917cd58101a14667641ee9cecd1eabf3f71d9
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVPP-253 Coding standards cleanup - vnet/vnet/gre 72/9572/2
Swarup Nayak [Mon, 27 Nov 2017 04:57:43 +0000 (10:27 +0530)]
VPP-253 Coding standards cleanup - vnet/vnet/gre

Change-Id: I95f98b91faf74178c05f30da9eb3d6125193b7ef
Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
6 years agoFix - sh ip fib mtrie sum 77/9577/3
Neale Ranns [Mon, 27 Nov 2017 09:03:25 +0000 (01:03 -0800)]
Fix - sh ip fib mtrie sum

Change-Id: I62a6ee78ee9ad73fd58a46fbdca54fd964fec113
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoSRv6 improvements to binary API 58/9458/3
Pablo Camarillo [Thu, 16 Nov 2017 15:02:50 +0000 (16:02 +0100)]
SRv6 improvements to binary API

Change-Id: I260f5fe43074c0be973309f0a0895f50f0ca7c2b
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
6 years agoAddress COVERITY warnings 90/9590/2
Marco Varlese [Mon, 27 Nov 2017 15:46:04 +0000 (16:46 +0100)]
Address COVERITY warnings

Among many false positives the potential NULL pointer dereference seems
to be a valid one hence addressing that with this patch.

Change-Id: Ia55784475294e96f60df64baf8820b459bb85bb7
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoVOM: favour make_shared 83/9583/2
Neale Ranns [Mon, 27 Nov 2017 12:52:35 +0000 (04:52 -0800)]
VOM: favour make_shared

Change-Id: I0c5e198049d510f3b3f9a6aefe49c315449768e3
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoUpdate CSIT tests 171030 -> 171127 76/9576/2
Jan Gelety [Mon, 27 Nov 2017 08:51:17 +0000 (09:51 +0100)]
Update CSIT tests 171030 -> 171127

- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I54f8d49f541102163964a41403ab993a51534e7e
Signed-off-by: Jan Gelety <jgelety@cisco.com>
6 years agotcp: fix proxy connection validation 81/9581/2
Florin Coras [Mon, 27 Nov 2017 10:43:30 +0000 (02:43 -0800)]
tcp: fix proxy connection validation

Change-Id: Icb0274cd3bcabfab8bdff6dec7440a3a15edfbf1
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agovlib: make vlib_buffer_alloc inline function 63/9563/5
Damjan Marion [Fri, 24 Nov 2017 19:15:23 +0000 (20:15 +0100)]
vlib: make vlib_buffer_alloc inline function

Currently, every alloc involves callback function call. With this change
callback function is called only if there is no empty buffers on the
free list.

Change-Id: I2238c19ece7ce182c49ba0f2485add52f335f3b6
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoFix session rule port endianness. 62/9562/4
Milan Lenco [Fri, 24 Nov 2017 16:12:33 +0000 (17:12 +0100)]
Fix session rule port endianness.

Change-Id: I43a7ac5b6c33810a465568d1955f400f4ef08786
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
6 years agoVPP-252 Coding standards cleanup - vnet/vnet/flow 70/9570/2
Swarup Nayak [Sun, 26 Nov 2017 17:41:40 +0000 (23:11 +0530)]
VPP-252 Coding standards cleanup - vnet/vnet/flow

Change-Id: I288b0eeefd22f65e80634068e4b3ce0d83fb50fc
Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
6 years agoFIB: optimise for src memory allocations 69/9569/3
Neale Ranns [Sat, 25 Nov 2017 23:20:26 +0000 (15:20 -0800)]
FIB: optimise for src memory allocations

Most FIB entries will only ever have one source providing forwarding
information. Currently the source infom is stored in a vector of sources
on the FIB entry. Change this to a union of one source inline and a vector.
This saves the need to alloc a vector of sources for each FIB entry.

before:
vpp# ip route add count 1500000 1.0.0.1/32 via 10.10.10.2 loop0
4.392857e5 routes/sec
vpp# ip route del count 1500000 1.0.0.1/32 via 10.10.10.2 loop0
9.175464e5 routes/sec
vpp# ip route add count 1500000 1.0.0.1/32 via 10.10.10.2 loop0
5.193375e5 routes/sec
vpp# sh fib mem
FIB memory
             Name               Size  in-use /allocated   totals
             Entry               72   15000111500011    108000792/108000792
         Entry Source            32   15000111500011    48000352/48000352

after:
vpp# ip route add count 1500000 1.0.0.1/32 via 10.10.10.2 loop0
4.726560e5 routes/sec
vpp# ip route del count 1500000 1.0.0.1/32 via 10.10.10.2 loop0
1.041629e6 routes/sec
vpp# ip route add count 1500000 1.0.0.1/32 via 10.10.10.2 loop0
5.702895e5 routes/sec
vpp# sh fib mem
FIB memory
             Name               Size  in-use /allocated   totals
             Entry               96   15000111500011    144001056/144001056
         Entry Source            32      0   /    0       0/0

Change-Id: Ic71e413eaff1ec152656beda3b94186f7894ea49
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFIB: store the node type not the function pointer. 68/9568/2
Neale Ranns [Sat, 25 Nov 2017 18:04:32 +0000 (10:04 -0800)]
FIB: store the node type not the function pointer.

Saves memory at no appreciable performance cost.
before:
  DBGvpp# sh fib mem
  FIB memory
               Name               Size  in-use /allocated   totals
               Entry               80      7   /   150      560/12000

after:
  DBGvpp# sh fib mem
  FIB memory
               Name               Size  in-use /allocated   totals
               Entry               72      7   /    7       504/504

Change-Id: Ic5d3920ceb57b54260dc9af2078c26484335fef1
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoVOM: handle null for iterator in dump cmd 67/9567/2
Neale Ranns [Sat, 25 Nov 2017 10:52:06 +0000 (02:52 -0800)]
VOM: handle null for iterator in dump cmd

Change-Id: I2e8743d70a8d8604d370218a73d5f37c2f7c4617
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoVCL: include vpp context in accept session reply msg. 66/9566/2
Dave Wallace [Sat, 25 Nov 2017 09:17:39 +0000 (04:17 -0500)]
VCL: include vpp context in accept session reply msg.

Change-Id: I753e94ed4630ad32b7c496cad3a3ba88a5cbd1f6
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVCL: improve debug output 65/9565/2
Dave Wallace [Sat, 25 Nov 2017 02:44:06 +0000 (21:44 -0500)]
VCL: improve debug output

- Refactor debug output to include vpp handle associated
  with session id where appropriate.
- Fix vcom_connect return value on error.
- Refactor vcom_socket_epoll_pwait().
- Fix sock_test_server/client connect failure handling.

Change-Id: I2649596aa4b8a77d9bd876409a76810cb2785797
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoGENEVE: shift/mask for header 88/9488/8
Marco Varlese [Mon, 20 Nov 2017 08:20:38 +0000 (09:20 +0100)]
GENEVE: shift/mask for header

This patch addresses the bit-shifting/masking required to set/get specific
fields/bits in the GENEVE header.

Change-Id: I06ea6d3487c827ec2bc3edfc67c7cb97640d4fc3
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agodpdk: enable tx checksum offloads as default, add disable knob 58/9558/2
Damjan Marion [Fri, 24 Nov 2017 13:34:18 +0000 (14:34 +0100)]
dpdk: enable tx checksum offloads as default, add disable knob

New startup.conf knob:

dpdk {  ... no-tx-checksum-offload ... }

Change-Id: I337fd57616dd77687300861b411b420a3cb75149
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVOM: Additions to allow uses to UT applications that use VOM 52/9552/3
Neale Ranns [Thu, 23 Nov 2017 20:15:00 +0000 (12:15 -0800)]
VOM: Additions to allow uses to UT applications that use VOM

- find object by key
- compare objects

Change-Id: I36ec8612be9482bcef7ceced2a59f7403f77b3e8
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agodpdk: avoid false sharing of dpdk_buffer_per_thread_data 56/9556/1
Damjan Marion [Fri, 24 Nov 2017 10:15:38 +0000 (11:15 +0100)]
dpdk: avoid false sharing of dpdk_buffer_per_thread_data

Change-Id: Iaae69a1219ccaedbfee5c3075c41c7b31c6e2b70
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agomemif: fix input node multiversion constructor 51/9551/1
Damjan Marion [Thu, 23 Nov 2017 18:13:05 +0000 (19:13 +0100)]
memif: fix input node multiversion constructor

Change-Id: I498ed1162eadf3eff2543f1ec02a9b1e5fdc05d8
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agomemif: try harder to transmit packets 50/9550/2
Damjan Marion [Thu, 23 Nov 2017 16:41:05 +0000 (17:41 +0100)]
memif: try harder to transmit packets

Change-Id: I1e57a86b8872798a888e7d6128d9c4537a8090e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agodpdk: prefetch both cachelines during buffer free 49/9549/2
Damjan Marion [Thu, 23 Nov 2017 16:27:05 +0000 (17:27 +0100)]
dpdk: prefetch both cachelines during buffer free

Change-Id: I4ae65494b8f9bc51521add5e66a51b594aad6716
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agomemif: multiversioning 48/9548/1
Damjan Marion [Thu, 23 Nov 2017 16:19:08 +0000 (17:19 +0100)]
memif: multiversioning

Change-Id: I881551e6c13503a71ae29a7a58bde4d193745d55
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoTests clean-up when cleaning VPP code. 27/9527/3
Marco Varlese [Wed, 22 Nov 2017 15:46:58 +0000 (16:46 +0100)]
Tests clean-up when cleaning VPP code.

Tests are not cleaned when running "make wipe". However, it makes sense
to clean tests too since the "tested code" has been wiped and - likely -
will be rebuilt with new/extra features/requirements.

Change-Id: I34cc188e78f51d327f78f3d43cea5a82fdc6fb25
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoVCL: remove bogus ASSERT(). 33/9533/2
Dave Wallace [Wed, 22 Nov 2017 20:33:21 +0000 (15:33 -0500)]
VCL: remove bogus ASSERT().

Change-Id: I810cbcd13f73c0376c6be64ce2d11404bdd1755f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoVPP-254 Coding standard cleanup - vnet/vnet/hdlc 21/9521/2
Swarup Nayak [Wed, 22 Nov 2017 11:11:57 +0000 (16:41 +0530)]
VPP-254 Coding standard cleanup - vnet/vnet/hdlc

Change-Id: I125b1ca20a5b30d199d4a79ad0034533818a5e9c
Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
6 years agosession: do not check transport for local table binds 31/9531/4
Florin Coras [Wed, 22 Nov 2017 18:39:09 +0000 (10:39 -0800)]
session: do not check transport for local table binds

Change-Id: I326c4472e5da8b6c0737655952d1983c7a0ea996
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years ago Makefile: make_parallel_flags via env variable 12/9512/3
Ed Kern [Wed, 22 Nov 2017 00:22:23 +0000 (17:22 -0700)]
 Makefile: make_parallel_flags via env variable

    /proc/cpuinfo with container builds may lead to jenkins failures
    ability to pass in MAKE_PARALLEL_FLAGS via env directly for
    container builds

Change-Id: Id02acb542d5ffbe3f4dec7712ae2cb07512b236d
Signed-off-by: Ed Kern <ejk@cisco.com>
6 years agodpdk: fix potential crash in buffer free function 23/9523/4
Damjan Marion [Wed, 22 Nov 2017 12:27:03 +0000 (13:27 +0100)]
dpdk: fix potential crash in buffer free function

Original code was not thread safe.

Change-Id: I3d473b976d2b9ff62f42955c5c2a7fd6b4990cc2
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agosession: more rules unit tests and cli improvements 13/9513/2
Florin Coras [Wed, 22 Nov 2017 06:13:03 +0000 (22:13 -0800)]
session: more rules unit tests and cli improvements

Change-Id: I7e5545297ab9f2db8d7d07e44c744bdb0a0874a7
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agouse intel intrinsics in clib_memcpy64_x4 22/9522/2
Damjan Marion [Wed, 22 Nov 2017 11:41:32 +0000 (12:41 +0100)]
use intel intrinsics in clib_memcpy64_x4

While my original attmept was to write this function to be portable
and work on non-x86 systems, seems that gcc-5 desn't respect aligment
attribute and issues alligned vector insutruciton which causes crash.

Change-Id: If165c8d482ac96f2b71959d326f9772b48097b48
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoCLI for interface MPLS enable returns errors to caller 19/9519/2
Neale Ranns [Wed, 22 Nov 2017 10:49:13 +0000 (02:49 -0800)]
CLI for interface MPLS enable returns errors to caller

Change-Id: I9eef6fb9d050552f0759080ea645b885d5b9cc12
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoFix MPLS local-label CLI 20/9520/2
Neale Ranns [Wed, 22 Nov 2017 11:05:29 +0000 (03:05 -0800)]
Fix MPLS local-label CLI

Change-Id: Ia3d3d7a75282dc3073eaa83e49cef756db19874a
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoVOM: stats: Associate stat obj to interface 10/9510/2
Mohsin Kazmi [Mon, 20 Nov 2017 09:23:47 +0000 (10:23 +0100)]
VOM: stats: Associate stat obj to interface

Change-Id: Id8b159dd72b92798538a32fe570fb0038d742ef2
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoVCL: close-on-empty state transition refactoring. 02/9502/4
Dave Wallace [Tue, 21 Nov 2017 08:45:09 +0000 (03:45 -0500)]
VCL: close-on-empty state transition refactoring.

- Refactor session disconnect/close state
  transitions. Only remove session state
  when app calls close().  Add HUP/reset
  feedback by returning ECONNRESET.
- Update debug messages.
- Use VCL_LOCK_AND_GET_SESSION macro more
  extensively

Change-Id: I23d372834b901a6726e6d6c1061df73ad967882f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agosession: unset fifo event before reading fifo size 11/9511/1
Florin Coras [Tue, 21 Nov 2017 12:20:42 +0000 (04:20 -0800)]
session: unset fifo event before reading fifo size

Change-Id: Ic32a76e5f7c48fd52f2e93ee18ba23fb6ad1b855
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agotcp: initialize builtin client ns 01/9501/2
Florin Coras [Mon, 20 Nov 2017 21:33:33 +0000 (13:33 -0800)]
tcp: initialize builtin client ns

Change-Id: I992f7f60e463b81bbdbd53957f656131fd48632b
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agostn-plugin: do not assume all punted packets start with L3 header. 07/9507/2
Andrew Yourtchenko [Tue, 21 Nov 2017 13:37:43 +0000 (14:37 +0100)]
stn-plugin: do not assume all punted packets start with L3 header.

Some punt scenarios (notably, involving DNS traffic)
do not have the current_data set to the L3 header -
as a result, chaos ensues. To tackle this, approach
the parsing from the other side, and look at
the hopefully remaining ethernet header
to see whether the packet is IPv4 or IPv6.

Verified the STN'ed TCP traffic continues to work,
and that the STN'ed DNS traffic starts to work as well.

Change-Id: I0aa2ad1df2fb23dd4e54a564714103b19114d636
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agouse REV on aarch64 for endianness swapping (VPP-1067) 05/9505/3
Gabriel Ganne [Tue, 21 Nov 2017 10:33:45 +0000 (11:33 +0100)]
use REV on aarch64 for endianness swapping (VPP-1067)

Change-Id: I2de52725f40380422ca5019405df36cc05681603
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agolibmemif: unit test update, continue configure if check module missing 94/9494/3
Jakub Grajciar [Mon, 20 Nov 2017 12:11:50 +0000 (13:11 +0100)]
libmemif: unit test update, continue configure if check module missing

Change-Id: I11ef4e7dcf1759eb3545be5db2a7196d1217a6dd
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agodpdk: add l2_hdr_offset and l3_hdr_offset in vlib_buffer_t 06/9506/1
Damjan Marion [Tue, 21 Nov 2017 12:12:41 +0000 (13:12 +0100)]
dpdk: add l2_hdr_offset and l3_hdr_offset in vlib_buffer_t

Change-Id: I0a6d1257e391c3b6f7da6498bd5f7d4c545d17e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agosession/tcp: filtering improvements 86/9486/4
Florin Coras [Mon, 20 Nov 2017 02:06:58 +0000 (18:06 -0800)]
session/tcp: filtering improvements

- make allow action explicit (-3)
- add session lookup is_filtered return flag that is set if lookup hit a
  deny filter
- change tcp logic to drop filtered packets when punting is enabled

Change-Id: Ic38f294424663a4e108439b7571511f46f8e0be1
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agodpdk: add support for DPDK 17.11 69/9469/8
Damjan Marion [Fri, 17 Nov 2017 08:46:41 +0000 (09:46 +0100)]
dpdk: add support for DPDK 17.11

Also remove DPDK 17.05 support.

Change-Id: I4f96cb3f002cd90b12d800d6904f2364d7c4e270
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVCL: Update lcl addr/port from connect session reply msg. 87/9487/2
Dave Wallace [Mon, 20 Nov 2017 07:31:48 +0000 (02:31 -0500)]
VCL: Update lcl addr/port from connect session reply msg.

Change-Id: Ic738448007e49b0b36e336ffd50e800b04ad3c6d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoHave PAPI find its API definition files 81/9481/2
Chris Luke [Sat, 4 Nov 2017 03:32:38 +0000 (23:32 -0400)]
Have PAPI find its API definition files

- Add a basic heuristic to have vpp_papi search in several
  places for the JSON API files.
- It's clever enough to work out the path to these files
  from within several places in the source tree, falling
  back to the system location as a last resort.

Change-Id: I1f823588e5aa0064d545ce4206ab29dbdedc4c7f
Signed-off-by: Chris Luke <chrisy@flirble.org>
6 years agonowhere to set read_timeout 32/9332/4
dongjuan [Thu, 9 Nov 2017 06:46:36 +0000 (14:46 +0800)]
nowhere to set read_timeout

Change-Id: I8a16f2ba884451ca8028adb91383d57fdf1d9d50
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
6 years agosession: fix session rules api to use transport proto 84/9484/2
Florin Coras [Sun, 19 Nov 2017 02:45:20 +0000 (18:45 -0800)]
session: fix session rules api to use transport proto

Change-Id: Ie7b795715530e0920763098eb468c55fb17b1a2c
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoVCL-LDPRELOAD: Fix CID179207 85/9485/1
Dave Wallace [Sun, 19 Nov 2017 16:20:02 +0000 (11:20 -0500)]
VCL-LDPRELOAD: Fix CID179207

Change-Id: Ia6b9e39d5a2ef064cf71bfe87cb4b4a0648d735d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoCall a plugin init function by name 80/9480/2
Dave Barach [Sat, 18 Nov 2017 13:43:06 +0000 (08:43 -0500)]
Call a plugin init function by name

Use this macro to arrange init function ordering between friend
plugins.  Fails in the usual manner if the plugin doesn't exist, or if
the init function symbol is AWOL.

clib_error_t *
thisplug_init (vlib_main_t *vm)
{
  clib_error_t *error = 0;

  if ((error = vlib_plugin_init_function ("otherplug.so", otherplug_init)))
     return error;

  <etc>
  return error;
}
VLIB_INIT_FUNCTION(thisplug_init);

Change-Id: Ideecaf46bc0b1546e85096e54be8ddef87946565
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agotest http server: prealloc fifos/segment options 78/9478/2
Florin Coras [Fri, 17 Nov 2017 22:26:01 +0000 (14:26 -0800)]
test http server: prealloc fifos/segment options

Change-Id: I5e36ea9335a9a633a112c27396997a765f279e06
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoRename classifier ip6-sr metadata set action 79/9479/1
Dave Barach [Sat, 18 Nov 2017 11:58:34 +0000 (06:58 -0500)]
Rename classifier ip6-sr metadata set action

There's nothing ip6-sr specific about it.

Change-Id: I9e3710162bd81b535c46599c988557abf5a5003b
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agounformat function for FIB paths 39/9439/3
Neale Ranns [Wed, 15 Nov 2017 20:54:46 +0000 (12:54 -0800)]
unformat function for FIB paths

Change-Id: I32de25890ac0a643314f650591d2479879d9a2a6
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoVOM fixes and logger improvements 70/9470/2
Neale Ranns [Fri, 17 Nov 2017 13:08:55 +0000 (05:08 -0800)]
VOM fixes and logger improvements

Change-Id: I5e3fa5e098a8ea26dbc3d3a1dc064e3507e33d8e
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoAdd a non interactive mode 29/9429/2
John DeNisco [Wed, 15 Nov 2017 13:50:57 +0000 (08:50 -0500)]
Add a non interactive mode

Change-Id: I2ebcb1acb43b4316e3dd48e83909d710dbef4e2f
Signed-off-by: John DeNisco <jdenisco@cisco.com>
6 years agoReplace tap interface using general interface 67/9467/4
Hongjun Ni [Fri, 17 Nov 2017 15:43:11 +0000 (23:43 +0800)]
Replace tap interface using general interface

Change-Id: Icd73f00162fb6aabe296c8bb6f2174ad4f6a17b7
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
6 years agosubunit is required on centos as well as fedora 56/9456/2
Gabriel Ganne [Thu, 16 Nov 2017 13:47:42 +0000 (14:47 +0100)]
subunit is required on centos as well as fedora

Remove fedora dependency restriction on subunit and subunit-devel packages.
libsunit is only called in test/ext/Makefile on all platforms safe opensuse.

Change-Id: I483f42f20f6ba8bd112c18a9c51753a5d816d1c1
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Signed-off-by: Romain Ly <romain.ly@enea.com>
6 years agoacl-plugin: use ip.save_rewrite_length to calculate IP header offset on L3 egress... 34/9434/2
Andrew Yourtchenko [Wed, 15 Nov 2017 15:58:51 +0000 (16:58 +0100)]
acl-plugin: use ip.save_rewrite_length to calculate IP header offset on L3 egress path

L3 egress path does not set the ethernet flags reflecting the count of VLANs,
but rather has the offset explicitly, so use that.

Change-Id: Id3f6562dcd52ca24137c305f1a1c88c1f125da78
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agovppcom: improve listener session handling 66/9466/6
Florin Coras [Thu, 16 Nov 2017 23:32:50 +0000 (15:32 -0800)]
vppcom: improve listener session handling

Change-Id: I86b2e2c5a655e53a915fbf62ff04ee23c86de234
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoacl-plugin: also print human-friendly format of 5tuple in packet trace 27/9427/2
Andrew Yourtchenko [Wed, 15 Nov 2017 13:04:05 +0000 (14:04 +0100)]
acl-plugin: also print human-friendly format of 5tuple in packet trace

The original version printed just a few u64s, which is useful for
directly working on the code, but not when figuring out what is
possibly a config or environment-related issue. So, add printing
the 5-tuple struct in a way that is usable by an operator.

Change-Id: I84cc3a239cdaff05ed31c3458cea198e38b58e03
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agotcp: register with ip for header parsing by default 64/9464/1
Florin Coras [Thu, 16 Nov 2017 17:57:50 +0000 (09:57 -0800)]
tcp: register with ip for header parsing by default

Change-Id: I4e420bcc9241b03e179a939911059c0cc3704a51
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoDeal with double name-pointer chases 59/9459/3
Dave Barach [Thu, 16 Nov 2017 15:01:12 +0000 (10:01 -0500)]
Deal with double name-pointer chases

Change-Id: I153b07b4348133535b16b6bf55527d19a6b927c6
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agodpdk: add additional data to TX trace 49/9449/2
Damjan Marion [Thu, 16 Nov 2017 13:14:57 +0000 (14:14 +0100)]
dpdk: add additional data to TX trace

Change-Id: I02b2b69db1e2afe62e3d3413034feb3bdcb3123e
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agolibmemif: unmask head/tail pointers fix, additional ring info in memif_queue_details_t 48/9448/2
Jakub Grajciar [Thu, 16 Nov 2017 13:02:49 +0000 (14:02 +0100)]
libmemif: unmask head/tail pointers fix, additional ring info in memif_queue_details_t

Change-Id: I1dbf91c2a1575d5a82af70bfccdd990310323a8c
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agodpdk/ipsec: use physmem when creating pools 30/9430/2
Sergio Gonzalez Monroy [Wed, 15 Nov 2017 15:43:35 +0000 (15:43 +0000)]
dpdk/ipsec: use physmem when creating pools

Change-Id: Ic4f797cea6fa21fb29d646256210357cf5267b38
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
6 years agoAdd Support of DHCP VSS Type 0 where VPN-ID is ASCII 20/9420/4
John Lo [Tue, 14 Nov 2017 18:19:26 +0000 (13:19 -0500)]
Add Support of DHCP VSS Type 0 where VPN-ID is ASCII

Enhence support of DHCP VSS (Virtual Subnet Selection) to include
VSS type 0 where VSS info is a NVT (Network Virtual Terminal)
ASCII VPN ID where the ASCII string MUST NOT be terminated with a
zero byte. Existing code already support VSS type 1, where VSS
information is a RFC 2685 VPN-ID of 7 bytes with 3 bytes OUI
and 4 bytes VPN index, and VSS type 255 indicating global VPN.

Change-Id: I54edbc447c89a2aacd1cc9fc72bd5ba386037608
Signed-off-by: John Lo <loj@cisco.com>
6 years agomemif: fix uninitialized pointer read coverity error 41/9441/1
Steven [Thu, 16 Nov 2017 00:00:38 +0000 (16:00 -0800)]
memif: fix uninitialized pointer read coverity error

Set the content of tmp.sock prior to calling memif_msg_send_disconnect.
Also fix the problem socket was not close in the same spot due to
error encountered.

Change-Id: I8f54ebad2250d1944afcc52e71d2a59da05362af
Signed-off-by: Steven <sluong@cisco.com>
6 years agoBIER: coverity fixes 38/9438/2
Neale Ranns [Wed, 15 Nov 2017 18:44:07 +0000 (10:44 -0800)]
BIER: coverity fixes

Change-Id: I657bade082f9f754b294cd5f23ecfad4f0f46265
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoPunt DNS request/reply traffic when name resolution disabled 37/9437/1
Dave Barach [Wed, 15 Nov 2017 18:28:15 +0000 (13:28 -0500)]
Punt DNS request/reply traffic when name resolution disabled

Change-Id: Iaad22f25993783be57247aa1f050740f96d2566a
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoRevert "vnet: af_packet mark l3 offload cksum" 35/9435/2
Jakub Grajciar [Wed, 15 Nov 2017 16:25:50 +0000 (17:25 +0100)]
Revert "vnet: af_packet mark l3 offload cksum"

This reverts commit fa600c9169c0d7104af7a9be12a0471a8a8c8262.

Change-Id: I873b53b2c025d7aba2211cab9b3e2d780af33b32
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
6 years agovxlan extended tests - fix scapy-related issues 23/9423/2
Gabriel Ganne [Wed, 15 Nov 2017 09:55:22 +0000 (10:55 +0100)]
vxlan extended tests - fix scapy-related issues

- Add vxlan-gpe binding on udp port 4790 (taken from scapy upstream)
- VXLAN.VNI -> VXLAN.vni

Change-Id: If7ad38fa04fbfec01e01c81a06e88ffe70183672
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoadd libffi-dev to DEB_DEPENDS 54/8954/3
Gabriel Ganne [Mon, 23 Oct 2017 08:01:10 +0000 (10:01 +0200)]
add libffi-dev to DEB_DEPENDS

Package is already in the RPM_DEPENDS list, and is required for test-* targets

Change-Id: I3846e68855402b50a51adf3daf218e0244562cd6
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoarmv8 crc32 - fix macro name 18/9418/2
Gabriel Ganne [Tue, 14 Nov 2017 16:33:51 +0000 (17:33 +0100)]
armv8 crc32 - fix macro name

Change-Id: Iba2d20c0a3d4f07457d108d014a6fa4522cb8e2c
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
6 years agoFix cosmetic issue in configure.ac 26/9426/2
Damjan Marion [Wed, 15 Nov 2017 12:57:20 +0000 (13:57 +0100)]
Fix cosmetic issue in configure.ac

Change-Id: I0a6a58b4ed0a6609382cce8bc2c6668a681823fc
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVOM: interface's handle() retreives from singular instance 24/9424/2
Neale Ranns [Wed, 15 Nov 2017 10:52:13 +0000 (02:52 -0800)]
VOM: interface's handle() retreives from singular instance

Change-Id: I262f2113f5805c0f89b615a0383efa8520184dd1
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoVOM: interface RD update reconfigures L3 bindings 21/9421/2
Neale Ranns [Tue, 14 Nov 2017 19:04:28 +0000 (11:04 -0800)]
VOM: interface RD update reconfigures L3 bindings

Change-Id: I273e1ea28c3c146e4a88d031c790c1cc56dccf00
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>