vpp.git
7 years agoVXLAN/TEST:validate vxlan del reply has valid sw_if_index 65/6065/4
Eyal Bari [Thu, 6 Apr 2017 00:31:00 +0000 (03:31 +0300)]
VXLAN/TEST:validate vxlan del reply has valid sw_if_index

Change-Id: Icf7420b7ee212e9341f63f005dc287d019fd8e4c
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoMPLS Mcast 53/5653/8
Neale Ranns [Wed, 1 Mar 2017 23:12:11 +0000 (15:12 -0800)]
MPLS Mcast

 1 - interface-DPO
        Used in the Data-plane to change a packet's input interface
 2 - MPLS multicast FIB entry
        Same as a unicast entry but it links to a replicate not a load-balance DPO
 3 - Multicast MPLS tunnel
        Update MPLS tunnels to use a FIB path-list to describe the endpoint[s]. Use the path-list to generate the forwarding chain (DPOs) to link to .
 4 - Resolve a path via a local label (of an mLDP LSP)
        For IP multicast entries to use an LSP in the replication list, we need to decribe the 'resolve-via-label' where the label is that of a multicast LSP.
 5 - MPLS disposition path sets RPF-ID
        For a interface-less LSP (i.e. mLDP not RSVP-TE) at the tail of the LSP we still need to perform an RPF check. An MPLS disposition DPO performs the MPLS pop validation checks and sets the RPF-ID in the packet.
 6 - RPF check with per-entry RPF-ID
       An RPF-ID is used instead of a real interface SW if index in the case the IP traffic arrives from an LSP that does not have an associated interface.

Change-Id: Ib92e177be919147bafeb599729abf3d1abc2f4b3
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoFix gpe dp args to allow for 32 bit bridge domain ids, VPP-690 77/6077/2
Florin Coras [Thu, 6 Apr 2017 22:27:35 +0000 (15:27 -0700)]
Fix gpe dp args to allow for 32 bit bridge domain ids, VPP-690

Change-Id: I4e3df197eed33acbceaff495279def8716773303
Signed-off-by: Florin Coras <fcoras@cisco.com>
7 years agoVPP-684.Add ip which mask length exceeding upper limit,ping segmentfault 68/6068/2
flyingeagle23 [Thu, 6 Apr 2017 08:47:46 +0000 (16:47 +0800)]
VPP-684.Add ip which mask length exceeding upper limit,ping segmentfault

Change-Id: I2d1c5e4dbdcab2a81d6c88801183ca0bbc83e1d9
Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
7 years agoacl-plugin: make the IPv4/IPv6 non-first fragment handling in line with ACL (VPP... 35/6035/2
Andrew Yourtchenko [Tue, 4 Apr 2017 14:10:40 +0000 (14:10 +0000)]
acl-plugin: make the IPv4/IPv6 non-first fragment handling in line with ACL (VPP-682)

This fixes the previously-implicit "drop all non-first fragments" behavior
to be more in line with security rules: a non-first fragment is treated
for the purposes of matching the ACL as a packet with the port
match succeeding. This allows to change the behavior to permit
the fragmented packets for the default "permit specific rules"
ruleset, but also gives the flexibility to block the non-initial
fragments by inserting into the begining a bogus rule
which would deny the L4 traffic.

Also, add a knob which allows to potentially turn this behavior off
in case of a dire need (and revert to dropping all non-initial fragments),
via a debug CLI.

Change-Id: I546b372b65ff2157d9c68b1d32f9e644f1dd71b4
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 9fc0c26c6b28fd6c8b8142ea52f52eafa7e8c7ac)

7 years agojvpp: remove unused print&endian headers (fixes VPP-688) 69/6069/3
Marek Gradzki [Thu, 6 Apr 2017 07:37:00 +0000 (09:37 +0200)]
jvpp: remove unused print&endian headers (fixes VPP-688)

Change-Id: I97e03d98758a08b1f75a9a1f35f0181385a10ae8
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoBFD-FIB interactions 63/6063/5
Neale Ranns [Wed, 5 Apr 2017 15:11:14 +0000 (08:11 -0700)]
BFD-FIB interactions

- single-hop BFD: attach a delegate to the appropriate adjacency
- multi-hop BFD [not supported yet]: attach a delegate to the FIB entry.

adjacency/fib_entry state tracks the BFD session state. when the state is down the object does not contribute forwarding hence and hence dependent objects will not use it.
For example, if a route is ECMP via two adjacencies and one of them is BFD down, then only the other is used to forward (i.e. we don't drop half the traffic).

Change-Id: I0ef53e20e73b067001a132cd0a3045408811a822
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoVPP-686: create bridge-domain 50/6050/3
Choonho Son [Wed, 5 Apr 2017 10:09:52 +0000 (19:09 +0900)]
VPP-686: create bridge-domain

- update default flags
- add missing flag learn

Change-Id: I50a1a001848769836468838775b59d3414d27710
Signed-off-by: Choonho Son <choonho.son@gmail.com>
7 years agoUse thread local storage for thread index 11/6011/4
Damjan Marion [Wed, 5 Apr 2017 17:18:20 +0000 (19:18 +0200)]
Use thread local storage for thread index

This patch deprecates stack-based thread identification,
Also removes requirement that thread stacks are adjacent.

Finally, possibly annoying for some folks, it renames
all occurences of cpu_index and cpu_number with thread
index. Using word "cpu" is misleading here as thread can
be migrated ti different CPU, and also it is not related
to linux cpu index.

Change-Id: I68cdaf661e701d2336fc953dcb9978d10a70f7c1
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVXLAN:fix tunnel delete not returning sw_if_index 64/6064/2
Eyal Bari [Thu, 6 Apr 2017 00:26:59 +0000 (03:26 +0300)]
VXLAN:fix tunnel delete not returning sw_if_index

when tunnel is deleted reply should include the tunnel's sw_if_index
instead of ~0

Change-Id: Ie5e04f4feab9cf2c90f0e155ec0fb9ca839a956d
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoL2FIB:add l2fib_flush_bd l2fib_flush_int apis 38/6038/4
Eyal Bari [Wed, 5 Apr 2017 02:33:21 +0000 (05:33 +0300)]
L2FIB:add l2fib_flush_bd l2fib_flush_int apis

Change-Id: I0a6989c6963956f3e60e8c50835c57845fccef8c
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoBFD: add ARP-awareness, fix bugs 58/6058/2
Klement Sekera [Tue, 4 Apr 2017 14:19:48 +0000 (16:19 +0200)]
BFD: add ARP-awareness, fix bugs

Make BFD ARP-aware when sending out packets.
Fix a few one-liner bugs discovered while integrating with cisco
nexus. Enhance CLI view to better observe session state.

Change-Id: I266c29492f351207b84328ab665d9d697969da9c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoacl-plugin: fix pretty-printing in "api trace custom-dump" (VPP-683) 49/6049/2
Andrew Yourtchenko [Tue, 4 Apr 2017 20:38:33 +0000 (20:38 +0000)]
acl-plugin: fix pretty-printing in "api trace custom-dump" (VPP-683)

Change-Id: Id15b401223aabe7dacb7566c871ebefc17fbb1fc
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 7fd3f513c7df198c45204eba0a3e9a3abe509593)

7 years agoFix two more memif coverity issues 55/6055/2
Milan Lenco [Wed, 5 Apr 2017 12:42:42 +0000 (14:42 +0200)]
Fix two more memif coverity issues

Change-Id: I935620798d6fe82b99b6bd564749e20a189b4ae3
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
7 years agoFix name typo 57/6057/2
Sergio Gonzalez Monroy [Wed, 5 Apr 2017 14:12:38 +0000 (15:12 +0100)]
Fix name typo

Change-Id: Ic7128d4f8a13c021e0fd4731a717193d050431d2
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agoLISP: fix crash when GPE interface is re-added, VPP-685 42/6042/2
Filip Tehlar [Wed, 5 Apr 2017 08:06:03 +0000 (10:06 +0200)]
LISP: fix crash when GPE interface is re-added, VPP-685

Change-Id: Ib83baf6ddec4ac192f6b4123d9eb599fb370fd0c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoLISP: fix crash when adding a negative forwarding entry, VPP-681 23/6023/3
Filip Tehlar [Tue, 4 Apr 2017 13:26:54 +0000 (15:26 +0200)]
LISP: fix crash when adding a negative forwarding entry, VPP-681

Change-Id: I190696da5555c05074ee0eee32eb914bd16e38fb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoGRE over IPv6 24/3224/9
Ciara Loftus [Fri, 30 Sep 2016 14:47:03 +0000 (15:47 +0100)]
GRE over IPv6

Refactors the GRE node to work with both IPv4 and IPv6 transports.

Note that this changes the binary configuration API to support both
address families; each address uses the same memory for either
address type and a flag to indicate which is in use.

The CLI and VAT syntax remains unchanged; the code detects whether
an IPv4 or an IPv6 address was given.

Configuration examples:

IPv4 CLI: create gre tunnel src 192.168.1.1 dst 192.168.1.2
IPv6 CLI: create gre tunnel src 2620:124:9000::1 dst 2620:124:9000::2

IPv4 VAT: gre_add_del_tunnel src 192.168.1.1 dst 192.168.1.2
IPv6 VAT: gre_add_del_tunnel src 2620:124:9000::1 dst 2620:124:9000::2

Change-Id: Ica8ee775dc101047fb8cd41617ddc8fafc2741b0
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
7 years agoFix issue with gre protocol registration when running multithreaded 13/6013/4
Damjan Marion [Mon, 3 Apr 2017 23:28:26 +0000 (01:28 +0200)]
Fix issue with gre protocol registration when running multithreaded

Change-Id: Ic5bd7da08f8a46b548d56516e4633f0b8badf2a1
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix issue with udp port registration when running multithreaded 08/6008/2
Damjan Marion [Mon, 3 Apr 2017 12:56:08 +0000 (14:56 +0200)]
Fix issue with udp port registration when running multithreaded

Change-Id: I16606757176649e61f0a51895329586311144766
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoBD/API:add bridge_domain_set_mac_age api 16/6016/5
Eyal Bari [Tue, 4 Apr 2017 01:46:32 +0000 (04:46 +0300)]
BD/API:add bridge_domain_set_mac_age api

Change-Id: Ic2d33b31ba88f6d9602a22439865637d98cf4a33
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoClear pid-vector, to avoid spurious track selection 21/6021/2
Dave Barach [Tue, 4 Apr 2017 12:00:23 +0000 (08:00 -0400)]
Clear pid-vector, to avoid spurious track selection

Change-Id: Ibc293aa1305126920c0b2c44df1f7a7d5ae9ea9d
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agovlib: make vlib_node_interrupt_pending(...) thread safe 91/5891/5
Damjan Marion [Tue, 28 Mar 2017 12:16:15 +0000 (14:16 +0200)]
vlib: make vlib_node_interrupt_pending(...) thread safe

Change-Id: I24577bd32ae23fbe8515cc8d960eab5448ce3b5c
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoVXLAN:fix api dump flipped src<->dst 15/6015/2
Eyal Bari [Tue, 4 Apr 2017 01:23:52 +0000 (04:23 +0300)]
VXLAN:fix api dump flipped src<->dst

Change-Id: I48bf6c46d78773669e76dc4749be3b1af80782f4
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agomake test: relax BFD time intervals 09/6009/2
Klement Sekera [Mon, 3 Apr 2017 06:10:08 +0000 (08:10 +0200)]
make test: relax BFD time intervals

Increased time intervals mean longer test runs, but also reduce
the chance of getting annoying (especially in gerrit) random failures.
Now that tests are split into `basic' and `all', the increased runtime
of BFD tests (of which majority doesn't run in basic case) doesn't
matter too much..

Change-Id: I4a15bb4facad634f123bc9cc6f45eddbf4976fd1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agog2: add multi-track time-slew controls 10/6010/2
Dave Barach [Mon, 3 Apr 2017 14:22:17 +0000 (10:22 -0400)]
g2: add multi-track time-slew controls

Create an elog_merge utility, extracted from test_elog.

Change-Id: Ide137b4858c88b3a2885583b7fbb15ddc4963af9
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agomake test: tweak helper scripts 07/6007/2
Klement Sekera [Mon, 3 Apr 2017 04:21:46 +0000 (04:21 +0000)]
make test: tweak helper scripts

Change-Id: Iee6016757e45c832e8868f0bdcfd4192dd3380c8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoFix memif coverity issues 82/5982/5
Milan Lenco [Fri, 31 Mar 2017 12:51:18 +0000 (14:51 +0200)]
Fix memif coverity issues

Change-Id: I844ec53b55ceaa1e00996f5cf8a018537ea8b481
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
7 years agoUpdate CSIT tests 170313 -> 170403 97/5997/2
Jan Gelety [Mon, 3 Apr 2017 07:37:00 +0000 (09:37 +0200)]
Update CSIT tests 170313 -> 170403

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

Change-Id: I4bf32bc12c7417f7c19b23287a2b2899eb8fb02d
Signed-off-by: Jan Gelety <jgelety@cisco.com>
7 years agovnet: remove vnet/rewrite.h from vnet.am 05/6005/1
Damjan Marion [Mon, 3 Apr 2017 10:02:32 +0000 (12:02 +0200)]
vnet: remove vnet/rewrite.h from vnet.am

Change-Id: I2a1246061e57c4caae0a1a1b861c459d115860cd
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd an API call to set interface MAC addresses. 44/5844/6
Jon Loeliger [Thu, 30 Mar 2017 13:39:33 +0000 (08:39 -0500)]
Add an API call to set interface MAC addresses.

Change-Id: I316862e1d33e5d10c058317cc4827304e55ceba4
Signed-off-by: Jon Loeliger <jdl@netgate.com>
7 years agoAdjacency layout change and move to vnet/adj 24/5924/3
Neale Ranns [Mon, 20 Feb 2017 22:19:51 +0000 (14:19 -0800)]
Adjacency layout change and move to vnet/adj

Change-Id: I03195a86c69f84a301051c6b3ab64456bbf28645
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoTCP cc/window management fixes and debugging 49/5949/11
Florin Coras [Thu, 30 Mar 2017 09:54:28 +0000 (02:54 -0700)]
TCP cc/window management fixes and debugging

- added persist timer
- update rcv_las whenever sending an ack
- moved fifo size to its own cache line
- improved session and builtin client debugging

Change-Id: Ia649cf942cf0c061a713e8b67f0eb6974a6cd55b
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agomake test: add scripts for easy test looping 73/5973/2
Klement Sekera [Mon, 13 Mar 2017 06:39:08 +0000 (06:39 +0000)]
make test: add scripts for easy test looping

Allows easy running of test(s) in a loop with configurable
action (e.g. git pull) run between test runs and possible
email notification on failure.

Usage:

test-loop.sh [-p <pre-exec-cmd>] [-m <email>] -- <make test options>

Example:

Run 'make test-debug' in a loop until a failure is encountered,
upon which an email is fired to ksekera@cisco.com. In between test
runs, update the workspace using via 'git pull' and if anything changed,
perform 'git clean' before running another 'make test-debug':

test/scripts/test-loop.sh -p test/scripts/git_pull_or_clean.sh \
-m ksekera@cisco.com -- test-debug

Change-Id: I114321c6c152d2c7e181e915fc8c51aab1ff3693
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoCLI: create/delete bridge-domain 09/5909/6
Choonho Son [Wed, 29 Mar 2017 11:07:45 +0000 (20:07 +0900)]
CLI: create/delete bridge-domain

Added new CLI command
- create bridge-domain <bridge-domain-id>
- create bridge-domain <bridge-domain-id> del

Change-Id: I1a7d632c7daa3c37b7f424a184e8fabd489518e9
Signed-off-by: Choonho Son <choonho.son@gmail.com>
7 years agoARP/ND/API:fix arp reg + nd no identical regs 90/5990/3
Eyal Bari [Sat, 1 Apr 2017 00:55:08 +0000 (03:55 +0300)]
ARP/ND/API:fix arp reg + nd no identical regs

fixed arp registration without allocating the event
added protection against identical ND registrations

Change-Id: I4e2db4913b35d895d8686ada1f0818920f276ad6
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoClean up event log merge code 91/5991/2
Dave Barach [Sat, 1 Apr 2017 15:07:40 +0000 (11:07 -0400)]
Clean up event log merge code

Fix a decade-old ridiculous qsort function bug. Managed to subtract
floating-point numbers as if they were integers, leading to
manufactured time-paradoxes. That completely confuses g2, leading to
the summary disappearance of entire tracks' worth of data at high zoom
levels.

Add a manual alignment tweak parameter to elog_merge, users can
dial-out time paradoxes caused by NTP-grade clock synchronization.
The event-logger has a precision of O(100ns), whereas NTP
synchronization is O(1ms).

Change-Id: I69dedabaa314f69f9df74ec9ee66e21e6c87f703
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoMTRIE Optimisations 2 89/5889/6
Neale Ranns [Tue, 28 Mar 2017 10:49:52 +0000 (03:49 -0700)]
MTRIE Optimisations 2

1) 16-8-8 stride. Reduce trie depth walk traded with increased memory in the top PLY.
2) separate the vector of protocol-independent (PI) fib_table_t with the vector of protocol dependent (PD) FIBs. PD FIBs are large structures, we don't want to burn the memory for ech PD type
3) Go straight to the PD FIB in the data-path thus avoiding an indirection through, e.g., a PLY pool.

Change-Id: I800d1ed0b2049040d5da95213f3ed6b12bdd78b7
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoARP/API:protect against identical registrations 64/5964/3
Eyal Bari [Thu, 30 Mar 2017 23:15:17 +0000 (02:15 +0300)]
ARP/API:protect against identical registrations

Change-Id: Ia3acf87d3e07a7d41c047869de504e1972334b55
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agodpdk: add support for Mellanox ConnectX-5 devices 60/5960/2
Damjan Marion [Thu, 30 Mar 2017 15:58:42 +0000 (17:58 +0200)]
dpdk: add support for Mellanox ConnectX-5 devices

Change-Id: I3ed2834a326eac50a7cb4faa592f42fd06325d5a
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovlib: extend foreach_vlib_main macro to assert if workers are not parked 73/5773/3
Damjan Marion [Thu, 16 Mar 2017 15:15:38 +0000 (16:15 +0100)]
vlib: extend foreach_vlib_main macro to assert if workers are not parked

Change-Id: I6ff7b65a400734a47bc0a7d03faf86ef1cf4f8c8
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoAdd vnet/rewrite.am back into exported headers 63/5963/1
Neale Ranns [Thu, 30 Mar 2017 22:24:18 +0000 (15:24 -0700)]
Add vnet/rewrite.am back into exported headers

Change-Id: I4dbd0dbd1e24bbf7c66fb9a2c055c8bc11d3817d
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoLISP: Do not show P-ITR generated mapping 57/5957/2
Filip Tehlar [Thu, 30 Mar 2017 13:17:01 +0000 (15:17 +0200)]
LISP: Do not show P-ITR generated mapping

Change-Id: I1aa25ef11dc75002cb9b6aac0981af00026e57ce
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoFix pid field endian in ARP/ND/DHCP event related API messages 27/5927/2
John Lo [Wed, 29 Mar 2017 17:35:43 +0000 (13:35 -0400)]
Fix pid field endian in ARP/ND/DHCP event related API messages

Make sure pid field in these API messages is stored in network
order (it is also kept and used by VPP in network order).

Change-Id: Id5d08e7a45b7e49d4b840a337458d99414d0b949
Signed-off-by: John Lo <loj@cisco.com>
7 years agoFix more "symbol XXX found in none of the libs" warnings 58/5958/2
Dave Barach [Thu, 30 Mar 2017 13:33:01 +0000 (09:33 -0400)]
Fix more "symbol XXX found in none of the libs" warnings

Change-Id: I4467f26da5bdcfd76e5914e0124a83b659757947
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoacl-plugin: cleaner node bugfixes (VPP-675) 50/5950/2
Andrew Yourtchenko [Wed, 29 Mar 2017 14:47:10 +0000 (16:47 +0200)]
acl-plugin: cleaner node bugfixes (VPP-675)

- use the counters in a private struct rather than node error counters
- ensure the timer for the non-idle connections is restarted
- fix the deletion of conn at the current tail the list

Change-Id: I632f63574d2ced95fb75c5e7fb588c78fb3cce1c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 097051a3bd1f63a177c0728f15375afd84a68918)

7 years agovppinfra: add spinlock inline functions 75/5875/6
Damjan Marion [Mon, 27 Mar 2017 15:08:20 +0000 (17:08 +0200)]
vppinfra: add spinlock inline functions

Change-Id: I86089e9bb604adfc260a111685001be1c897ce53
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoSR replicate mheap corruption fix VPP-672 13/5913/2
shwethab [Wed, 29 Mar 2017 11:36:37 +0000 (11:36 +0000)]
SR replicate mheap corruption fix VPP-672

Change-Id: If1c68fc63fa71fab198f2bf4f79bdd7a9841c2e8
Signed-off-by: shwethab <shwetha.bhandari@gmail.com>
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
7 years agoVPP-673 Fix L2 steering. 15/5915/2
Pablo Camarillo [Wed, 29 Mar 2017 14:54:40 +0000 (07:54 -0700)]
VPP-673 Fix L2 steering.

Change-Id: I1eab03525f234139ceefbc9b9895a35a03a56910
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
7 years agoVPP-669: ping: fix coverity check error 165075 + add ping testcase 56/5856/7
Andrew Yourtchenko [Fri, 24 Mar 2017 16:46:42 +0000 (17:46 +0100)]
VPP-669: ping: fix coverity check error 165075 + add ping testcase

Fix the bug and add the unit test to start with ping test coverage

Change-Id: Ibeacbed1f1660e677faa2dbb2ebe386216693e96
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoClean up more Debian packaging symbol warnings 31/5931/2
Dave Barach [Wed, 29 Mar 2017 20:59:02 +0000 (16:59 -0400)]
Clean up more Debian packaging symbol warnings

Change-Id: I6081a38af3817f0957a2faf0e3e41afa4a74f3a4
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoBRIDGE-DOMAIN:enable arp term,mac/ip learning on local ints 34/5934/2
Eyal Bari [Thu, 30 Mar 2017 00:05:06 +0000 (03:05 +0300)]
BRIDGE-DOMAIN:enable arp term,mac/ip learning on local ints

we should not suppress arps on remote interface instead we should  flood them to the local one
used shg != 0 to identify packets from remote interfaces and disable arp term l2 input feature for them

Change-Id: I701537c05df7451a25ccb5bfc9e2b03ea70cff20
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoIP lookup: remove used stack variables 25/5925/2
Neale Ranns [Wed, 22 Mar 2017 20:27:53 +0000 (13:27 -0700)]
IP lookup: remove used stack variables

Change-Id: I19b16d3e04a187ffe736fae868941957c70edf62
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoFix for dependency problem with Fedora 25 22/5922/2
Thomas F Herbert [Wed, 29 Mar 2017 14:40:16 +0000 (10:40 -0400)]
Fix for dependency problem with Fedora 25

Change-Id: I0e86f8eb6d62c6a109876b5bf35cc62ab617608e
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
7 years agoLISP: fix IID in decap 05/5905/3
Filip Tehlar [Wed, 29 Mar 2017 07:39:23 +0000 (09:39 +0200)]
LISP: fix IID in decap

Change-Id: I3f67d32d5d76069a27176deef6cba0c1a194b7ec
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoCoverity Error: logically dead code in IP unnumbered CLI 23/5923/2
Neale Ranns [Wed, 29 Mar 2017 16:34:10 +0000 (09:34 -0700)]
Coverity Error: logically dead code in IP unnumbered CLI

Change-Id: Id3398bd4b7a56c168aaab37942b92715e19d4025
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoRemove spurious client linkages against libvlib.so 18/5918/2
Dave Barach [Wed, 29 Mar 2017 15:17:45 +0000 (11:17 -0400)]
Remove spurious client linkages against libvlib.so

Change-Id: Ie77c8d57d0b0a153742d55ff0a8a9d72791d8b20
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agoVXLAN:validate mcast encapsulation ip/mac 34/5834/4
Eyal Bari [Thu, 23 Mar 2017 07:53:51 +0000 (09:53 +0200)]
VXLAN:validate mcast encapsulation ip/mac

Change-Id: I399257e372f83f4d12dc7873617980af6e46a9bc
Signed-off-by: Eyal Bari <ebari@cisco.com>
7 years agoMAP - add the domain struct directly into the dat-path and avoid the indirectiob... 08/5708/5
Neale Ranns [Tue, 21 Feb 2017 04:29:41 +0000 (20:29 -0800)]
MAP - add the domain struct directly into the dat-path and avoid the indirectiob throught the map-DPO

Change-Id: Ifb72a1c1258440fdc4845aca8aecf2abd63526b1
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoMtrie optimisations 46/5846/5
Neale Ranns [Thu, 23 Mar 2017 13:46:01 +0000 (06:46 -0700)]
Mtrie optimisations

1 - make the default route non-special, i.e. like any other less specific route. Consequently, all buckets have a valid valid index of either a leaf or a ply. Checks for special indeices in the data-path can thus be removed.
2 - since all leaves are now 'real' i.e. they represent a real load-balance object, to tell if a ply slot is 'empty' requeirs chekcing that the prefix length of the leaf occupying the slot is slot than the minium value for that ply.
3 - when removing a leaf find the cover first, then recurse down the ply and replace the old leaf with the cover. This saves us a ply walk.

Change-Id: Idd523019e8bb1b6ef527b1f5279a5e24bcf18332
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoSub-net broadcast addresses for IPv4 95/5895/2
Neale Ranns [Sun, 26 Mar 2017 17:56:33 +0000 (10:56 -0700)]
Sub-net broadcast addresses for IPv4

Change-Id: Ib2189d01e8bc61de57404159690fb70f89c47277
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agodpdk: fix --with-dpdk-mlx5-pmd link issue 07/5907/3
Damjan Marion [Wed, 29 Mar 2017 08:50:43 +0000 (10:50 +0200)]
dpdk: fix --with-dpdk-mlx5-pmd link issue

Change-Id: I8edb927289c080929380bfbf2b760749b7984d4b
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agovhost: vhost-user component may become unusable with too many open files (VPP-668) 31/5831/4
Steven [Wed, 22 Mar 2017 19:05:19 +0000 (12:05 -0700)]
vhost: vhost-user component may become unusable with too many open files (VPP-668)

When the number of open files is reached in the system, vhost may
encounter a failure in socket call and return from vhost-user-process.
The return terminates all attempts of incoming socket connections
in the future, even if the condition is reconciled.

The fix is to not return from vhost-user-process, record the error in
the interface, spit out the error, and retry the connection every 3 seconds.

Change-Id: I806baedf13e8c9b73e7c7820c094240f39949950
Signed-off-by: Steven <sluong@cisco.com>
7 years agoBugfixing and documentation for SRv6 00/5900/2
Pablo Camarillo [Thu, 16 Mar 2017 09:43:05 +0000 (10:43 +0100)]
Bugfixing and documentation for SRv6

- Fixed three coverity issues
- Linked SRv6 docs
- Moved sample plugin to examples folder
- Fixed bug with hash. Now everything is using mhash. Potentially in the future we want to do bihash.

Change-Id: Ie03a13c8fecb1e315e67d0596cbd23220779aaf2
Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
7 years agoUnscrew builtin client 98/5898/5
Dave Barach [Tue, 28 Mar 2017 16:31:33 +0000 (12:31 -0400)]
Unscrew builtin client

"test tcp client bytes 750000" deadlocks w/ Pr={1.0}

Change-Id: Ifa56b0de7812b9f27aa5bce2874b740c46ab30bd
Signed-off-by: Dave Barach <dbarach@cisco.com>
7 years agoNAT: Test refactoring to avoid redundant code for verification and creating packet... 69/5869/3
Martin Gálik [Mon, 27 Mar 2017 13:02:47 +0000 (06:02 -0700)]
NAT: Test refactoring to avoid redundant code for verification and creating packet streams in additional test cases

Change-Id: I2265f8acfa63a7ea920a7cb981819a14806a3d58
Signed-off-by: Martin Gálik <magalik@cisco.com>
7 years agovlib: inline dispatch_node(...) (again) 92/5892/2
Damjan Marion [Tue, 28 Mar 2017 13:11:20 +0000 (15:11 +0200)]
vlib: inline dispatch_node(...) (again)

Worker main loop is now shared code with main thread
main loop so no need to export functions anymore.

Change-Id: I99ee2eee981c1b88ca31d20eabeb6c21d030a34d
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoComment out dpdk section in startup.conf 37/5837/2
Damjan Marion [Thu, 23 Mar 2017 09:48:47 +0000 (10:48 +0100)]
Comment out dpdk section in startup.conf

It is empty anyway and it is causing problems if dpdk plugin is not
loaded.

Change-Id: I7b49afec39c78cbaf0c57b50621fb3e6848e3469
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoaf_packet driver needs to check VLIB_BUFFER_NEXT_PRESENT flag is set 78/5878/2
Jim Gibson [Mon, 27 Mar 2017 19:46:12 +0000 (19:46 +0000)]
af_packet driver needs to check VLIB_BUFFER_NEXT_PRESENT flag is set
when walking  vlib_buffer_t next_buffer chain on transmit.
On buffer allocation:
- next_buffer is not and may contain a stale invalid value that
  should be ignored if not overwritten by a valid value.
- VLIB_BUFFER_NEXT_PRESENT flag is cleared and only set
  if a valid value is written to next_buffer.

Change-Id: I9b0ccdc54f4f7456f8328ce7c4a0d52d0fba8caa
Signed-off-by: Jim Gibson <gibson+fdio@cisco.com>
7 years agoImplement MAC Flush for BD or Interface from the L2FIB 79/5879/2
John Lo [Sat, 25 Mar 2017 00:11:15 +0000 (20:11 -0400)]
Implement MAC Flush for BD or Interface from the L2FIB

Allow non-static MACs in the L2FIB which is associated with an
interface or a bridge domain (BD) be flushed. MAC flush are
initiated automatically when an interface is removed from a BD
or when a BD is deleted. MAC flush can also be invoked manually
via the following CLI:
 l2fib mac-flush interface <if-name>
 l2fib mac-flush bridge-domain <bd-id>

Change-Id: Ie33243622834810a765f48ebcd22bdb8e8fc87a4
Signed-off-by: John Lo <loj@cisco.com>
7 years agoTCP/session improvements 44/5744/19
Florin Coras [Mon, 13 Mar 2017 10:49:51 +0000 (03:49 -0700)]
TCP/session improvements

- Added svm fifo flag for tracking fifo dequeue events (replaces event
  length). Updated all code to switch to the new scheme.
- More session debugging
- Fix peek index wrap
- Add a trivial socket test client
- Fast retransmit/cc fixes
- tx and rx SACK fixes and unit testing
- SRTT computation fix
- remove dupack/ack burst filters
- improve ack rx
- improved segment rx
- builtin client test code

Change-Id: Ic4eb2d5ca446eb2260ccd3ccbcdaa73c64e7f4e1
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dbarach@cisco.com>
7 years agoFix output feature processing (VPP-670) 76/5876/2
AkshayaNadahalli [Mon, 27 Mar 2017 17:21:05 +0000 (17:21 +0000)]
Fix output feature processing (VPP-670)

Addressed comments.

Change-Id: Ic7d863ea4126f5046986b661db45d26bcce2068f
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
7 years agoPython API: Fixup of debian package after cFFI changes. 99/5799/6
Ole Troan [Mon, 20 Mar 2017 20:38:37 +0000 (21:38 +0100)]
Python API: Fixup of debian package after cFFI changes.

Change-Id: I4c2a1a818f28d4c6cf52af45f3b7dbfa41d77ccb
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agomake test: properly propagate exit status 49/5849/4
Klement Sekera [Fri, 24 Mar 2017 03:29:06 +0000 (04:29 +0100)]
make test: properly propagate exit status

Change-Id: Ie9f48a0d5e0a9cd08eb8f07d49149eee40f04131
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoMcast rewrite no memcpy 53/5753/3
Neale Ranns [Wed, 15 Mar 2017 11:22:25 +0000 (04:22 -0700)]
Mcast rewrite no memcpy

use a 32bit mask in the adjacency to AND with the IP address and OR into the rewrite.

Change-Id: I80b0f246c18fd74f3e43c5d49e25833412f34665
Signed-off-by: Neale Ranns <nranns@cisco.com>
7 years agoCheck for missing deps on bootstrap target for Centos and Fedora. 98/5798/3
Thomas F Herbert [Mon, 20 Mar 2017 23:19:51 +0000 (19:19 -0400)]
Check for missing deps on  bootstrap target for Centos and Fedora.

Change-Id: I823a066417fb6205d1e6b0fdf1de17b054f6d312
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
7 years agoFix output feature processing (VPP-670) 66/5866/4
AkshayaNadahalli [Mon, 27 Mar 2017 09:17:41 +0000 (14:47 +0530)]
Fix output feature processing (VPP-670)

Change-Id: Ia9bab28fb5341712a7d984bb343074ca22d05aab
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
7 years agoPython-API: debian packaging now depends on python-all (for pybuild) 60/5860/2
Ole Troan [Sat, 25 Mar 2017 18:25:05 +0000 (19:25 +0100)]
Python-API: debian packaging now depends on python-all (for pybuild)

Change-Id: I6b1dd6bdf03fa506c4b114d15800d9fe03e36395
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoRename "show interfaces" -> "show interface" 61/5861/1
Dave Barach [Sun, 26 Mar 2017 23:36:18 +0000 (19:36 -0400)]
Rename "show interfaces" -> "show interface"

To line up with "show interface placement," recently added. Otherwise,
"show int" refers only to "show interface placement," which tends to
annoy the cash customers...

Change-Id: Iea9e3681aeb051e2b0e1ecbf06706d98af9a3abf
Signed-off-by: Dave Barach <dave@barachs.net>
7 years agog2, c2cpel, and cpeldump: scale to 8M event log files 59/5859/1
Dave Barach [Sat, 25 Mar 2017 12:20:22 +0000 (08:20 -0400)]
g2, c2cpel, and cpeldump: scale to 8M event log files

Change-Id: I7d7748c9c44132d033a9aff1687112ffcb44c460
Signed-off-by: Dave Barach <dbarach@cisco.com>
7 years agomake test: fix broken plugin paths 50/5850/2
Klement Sekera [Fri, 24 Mar 2017 04:47:15 +0000 (05:47 +0100)]
make test: fix broken plugin paths

Change-Id: I25a6882ec503fc5bb3694411fbdc2eb1f1e1fafc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agoUpdate master revision to 17.07 33/5833/1 v17.07-rc0
Ole Troan [Wed, 22 Mar 2017 20:33:10 +0000 (21:33 +0100)]
Update master revision to 17.07

Change-Id: Ieb0a5e70bc3db951e577e6ef52a4adaac9b42271
Signed-off-by: Ole Troan <ot@cisco.com>
7 years agoAdd memif - packet memory interface for intra-host communication 04/5004/18
Damjan Marion [Wed, 22 Mar 2017 09:18:13 +0000 (10:18 +0100)]
Add memif - packet memory interface for intra-host communication

Change-Id: I94c06b07a39f07ceba87bf3e7fcfc70e43231e8a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Co-Authored-By: Milan Lenco <Milan.Lenco@pantheon.tech>
7 years agoUpdate MAC address kept for Bonded Interface and its Slaves 29/5829/1
John Lo [Wed, 22 Mar 2017 17:27:27 +0000 (13:27 -0400)]
Update MAC address kept for Bonded Interface and its Slaves

Change-Id: I9f7f9f840c3c1aad5e8c9a4fa1ba7a58a85cfd9e
Signed-off-by: John Lo <loj@cisco.com>
7 years agoLISP: improve DP speed 26/5826/2
Filip Tehlar [Wed, 22 Mar 2017 08:02:33 +0000 (09:02 +0100)]
LISP: improve DP speed

Change-Id: I5bd0721b70dfc240fa9225df3704774f6b0ede81
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agovlib: add description field in plugin registration 24/5824/2
Damjan Marion [Wed, 22 Mar 2017 10:08:39 +0000 (11:08 +0100)]
vlib: add description field in plugin registration

Change-Id: I88b322a5d602f3d6d3310e971479180a89430e0e
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoping: allow the user to send bursts of N packets instead of single packet 22/5822/2
Andrew Yourtchenko [Wed, 22 Mar 2017 09:51:14 +0000 (10:51 +0100)]
ping: allow the user to send bursts of N packets instead of single packet

Change-Id: I3c1d3a2db56487473123e6fec2b076a063473313
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agomake test: run all tests in test-cov target 16/5816/2
Klement Sekera [Tue, 21 Mar 2017 07:27:18 +0000 (08:27 +0100)]
make test: run all tests in test-cov target

Change-Id: I7040c1ecc8b6e5e883420c1c81aa8b70e56263e5
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agomake test: support out-of-tree plugins 13/5813/2
Klement Sekera [Tue, 21 Mar 2017 07:21:25 +0000 (08:21 +0100)]
make test: support out-of-tree plugins

usage:

env EXTERN_PLUGINS=/path/to/plugins make test

Change-Id: I8eece726dfafeff1cffd921c1e18cd3eb7eb64ed
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agomake test: support out-of-tree tests 74/5774/3
Klement Sekera [Thu, 16 Mar 2017 08:14:59 +0000 (09:14 +0100)]
make test: support out-of-tree tests

env EXTERN_TESTS="/path/to/extra/tests" make test

causes to run the default test set and tests collected from
test_*.py files under subtree specified in EXTERN_TESTS.

Change-Id: I58c5471dd6010730278a5b47d4318737d920bc28
Signed-off-by: Klement Sekera <ksekera@cisco.com>
7 years agodpdk: fix plugin linking with sw crypto libraries 50/5650/4
Sergio Gonzalez Monroy [Tue, 7 Mar 2017 14:39:29 +0000 (14:39 +0000)]
dpdk: fix plugin linking with sw crypto libraries

Change-Id: I3e3bf786ab3c7672ff2cc7acd221421072e3ac8b
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
7 years agovhost: support interrupt mode 64/5764/6
Steven [Thu, 16 Mar 2017 04:18:55 +0000 (21:18 -0700)]
vhost: support interrupt mode

vhost currently supports only polling mode. This patch is to add
interrupt mode. When the interface is configured for interrupt
mode, our input node does not get called unless there is a packet
in the vring.

If a particular CPU has one interface configured for polling mode
and another in interrupt, the input node is set to polling for
that CPU.

This diffs also includes two crashes in vlib's dispatch_node. One is
included in https://gerrit.fd.io/r/#/c/5516. The other crash is in
the ASSERT. The ASSERT can become true when the caller of
dispatch_node is in a loop. The first call converted the node
to polling. The second call thereafter will hit the ASSERT.

Change-Id: If17b6d48b20d7d8605c6a161459828637173cd32
Signed-off-by: Steven <sluong@cisco.com>
7 years agoSNAT: added actual delete to snat_det_map 40/5740/5
Martin [Tue, 14 Mar 2017 09:25:45 +0000 (02:25 -0700)]
SNAT: added actual delete to snat_det_map

Change-Id: I8187b43129b80fadd90ea493afb922064f79abbe
Signed-off-by: Martin <magalik@cisco.com>
7 years agopolicer: fix byte ordering in policer_details msg 07/5807/3
Marek Gradzki [Tue, 21 Mar 2017 10:51:54 +0000 (11:51 +0100)]
policer: fix byte ordering in policer_details msg

Change-Id: Id53131e8cd32bfd35739a7bd7cdbadf3a9f4d941
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoInitial draft of VPP changes to cleanup iOAM export. 03/5803/4
Vengada [Tue, 21 Mar 2017 08:04:46 +0000 (01:04 -0700)]
Initial draft of VPP changes to cleanup iOAM export.
This is needed for iOAM export for NSH.

Change-Id: I702934b2cde8b1c07ec5c299d5fcd98dce94c62c
Signed-off-by: Vengada <venggovi@cisco.com>
7 years agoACL plugin 1.2 05/5805/7
Andrew Yourtchenko [Tue, 21 Mar 2017 09:31:55 +0000 (10:31 +0100)]
ACL plugin 1.2

L3 path support, L2+L3 unified processing node, skip IPv6 EH support.

Change-Id: Iac37a466ba1c035e5c2997b03c0743bfec5c9a08
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
7 years agoLISP statistics 35/5735/6
Filip Tehlar [Thu, 9 Mar 2017 15:48:39 +0000 (16:48 +0100)]
LISP statistics

Change-Id: I399cac46d279e020ba33459ef759d9d29d3ac716
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
7 years agoarmv8 - fix os_cpu_clock_frequency for armv8 96/5796/2
Gabriel Ganne [Mon, 20 Mar 2017 14:13:02 +0000 (15:13 +0100)]
armv8 - fix os_cpu_clock_frequency for armv8

System timer of ARMv8 runs at a different frequency than the CPU's.
The frequency is fixed, typically in the range 1-50MHz.  It can be
read at CNTFRQ special register.

Change-Id: I6a21a6a9e2df783559df0caec63d5525c2258227
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
7 years agovnet: add device-input threadplacement infra 87/5787/3
Damjan Marion [Mon, 20 Mar 2017 15:34:15 +0000 (16:34 +0100)]
vnet: add device-input threadplacement infra

This change adds two new debug CLI command:

- "show interface placmenet" to display which
thread (main or worker) is responsible for processing
interface rx queue

vpp# show interface placement
Thread 0 (vpp_main):
  node af-packet-input:
    host-vpp1 queue 0
Thread 1 (vpp_wk_0):
  node af-packet-input:
    host-virbr0 queue 0
Thread 2 (vpp_wk_1):
  node af-packet-input:
    host-vpp2 queue 0
    host-lxcbr0 queue 0

- "set interface placmenet" to assign thread (main or worker)
which process specific interface rx queue

vpp# set interface placement host-vpp1 queue 0 main

Change-Id: Id4dd00cf2b05e10fae2125ac7cb4411b446c5e9c
Signed-off-by: Damjan Marion <damarion@cisco.com>
7 years agoFix bonded interface name to use instance number starting from 0 88/5788/3
John Lo [Fri, 17 Mar 2017 22:05:35 +0000 (18:05 -0400)]
Fix bonded interface name to use instance number starting from 0

With DPDK 17.02, bonded interface device_index does not start
from 0 and may vary depends on the existence of other interfaces.
Implement instance number for bonded interface so the interface
name can make use of instance number starting from 0.

Change-Id: Ia8eb7bd530446faa02ee7c7d1f6abdc22ac60b62
Signed-off-by: John Lo <loj@cisco.com>