vpp.git
5 years agoBD ARP entry use common API types 94/15494/6
Neale Ranns [Wed, 24 Oct 2018 09:57:49 +0000 (02:57 -0700)]
BD ARP entry use common API types

Change-Id: I29f20dbaf2c2d735faff297cee552ed648f6f61b
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agodocs: Add version and build date 51/15751/2
jdenisco [Tue, 6 Nov 2018 17:32:33 +0000 (12:32 -0500)]
docs: Add version and build date

Change-Id: I6fd53d3ef12e4b6f1af1e5605c09938bce324ec9
Signed-off-by: jdenisco <jdenisco@cisco.com>
5 years agovhost: crash in vhost_user_tx_avx2 85/15685/2
Steven [Sun, 4 Nov 2018 16:20:01 +0000 (08:20 -0800)]
vhost: crash in vhost_user_tx_avx2

(gdb) bt
bt
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) frame 5
frame 5
293       if (PREDICT_FALSE (rxvq->last_avail_idx == rxvq->avail->idx))
(gdb) p *rxvq
p *rxvq
$3 = {cacheline0 = 0x7f290bcadd80 "\377\003", qsz_mask = 1023, last_avail_idx = 0, last_used_idx = 0, n_since_last_int = 0, desc = 0x0, avail = 0x0, used = 0x0, int_deadline = 0, started = 1 '\001', enabled = 1 '\001', log_used = 0 '\000', cacheline1 = 0x7f290bcaddc0 "\377\377\377\377\016", errfd = -1, callfd_idx = 14, kickfd_idx = 19, log_guest_addr = 5151049792, mode = 0}

The crash is because we access the null pointer rxvq->avail,
which is supposed to be derived from the mmap informed by the driver.
We fixed a similar issue before in

    https://gerrit.fd.io/r/#/c/14545/

The reason was the driver ummaps the memory without doing the disconnect in
SR-IOV environment. The fixed was applied to the RX path. Now it happens in the
TX path. We just need to apply the same check in the TX path.

Change-Id: I7b1dfc96797cb5b52845bc6cec09a8c5d4325280
Signed-off-by: Steven <sluong@cisco.com>
5 years agodocs: Small changes to plugin, updated the requirements 44/15644/2
jdenisco [Wed, 31 Oct 2018 18:24:31 +0000 (14:24 -0400)]
docs: Small changes to plugin, updated the requirements

Change-Id: I3c05a28991d01e726d4fa8580a720359a2d4ce91
Signed-off-by: jdenisco <jdenisco@cisco.com>
5 years agoIGMP: Improved handling of (*,G) join and leave 49/15749/3
Neale Ranns [Tue, 6 Nov 2018 13:51:58 +0000 (05:51 -0800)]
IGMP: Improved handling of (*,G) join and leave

Change-Id: I48a92035b58d83420eb3eed3f05a75ba283543c2
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVPP-1481: fixed tlv length checking & added tests 89/15689/5
Filip Varga [Mon, 5 Nov 2018 08:41:56 +0000 (09:41 +0100)]
VPP-1481: fixed tlv length checking & added tests

Change-Id: I9375bca5f5136c84d801dbd635929bb1c37d75b4
Signed-off-by: Filip Varga <filip.varga@pantheon.tech>
5 years agodpdk: format_dpdk_device_name cleanup 37/15737/2
Damjan Marion [Tue, 6 Nov 2018 11:56:47 +0000 (12:56 +0100)]
dpdk: format_dpdk_device_name cleanup

Change-Id: I49a5029d256df8f749ee30d19ff7473147b6516f
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoChange l2_patch from dual-loop to quad-loop 83/15383/4
Yulong Pei [Fri, 19 Oct 2018 15:29:29 +0000 (23:29 +0800)]
Change l2_patch from dual-loop to quad-loop

The change can save 1.1 clocks per packet on Intel Atom C3858 platform,
It downgraded from 2.05e1 to 1.94e1 clocks per packet.

The change can save 0.3 clocks per packet on Intel Xeon CPU E5-2699 v4 @ 2.20GHz,
It downgraded from 1.26e1 to 1.23e1 clocks per packet.

Change-Id: I1ede77fb592a797d86940a8abad9ca291a89f1c7
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
5 years agodpdk: fix device name suffix confusion with failsafe/netvsc 32/15732/2
Stephen Hemminger [Mon, 5 Nov 2018 20:54:16 +0000 (12:54 -0800)]
dpdk: fix device name suffix confusion with failsafe/netvsc

When netvsc or failsafe DPDK device is used, the DPDK port id does not
match the VPP device instance id.  The code that formats the device
name was incorrectly calling DPDK device info using the VPP device
instance id. This causes the VPP interface to be named
"FortyGigabit0/2/0" based on mistakenly finding the PCI device
information of the hidden DPDK port id for the VF device.

Change-Id: I9366232f4b2087076bdcc1a58bf228007c24c084
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agodpdk: fix pmd device type when using netvsc or failsafe 29/15729/2
Stephen Hemminger [Mon, 5 Nov 2018 19:32:31 +0000 (11:32 -0800)]
dpdk: fix pmd device type when using netvsc or failsafe

The pmd device type show with 'show hardware' is wrong if using failsafe
(or netvsc pmd) because the pmd device type should be based of the VPP device
instance, not the DPDK port id.

Fixes: a059a000f81a ("dpdk: Decoupling the meaning of xd->device_index in dpdk_plugin")
Change-Id: I3880fe674731880c5706a21d8ef3ccf8d569d46d
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agotcp: dequeue acked only once per burst 28/15728/4
Florin Coras [Mon, 5 Nov 2018 19:06:53 +0000 (11:06 -0800)]
tcp: dequeue acked only once per burst

Avoid dequeuing acked bytes more than once per burst for a connection.
Although the fifos do not use locks, size decrements are atomic, so they
rely on locked instructions.

Change-Id: Id65f4ea40b2c10057461402dfd0393034e6472d5
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoacl-plugin: 5-tuple parse: get rid of memcpy and move to flags vs. bitfields 09/15709/2
Andrew Yourtchenko [Thu, 25 Oct 2018 17:01:49 +0000 (19:01 +0200)]
acl-plugin: 5-tuple parse: get rid of memcpy and move to flags vs. bitfields

Using bitfield struct for 5tuple proved to be fragile from
the performance standpoint - the zeroizing of the entire
structure and then setting the separate pieces of it
triggers increased memory latency. So, move to using
flags byte.

Also, use the direct object copies rather than memcpy.

Change-Id: Iad8faf9de050ff1256e40c950dee212cbd3e5267
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agovxlan: prefetch extra one cacheline holding external header 88/15688/2
Zhiyong Yang [Mon, 5 Nov 2018 08:45:25 +0000 (03:45 -0500)]
vxlan: prefetch extra one cacheline holding external header

For vxlan_encap, code will touch memory area before the field "data"
in struct vlib_buffer_t, however so far it is not prefetched in cache
yet for this graph node.
After applying the patch, 2~3 cycles per pkt for vxlan4_encap can be
saved on Haswell. It will bring a lot of benefits on DVN platform too.

Change-Id: I26d8c57fb3d2415726be5367117d73eb715e35ad
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agodpdk: enable gso when the tap PMD is enabled 19/15619/2
Matthew Smith [Mon, 29 Oct 2018 21:35:30 +0000 (16:35 -0500)]
dpdk: enable gso when the tap PMD is enabled

Setting DPDK_PMD_TAP=y when building will enable the tap PMD
in the build configuration that is generated for DPDK. Enabling
this currently results in a failure during compilation because
rte_gso.h is not found. RTE_LIBRTE_GSO needs to be set to y for
this to work.

Use the setting for the tap PMD to determine the value for
RTE_LIBRTE_GSO.

Change-Id: Ie395417b1c62369a95320856081ad52c674ce9f2
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoDon't autodetect plugin path if set on cmdline 41/15641/3
Klement Sekera [Wed, 31 Oct 2018 18:06:54 +0000 (19:06 +0100)]
Don't autodetect plugin path if set on cmdline

Change-Id: Idf79f261a7590038c1813d3996f4644e3d7e0cbe
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoEnable atomic swap and store macro with acquire and release ordering 18/15618/5
Sirshak Das [Fri, 12 Oct 2018 14:38:27 +0000 (09:38 -0500)]
Enable atomic swap and store macro with acquire and release ordering

Add atomic swap and store macro with acquire and release ordering
respectively.  Variable in question is interupt_pending variable which
is used as guard variable by input nodes to process the device queue.

Atomic Swap is used with Acquire ordering as writes or reads following
this in program order should not be reordered before the swap.

Atomic Store is used with Release ordering, as post store the node is
added to pending list.

Change-Id: I1be49e91a15c58d0bf21ff5ba1bd37d5d7d12f7a
Original-patch-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
5 years agoGenric API types format/unformat support for VAT and custom dump 77/15677/2
Neale Ranns [Fri, 2 Nov 2018 16:14:01 +0000 (09:14 -0700)]
Genric API types format/unformat support for VAT and custom dump

Change-Id: I8bc3a991f0ede0605d78b51ba609fbe5889513f2
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVPP-1450: binary api call for dumping SPD to interface registration 74/15674/5
Filip Varga [Fri, 2 Nov 2018 12:51:44 +0000 (13:51 +0100)]
VPP-1450: binary api call for dumping SPD to interface registration

Change-Id: Idd4a5f8bab5d39e5f33f5c130601175af70a20d4
Signed-off-by: Filip Varga <filip.varga@pantheon.tech>
5 years agotcp: send unsent data in fast recovery 78/15678/10
Florin Coras [Fri, 2 Nov 2018 19:52:10 +0000 (12:52 -0700)]
tcp: send unsent data in fast recovery

Allows sending of unsent data in fast recovery and consolidates logic in
tcp, instead of splitting it between tcp fast retransmit and tcp output
path called by the session layer.

Change-Id: I9b12cdf2aa2ac50b9f25e46856fed037163501fe
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoProvide return value for PAPI disconnect() 89/15489/4
Igor Mikhailov (imichail) [Wed, 24 Oct 2018 00:58:14 +0000 (17:58 -0700)]
Provide return value for PAPI disconnect()

Change-Id: I209f570634636725ce8fda5f61e900a71227b888
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
5 years agoAlter logging semantics for VPP PAPI object 17/15617/2
Igor Mikhailov (imichail) [Tue, 30 Oct 2018 19:17:49 +0000 (12:17 -0700)]
Alter logging semantics for VPP PAPI object

Restore parts of commit d0e812f wiped out by a7564e80

The full description of the change is in d0e812f

Change-Id: I632476cb10678a725396462f90f9b0bea9e572fa
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
5 years agotcp: coverity fixes 76/15676/2
Florin Coras [Fri, 2 Nov 2018 15:23:58 +0000 (08:23 -0700)]
tcp: coverity fixes

Change-Id: Ib15d629c5fde7849bfa3307f42659e920eb0f463
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agocdp scapy protocol & cdp unit tests 22/15622/6
Filip Varga [Wed, 31 Oct 2018 06:58:05 +0000 (07:58 +0100)]
cdp scapy protocol & cdp unit tests

Change-Id: Ieb362523f81f7ae3e1a9dceb341c499ff1f402c8
Signed-off-by: Filip Varga <fivarga@cisco.com>
5 years agovnet: ping: rewrite for maintainability and multicore support 57/15557/11
Andrew Yourtchenko [Fri, 26 Oct 2018 13:13:56 +0000 (15:13 +0200)]
vnet: ping: rewrite for maintainability and multicore support

Refactor most of the ping code to be address-family agnostic,
and add support for chained buffers (thus, sending
the payloads bigger than 2K).

Change-Id: I749c302ca2f3390e0d1f84046fc72da5cf13e3ef
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agovlib: define minimum chained buffer segment size 28/15628/4
Damjan Marion [Wed, 31 Oct 2018 09:59:02 +0000 (10:59 +0100)]
vlib: define minimum chained buffer segment size

Change-Id: I9b5f7b264f9978e3dd97b2d1eb103b7d10ac3170
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodpdk: restore special handling for failsafe driver 64/15664/2
Stephen Hemminger [Thu, 1 Nov 2018 21:17:14 +0000 (14:17 -0700)]
dpdk: restore special handling for failsafe driver

The failsafe driver is unique because it shares device with underlying
pci device. This confuses name generation. Without this fix, the name
is wrong and multiple devices get created with same name.

Fixes: 3901a038edf4 ("dpdk: only look at PCI information on PCI devices")
Change-Id: I13796d03baf6c76dafe3667c83bea4a1ae30c48f
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agosession: measure dispatch period only if under load 68/15668/7
Florin Coras [Thu, 1 Nov 2018 23:30:54 +0000 (16:30 -0700)]
session: measure dispatch period only if under load

Also reset pacer on tcp retransmit timeout

Change-Id: I5a9edee4c00d1d169248d79587a9b10437c2bd87
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: minimize use of tls 63/15663/7
Florin Coras [Thu, 1 Nov 2018 18:23:03 +0000 (11:23 -0700)]
tcp: minimize use of tls

Also propagate tcp worker context instead of retrieving it multiple
times.

Change-Id: I7b273b981826b37783566d0172a64cd6957f3b33
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoarp:add error counters for all failure cases 30/15630/3
Eyal Bari [Wed, 31 Oct 2018 11:19:11 +0000 (13:19 +0200)]
arp:add error counters for all failure cases

Change-Id: Ided6c661edc9e2035fd7b472c312e2380d3f9c0b
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agotcp: fast retransmit pacing 58/15658/4
Florin Coras [Thu, 1 Nov 2018 06:09:22 +0000 (23:09 -0700)]
tcp: fast retransmit pacing

Force pacing for fast retransmit to avoid bursts of retransmitted
packets.

Change-Id: I2ff42c328899b36322c4de557b1f7d853dba8fe2
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoMove RPC calls off the binary API input queue 60/15660/2
Dave Barach [Thu, 1 Nov 2018 12:12:52 +0000 (08:12 -0400)]
Move RPC calls off the binary API input queue

Change-Id: I2476e3e916a42b41d1e66bfc1ec4f8c4264c1720
Signed-off-by: Dave Barach <dbarach@cisco.com>
5 years agoFix API name_crc format stored in msg_api_table 53/15653/2
Igor Mikhailov (imichail) [Wed, 31 Oct 2018 21:20:04 +0000 (14:20 -0700)]
Fix API name_crc format stored in msg_api_table

Change-Id: I716d025beb8f649060238c2bd388357943643621
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
5 years agovom: Add igmp 'host' support in vom 15/15615/6
Mohsin Kazmi [Tue, 30 Oct 2018 18:24:34 +0000 (19:24 +0100)]
vom: Add igmp 'host' support in vom

Change-Id: Ibdb19d21b8ec7fb340a057e32df207b7723dba9b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agosession: fix sh session cli 45/15645/2
Florin Coras [Wed, 31 Oct 2018 19:25:38 +0000 (12:25 -0700)]
session: fix sh session cli

Change-Id: Idbc7b61393c6d0e3b8ea950397a89d21b1cf3a42
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoMakefile: support both RHEL and CentOS in install-dep 43/15643/1
Yichen Wang [Wed, 31 Oct 2018 05:52:15 +0000 (22:52 -0700)]
Makefile: support both RHEL and CentOS in install-dep

Change-Id: I31fd8700bfac462944b7621947edd3710fd247b9
Signed-off-by: Yichen Wang <yicwang@cisco.com>
5 years agomake-test: Fix the vapi test 40/15640/1
Mohsin Kazmi [Wed, 31 Oct 2018 15:45:19 +0000 (16:45 +0100)]
make-test: Fix the vapi test

Change-Id: I5a4dc3894818f92368d6c906ff43e093c16c1d19
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoEMACS-LISP-ONLY: fix names of xxx_main_t pointers 39/15639/1
Dave Barach [Wed, 31 Oct 2018 13:54:34 +0000 (09:54 -0400)]
EMACS-LISP-ONLY: fix names of xxx_main_t pointers

main_t pointer: <first-letter-of-plugin-name> + "mp"
test_main_t pointer: <first-letter-of-plugin-name> + "mp"

AKA: (setq main-p (concat (substring plugin-name 0 1) "mp")) etc.

Change-Id: Ie1b38fb62485183bbe00f649683492aa82a21376
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoEMACS-LISP-ONLY: fix boilerplate compile error 38/15638/1
Dave Barach [Wed, 31 Oct 2018 13:23:35 +0000 (09:23 -0400)]
EMACS-LISP-ONLY: fix boilerplate compile error

Change-Id: I81defe6465219e23a44608fcf0570a058ab3f59e
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoAdd and enable msb mask vector intrinsic for aarch64. 06/15606/4
Lijian Zhang [Thu, 25 Oct 2018 10:50:33 +0000 (18:50 +0800)]
Add and enable msb mask vector intrinsic for aarch64.

This patch enables the use of this function for enqueuing frames to the next graph node.

Change-Id: I4003110db59870f7106e0d13942d6ff7bc54b46d
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>
Reviewed-by: Steve Capper <Steve.Capper@arm.com>
5 years agol2fib:remove unused bucket arg in lookup functions 27/15627/1
Eyal Bari [Wed, 31 Oct 2018 08:55:33 +0000 (10:55 +0200)]
l2fib:remove unused bucket arg in lookup functions

Change-Id: Ib138b6e2eac47acc16e81bc88358ae7947420134
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agosession: prioritize postponed sessions 14/15614/5
Florin Coras [Tue, 30 Oct 2018 17:21:59 +0000 (10:21 -0700)]
session: prioritize postponed sessions

If sessions cannot be handled during the current dispatch loop
iteration, ensure that they are first to be handled in the next.

Change-Id: Ifc6215900f8cfd530d4886b58641189f0ccf9bb7
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: add wrk context 16/15616/5
Florin Coras [Tue, 30 Oct 2018 19:01:48 +0000 (12:01 -0700)]
session: add wrk context

Change-Id: I66ca0ddea872948507d078e405eb90f9f3a0e897
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoADJ: init MTU to interface default 05/15605/2
Neale Ranns [Tue, 30 Oct 2018 13:34:25 +0000 (06:34 -0700)]
ADJ: init MTU to interface default

Change-Id: Iaecf8c060e1337d8c362ad9a9be2bb9701664397
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoDOC-ONLY: document packet intialization from scratch 10/15610/2
Dave Barach [Tue, 30 Oct 2018 14:24:17 +0000 (10:24 -0400)]
DOC-ONLY: document packet intialization from scratch

Minor clean-up in the home gateway use-case documentation

Change-Id: I7d3aaea8cec62248daf7814b21a8acb574ac12a1
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agochange mac address functions take const mac 00/15600/2
Neale Ranns [Tue, 30 Oct 2018 10:47:20 +0000 (03:47 -0700)]
change mac address functions take const mac

Change-Id: Ia68db22b917e9af1394c00e5a6b3df134bfd1568
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agodocs: Add VPP with iperf and trex 04/15604/2
jdenisco [Tue, 30 Oct 2018 12:46:02 +0000 (08:46 -0400)]
docs: Add VPP with iperf and trex

Change-Id: I9f238b6092bc072fd875facfee5262c6b155043e
Signed-off-by: jdenisco <jdenisco@cisco.com>
5 years agoDOC-ONLY: upgrade the "requests" package 03/15603/2
Dave Barach [Tue, 30 Oct 2018 12:35:06 +0000 (08:35 -0400)]
DOC-ONLY: upgrade the "requests" package

requests 2.18.4 is the subject of a security alert

Change-Id: Id1e9338d86bced8c0bb065db7b3dc7f02aa41afc
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovppinfra: fix bug in default_socket_sendmsg 01/15601/1
Damjan Marion [Tue, 30 Oct 2018 12:04:19 +0000 (13:04 +0100)]
vppinfra: fix bug in default_socket_sendmsg

Change-Id: Ia9b74761ce511d218bb5319c7c9b5e58be3e2e8a
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodpdk: .function should be removed for mutiarch nodes 99/15599/1
Damjan Marion [Tue, 30 Oct 2018 09:04:53 +0000 (10:04 +0100)]
dpdk: .function should be removed for mutiarch nodes

Fixes debug build crash.

Change-Id: Ia5c5da82beda5992f9e67456af9a4676b9b82722
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agomigrate ipsec to new multiarch infra 20/15420/5
Klement Sekera [Mon, 29 Oct 2018 12:38:19 +0000 (13:38 +0100)]
migrate ipsec to new multiarch infra

Change-Id: Ibef46e068cd72415af28920b0146adf48105bf68
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoUse throttle_t for ND throttling 48/15548/5
Neale Ranns [Fri, 31 Aug 2018 09:51:45 +0000 (02:51 -0700)]
Use throttle_t for ND throttling

Change-Id: I93c6b7bccd1a1ab71625ae29c99c974581186c4d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agointerface-flags; fix coverity error found in conversion 79/15579/2
Neale Ranns [Mon, 29 Oct 2018 08:55:24 +0000 (01:55 -0700)]
interface-flags; fix coverity error found in conversion

Change-Id: I2eafac4ce810fe53454b729d81161ec80d036db7
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoFixing Exclusive dpo path issues added when via rpath 42/15542/6
Vijayabhaskar Katamreddy [Thu, 25 Oct 2018 20:28:12 +0000 (13:28 -0700)]
Fixing Exclusive dpo path issues added when via rpath

Change-Id: I7531a64d7072d85514ca579827b6ea0e9cef6f08
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
5 years agosession: move test to unittest plugin 78/15578/2
Florin Coras [Mon, 29 Oct 2018 03:33:29 +0000 (20:33 -0700)]
session: move test to unittest plugin

Change-Id: I4921054b4e42bac3442d399681b21b613ce8b681
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobond: problem switching from l2 to l3 77/15577/3
Steven [Sun, 28 Oct 2018 20:36:45 +0000 (13:36 -0700)]
bond: problem switching from l2 to l3

when the last interface is removed from l2 in the bonding group, we should
invoke ethernet_set_rx_direct to allow ip packets to go directly to
ip4-input.

Change-Id: I43b3cd64e2c119762edd0c295bb9348732adab45
Signed-off-by: Steven <sluong@cisco.com>
5 years agophysmem: coverity issues 49/15549/4
Damjan Marion [Fri, 26 Oct 2018 08:29:35 +0000 (10:29 +0200)]
physmem: coverity issues

Change-Id: I34cc55d8292a69fb451ed0031484994f51d3537a
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agosession: extend connect api for internal apps 46/15546/11
Florin Coras [Fri, 26 Oct 2018 01:03:45 +0000 (18:03 -0700)]
session: extend connect api for internal apps

Change-Id: Ie4c5cfc4c97acb321a46b4df589dc44de1b616ba
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFIB: Sources must be keep in priority order, so re-sort after a vec_del 51/15551/4
Neale Ranns [Fri, 26 Oct 2018 11:17:54 +0000 (04:17 -0700)]
FIB: Sources must be keep in priority order, so re-sort after a vec_del

Change-Id: I77af4f3a7e826ea5c1a23ee8b348faefe9f2facc
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agopg: icmp4 & tcp4 ip length issue 74/15574/2
Kingwel Xie [Sat, 27 Oct 2018 03:26:06 +0000 (23:26 -0400)]
pg: icmp4 & tcp4 ip length issue

length in ip4 header could be 0, when the length edit is fixed
this happens if length is not specified or size is specified as, f.g., 100-100
As a result, tcp and icmp would get a negative value for checksum calculation

Change-Id: I55fa1f5e95717ea4149cb3b8c9b73caf88ae7f98
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agopg: incrementing len should be truncated by 76/15576/2
Kingwel Xie [Sat, 27 Oct 2018 03:55:47 +0000 (23:55 -0400)]
pg: incrementing len should be truncated by
stream->max_packet_bytes

This length is the payload length, and will impact the ip length
when ip length is not specified. iplen = header_len + payload_len
SO, better to make it comply with max_packet_bytes

Change-Id: I8b0f7485e29fcaccae656f2d03b3b5e614300fb8
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agopg: allow creating pg for udp based protocols 75/15575/2
Kingwel Xie [Sat, 27 Oct 2018 03:42:15 +0000 (23:42 -0400)]
pg: allow creating pg for udp based protocols

f.g., gtpu4/6

Change-Id: I8bb1dc5fd2fba89ff17ec069a9816bafb9684190
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoEnumify interface flags 55/15555/4
Neale Ranns [Fri, 26 Oct 2018 12:17:03 +0000 (05:17 -0700)]
Enumify interface flags

clang will emit a warning when the wrong enum type is passed to a
function whose arguments are an enum type. free bug finding...

Change-Id: I62215d8ef22c7527a31272e31f5d190e4e762e53
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovmxnet3: add logging support to the control plane [VPP-1470] 73/15573/2
Steven [Sat, 27 Oct 2018 03:10:49 +0000 (20:10 -0700)]
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: I53c23cf10958bfbc06abb1c252d368003563cd04
Signed-off-by: Steven <sluong@cisco.com>
5 years agovirtio: remove the extra return call 69/15569/3
Mohsin Kazmi [Fri, 26 Oct 2018 17:36:55 +0000 (19:36 +0200)]
virtio: remove the extra return call

Change-Id: I6e43953a6ad1bd672e69d8377d18bd9614b469d8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agodpdk: fix mlx5 build on SUSE 44/15544/4
Stephen Hemminger [Thu, 25 Oct 2018 21:40:24 +0000 (14:40 -0700)]
dpdk: fix mlx5 build on SUSE

Current mlx5 requires libmnl, and SUSE has a bug which
installs the header file in incorrect location.

Workaround (from upstream) is to use pkg-config.

Change-Id: Iadfd2dc0df211876258c31da028af2e8934483b3
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agocj: cj dump crash 29/15229/2
Steven [Wed, 10 Oct 2018 21:48:32 +0000 (14:48 -0700)]
cj: cj dump crash

Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.
0x00007ffff670da53 in cj_dump_one_record (r=0x7ffff50f0fec)
    at /home/sluong/vpp3/vpp/src/vlib/unix/cj.c:138
138    (long long unsigned int) r->data[1]);

(gdb) p *cjm
$1 = {tail = 58645908, records = 0x7fffb64646ec, num_records = 512,
  enable = 1, vlib_main = 0x7ffff6953240 <vlib_global_main>}
(gdb) p /x cjm
$2 = 0x7ffff6953880
(gdb) p /x *cjm
$3 = {tail = 0x37edd94, records = 0x7fffb64646ec, num_records = 0x200,
  enable = 0x1, vlib_main = 0x7ffff6953240}
(gdb)

cjm->tail is a 64 bit counter, not the total number of records. Dumping from
0 to cjm->tail can be a very large number of records which go beyond the
limit. I believe we meant to dump from 0 to index. index has been set  by
this statement
  index = (cjm->tail + 1) & (cjm->num_records - 1);

Change-Id: Ie1a8ba757598de9757accc1488577c15aa49726b
Signed-off-by: Steven <sluong@cisco.com>
5 years agovxlan-gbp: On demand udp ports registration 96/15496/4
Mohsin Kazmi [Wed, 24 Oct 2018 10:17:50 +0000 (12:17 +0200)]
vxlan-gbp: On demand udp ports registration

Change-Id: I3a47c71ad3e35df47d11fed6db95019a45f3015f
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoacl-plugin: fix the node multiarch function selection 36/15536/3
Andrew Yourtchenko [Thu, 25 Oct 2018 16:21:33 +0000 (18:21 +0200)]
acl-plugin: fix the node multiarch function selection

Thanks to Damjan for rewriting my previous patch into
not-to-be-deprecated soon form!

Change-Id: I595a13c44ed07d4c6d60e2aef0f0bd807a76cbba
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agodpdk: ENA PMD patch for failure on port restart 35/15535/2
Matthew Smith [Thu, 25 Oct 2018 13:46:53 +0000 (08:46 -0500)]
dpdk: ENA PMD patch for failure on port restart

Patch to fix a bug in the ENA PMD on starting a port that
had previously been started and stopped. There was a
failure to allocate descriptors on start because they had
been allocated during the initial start and not released
when the port was stopped.

Issue reported/tracked at
https://github.com/amzn/amzn-drivers/issues/86

Change-Id: Id9c8d598929f0561788b985011fe5dea8f4a21a5
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoTrivial: Fix Makefile typo 53/15553/2
Paul Vinciguerra [Fri, 26 Oct 2018 11:42:31 +0000 (04:42 -0700)]
Trivial: Fix Makefile typo

Change-Id: Ia108b0359cb2dc4ba2e773117ee7134274a98056
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoextras/scripts: update vfctl script 54/15554/2
Damjan Marion [Fri, 26 Oct 2018 11:43:43 +0000 (13:43 +0200)]
extras/scripts: update vfctl script

Change-Id: I49cb5863237e4f9d2ac94879577d5d011e3bfe97
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodocs: add useful debug CLI Review Updates 63/15563/3
Scott Keeler [Fri, 26 Oct 2018 13:12:15 +0000 (09:12 -0400)]
docs: add useful debug CLI Review Updates

Change-Id: I4ebd977672090f2a7fc08bb139832df39614564a
Signed-off-by: Scott Keeler <skeeler@cisco.com>
5 years agovmxnet3: enable promiscuous mode 38/15538/2
Steven [Thu, 25 Oct 2018 18:04:42 +0000 (11:04 -0700)]
vmxnet3: enable promiscuous mode

Some L2 traffic requires promiscuous mode enable on the interface

Change-Id: Icbb2792aaf0d9d1c51373e46ae5049ff0d986863
Signed-off-by: Steven <sluong@cisco.com>
5 years agoRevert "Keep RPC traffic off the shared-memory API queue" 40/15540/2
Florin Coras [Thu, 25 Oct 2018 19:03:46 +0000 (19:03 +0000)]
Revert "Keep RPC traffic off the shared-memory API queue"

This reverts commit 71615399e194847d7833b744caedab9b841733e5.

There seems to be an issue with ARPs when running with multiple workers.

Change-Id: Iaa68081512362945a9caf24dcb8d70fc7c5b75df
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agopmalloc: don't lock 4K pages if we don't have access to pagemap 34/15534/2
Damjan Marion [Thu, 25 Oct 2018 13:56:04 +0000 (15:56 +0200)]
pmalloc: don't lock 4K pages if we don't have access to pagemap

Without pagemap access only way to do DMA to physmem is by
using IOMMU. In such case VFIO will take care for preventing
paging of such memory so we don't need to lock here.

Change-Id: Ica9c20659fba3ea3c96202eb5f7d29c43b313fa9
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoacl-plugin: "show acl-plugin acl" ACE# is truncated to 4 digits in output 97/15497/3
Andrew Yourtchenko [Wed, 24 Oct 2018 10:51:43 +0000 (12:51 +0200)]
acl-plugin: "show acl-plugin acl" ACE# is truncated to 4 digits in output

I was expecting "%4d" format string to exhibit the same behavior as
the one in C standard library, but rather than specifying _minimal_
width and expanding as necessary, it actually truncates the output.

Changing that to "%9d" should take care of pushing this surprising
difference in behavior into the domain of impossible.

Change-Id: Ia687137ca765bf9c1575af998ff11314010e81ad
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agovnet/tcp/tcp.c: address a corner case. 28/15528/2
Paul Vinciguerra [Thu, 25 Oct 2018 12:14:19 +0000 (05:14 -0700)]
vnet/tcp/tcp.c: address a corner case.

Avoid possible null pointer dereference

Change-Id: If8023edb43aaf037234f4a7b5f191cb23b09c74d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTrivial: Cleanup missing va_ends. 15/15515/2
Paul Vinciguerra [Wed, 24 Oct 2018 19:14:09 +0000 (12:14 -0700)]
Trivial: Cleanup missing va_ends.

Change-Id: Ie7827b6a31968a355687d27325c0f30cab1bc890
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoRun 'make test' verify job on ubuntu 18.04 instead of 16.04 25/15525/2
Damjan Marion [Thu, 25 Oct 2018 10:25:38 +0000 (12:25 +0200)]
Run 'make test' verify job on ubuntu 18.04 instead of 16.04

Change-Id: If570bb8cc19b2eab5877a20c963e27e410ee7560
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoUse correct name to register ABF plugin with ACLs 04/15504/2
Neale Ranns [Wed, 24 Oct 2018 12:50:40 +0000 (05:50 -0700)]
Use correct name to register ABF plugin with ACLs

Change-Id: Ic69a68665dcff4e4d48803b634aa2cf234c3944b
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agosession/tcp: improve cli 21/15521/2
Florin Coras [Thu, 25 Oct 2018 05:18:58 +0000 (22:18 -0700)]
session/tcp: improve cli

Change-Id: I91c9d040fc9b9b63f7109eeaac334c47fb1226cf
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAddress "is already installed" Jenkins issue 24/15524/2
Marco Varlese [Thu, 25 Oct 2018 09:49:39 +0000 (11:49 +0200)]
Address "is already installed" Jenkins issue

Change-Id: Iad2ddf63116a6f477c6106a3e045fe36f34bc062
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
5 years agopmalloc: support for 4K pages 09/15509/6
Damjan Marion [Wed, 24 Oct 2018 15:08:26 +0000 (17:08 +0200)]
pmalloc: support for 4K pages

Change-Id: Iecceffe06a92660976ebb58cd3cbec4be8931db0
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoACL: Fix next_table_index classifiers consistancy 84/11184/5
Gregory Thiemonge [Fri, 16 Mar 2018 07:40:50 +0000 (07:40 +0000)]
ACL: Fix next_table_index classifiers consistancy

Fixed consistancy between the first classifier match and the
next_table_index classifier matches:
- CLASSIFY_ACTION_SET_METADATA was applied only for the first
  classifier, but it was not applied for the other classifiers
- Actions should be performed only for input ACLs
- Payload should point at the IP header for output ACLs

Change-Id: Ifbd7791756320ae3198520c41902f5e99e3d40b4
Signed-off-by: Gregory Thiemonge <gregory.thiemonge@enea.com>
5 years agoipsec_gre.c: Remove redundant assignments. 19/15519/2
Paul Vinciguerra [Wed, 24 Oct 2018 23:45:50 +0000 (16:45 -0700)]
ipsec_gre.c: Remove redundant assignments.

Change-Id: I010528055b9d0597b087882146496eacc13b7daa
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotcp/session: add tx pacer 81/12681/17
Florin Coras [Tue, 22 May 2018 00:47:40 +0000 (17:47 -0700)]
tcp/session: add tx pacer

Adds tx pacing infrastructure for transport protocols that want to use
it. Particularly useful for connections with non-negligible rtt and
constrained network throughput as it avoids large tx bursts that lead to
local interface tx or network drops.

By default the pacer is disabled. To enabled it for tcp, add tx-pacing
to tcp's startup conf. We are still slightly inefficient in the handling
of incoming packets in established state so the pacer slightly affect
maximum throughput in low lacency scenarios.

Change-Id: Id445b2ffcd64cce015f75b773f7d722faa0f7ca9
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobuffer trace is broken in ipsec-output. copy it from node->flags to frame->frame_flags 31/15231/2
Kingwel Xie [Thu, 11 Oct 2018 01:03:10 +0000 (21:03 -0400)]
buffer trace is broken in ipsec-output. copy it from node->flags to frame->frame_flags

Change-Id: I56b573b5da04a27766bcbcafbd5438555424f2e7
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoSCTP: DATA chunk padding fix and hardening 45/15145/9
Marco Varlese [Thu, 4 Oct 2018 13:46:05 +0000 (15:46 +0200)]
SCTP: DATA chunk padding fix and hardening

According to the RFC 4096 (section 3.3.1) the DATA chunk needs to be
padded to a boundary of 4 bytes with zeros. This patch addresses that
requirement.
At the same time, this patch takes care of adding some hardening for
corner-cases where the transmitted tag could be wrong.

Change-Id: I3b653926e9933d0d3d46bc5f37eaceefd932e874
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
5 years agoAdd x86_64 perfmon tables 17/15517/2
Dave Barach [Wed, 24 Oct 2018 19:54:52 +0000 (15:54 -0400)]
Add x86_64 perfmon tables

The license issue is resolved, so we can package the .json
files. Added to the vpp-dev package in .tar.xz form, which saves a lot
of space.

Updated the perfmon error log entry: tell folks where to find the
compressed tarball, and how to extract it.

Change-Id: I3ed351fbf154cc3ba22d5f9c666acff77a2a14cf
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agodpdk: fix hugepage pre-alloc 18/15518/2
Damjan Marion [Wed, 24 Oct 2018 21:21:32 +0000 (23:21 +0200)]
dpdk: fix hugepage pre-alloc

Change-Id: I88577615bfd3cddca834a7b881979ab32bfd5574
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoacl-plugin: introduce a format function for l4 session key 16/15516/1
Andrew Yourtchenko [Wed, 24 Oct 2018 18:51:30 +0000 (20:51 +0200)]
acl-plugin: introduce a format function for l4 session key

Abstracting out the internal format function
for L4 session key type makes the other
acl plugin format/print functions more maintainable.

Change-Id: Ica1302263a42981555462b5338d18d9a9f9c8342
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agoTrivial: vpp/vnet/main.c fix resource leak 14/15514/1
Paul Vinciguerra [Wed, 24 Oct 2018 17:39:15 +0000 (10:39 -0700)]
Trivial: vpp/vnet/main.c fix resource leak

Change-Id: Ia6cadec8117d2cc35c9329910bb403bcd1b048ce
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovlib: Fix pci io bar read/write fd leak 01/15501/2
Mohsin Kazmi [Wed, 24 Oct 2018 12:05:34 +0000 (14:05 +0200)]
vlib: Fix pci io bar read/write fd leak

Few devices provide PCI bar region(s) through I/O.
If any such device driver opens I/O "fd" to read and write,
needs to close it, when pci device is going to be deleted.

Change-Id: Iba104e56f76c6bf9ccd27bf2223bad39b1301763
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoKeep RPC traffic off the shared-memory API queue 85/14085/5
Dave Barach [Wed, 8 Aug 2018 13:09:05 +0000 (09:09 -0400)]
Keep RPC traffic off the shared-memory API queue

Change-Id: Ib5c346641463768cf33eaf8cb5fab5b63171398d
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agodocs: add useful debug CLI 85/15485/3
Scott Keeler [Tue, 23 Oct 2018 19:16:46 +0000 (15:16 -0400)]
docs: add useful debug CLI

Change-Id: I5ef9ecd741f1623ae1b7a23fa0a4fa6db7e243a3
Signed-off-by: Scott Keeler <skeeler@cisco.com>
5 years agoDOC ONLY: fix doc bugs 06/15506/2
Dave Barach [Wed, 24 Oct 2018 13:23:23 +0000 (09:23 -0400)]
DOC ONLY: fix doc bugs

multiarch support: change autotools -> cmake
getting a patch reviewed: improve patch conflict resolution section

Change-Id: I2f07e1d3f21dd8cefb4d4bb3b451965d9314211a
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovppinfra: autodetect default hugepage size 99/15499/2
Damjan Marion [Wed, 24 Oct 2018 10:56:32 +0000 (12:56 +0200)]
vppinfra: autodetect default hugepage size

Change-Id: I5ff713ad0b254c74c5622e3b9425cca365b5ee97
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodpdk: disable unused rxtx callbacks in ethdev 88/15488/3
Stephen Hemminger [Tue, 23 Oct 2018 23:15:58 +0000 (16:15 -0700)]
dpdk: disable unused rxtx callbacks in ethdev

Save a few cycles on every rx and tx burst call by not compiling
in support for DPDK Rx and Tx callbacks. This feature is optional
and unused by current VPP code.

Change-Id: I1916bc8822e2bd405c1ac3909e85467a01023862
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoL2-fwd trace show the lookup result 91/15491/2
Neale Ranns [Wed, 24 Oct 2018 09:25:06 +0000 (02:25 -0700)]
L2-fwd trace show the lookup result

Change-Id: I09cf6ee7b4874d71f293f8f1a426d3a5e9651749
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoL2-input/output: use feature enum type in flag update function 93/15493/1
Neale Ranns [Wed, 24 Oct 2018 09:31:51 +0000 (02:31 -0700)]
L2-input/output: use feature enum type in flag update function

Change-Id: I1f58f441c65fbca101bee2e864bfa6ae2306b475
Signed-off-by: Neale Ranns <nranns@cisco.com>