7181 Commits

Author SHA1 Message Date
Filip Varga
f98993aaa1 nat: handoff traffic matching for dynamic NAT
Type: feature

Change-Id: I5c5af6f9acb340cc674323305104b8ce23e6d21d
Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 22bb417e91c7bdf639b24b5edd321028f56ea04a)
2019-09-03 10:15:07 +00:00
Andrew Yourtchenko
e48f5574f7 acl: perform a sanity check of ACL rules before creating ACL
Adding acl with incorrect arguments like 1.1.1.1/24 (instead of 1.1.1.0/24)
don't cause a disaster, but doesn't match either, as some might expect.

Add an explicit sanity check which returns an error.

Type: fix

Change-Id: Id1601f4b9c9887d3e7e70aac419d1f1de0c0e012
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-09-02 18:49:49 +00:00
Andrew Yourtchenko
de6faf9319 ip: ip6_preflen_to_mask incorrect result for prefix len > 64
The as_u64[0] in the result was not correctly filled in for
longer prefix lengths.

Type: fix
Fixes: 1c7104514c

Change-Id: I871772c618475396d1c1c4c699ff77e35097f07e
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 59ac9c23c47962fbbd935e7075ff7ee89e955847)
2019-09-02 18:30:34 +00:00
Mohsin Kazmi
404e24de56 gso: fix segmentation when gso_size greater than vlib buffer size
Type: fix
Ticket: VPP-1751

Change-Id: I5ffb078492adc97374290de404f2ec0102b75184
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 3f1964d2d2847c5307694fe8daea0a7eef1e2733)
2019-09-02 11:55:53 +00:00
John Lo
43a5b7cc44 dpdk: enable checksum offload for Intel SRIOV NIC drivers
Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I3ee59106ba45164a4ee3788bf4dcf5bf4c2dc1c2
(cherry picked from commit 03598c4bcc639cbfc9afa13c5b4e52440f9eae2b)
2019-08-30 13:24:51 +00:00
Damjan Marion
dc4161eb85 avf: properly set irq queue masks
Type: fix
Fixes: ae91180

Change-Id: I9c55c3fdf41089d337b998e2e28abb23d81525ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 2ca9a84bd00f2aee642d0147c1b99d4be5725a70)
2019-08-26 16:21:02 +00:00
Dave Wallace
9e25c7723d tests: move plugin tests to src/plugins/*/test
- Relocate plugin tests for 'make test' into
  src/plugins/*/test so that plugin test cases
  are co-located with the plugin source code.

Type: refactor
Ticket: VPP-1754

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I503e6a43528e14981799b735fa65674155713f67
(cherry picked from commit a43c93f8554ad7418e31be3791b3fb71232f60ac)
2019-08-23 17:31:08 -04:00
Dave Barach
46441cb9cd dns: cherry-pick 21444, 21468 from master
Type: refactor
Ticket: VPP-1752

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ieaec721056531ba0c70538c9bf97769a0e80aefd
2019-08-23 10:54:24 -04:00
Andrew Yourtchenko
1c586de48c misc: 19.08 new features
The full RELEASE.md diff is b610f2022c9f4e10a922e7b57c80ec77cd45d021

Change-Id: Ide6d85d41bdc836a03390a50ab94f6ebbaae0b28
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
v19.08
2019-08-21 17:46:52 +00:00
Steven Luong
01685beada devices: skip checksum calculation if guest supports checksum offload
Set VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD for the interface
to skip checksum calculation if guest supports checksum offload.

Type: fix
Ticket: VPP-1750

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ie933c3462394f07580ef7f2bec1d2eb3b075bd0c
(cherry picked from commit a75ad876401a700127ebf234fc422e76fcd57b4c)
2019-08-20 23:02:48 +00:00
Florin Coras
2ecbf6dc54 tcp: default to debug disabled
Type:fix
Ticket:VPP-1737

Change-Id: Ib5c33f0bdb3a8b1c2585135fcc8c07b151e47df3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-20 18:14:26 +00:00
Dave Barach
14c7756ad8 dns: handle multiple replies for single requests
The world is a mess. A single DNS request may yield multiple, subtly
different responses; all with the same DNS protocol-level ID.

Last response wins in terms of what ends up in the cache.

First response wins in terms of the response sent to the client. Hard
to do otherwise since we have no clue that more than one answer will
be forthcoming.

Type: fix
Ticket: VPP-1749
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I3175a40eb1fea237048d16b852a430f5ab51eaef
(cherry picked from commit e8d2dcb6a619f0884ece2284a286f21b3aa77e5a)
2019-08-20 12:48:52 +00:00
Andrew Yourtchenko
b610f2022c misc: VPP 19.08 Release Notes
Change-Id: I81c7ad50c66b4b8d690e87aad1f3c16af065fc85
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-08-20 11:50:19 +00:00
Dave Barach
28c6e5cfdb dhcp: resolver process node index in main_t
Remove the (unused) node_registration_t, don't try to use it to signal
resolution events.

Type: fix
Ticket: VPP-1746

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ice975e32152892ac4100b9e758412d48a43f09f1
(cherry picked from commit 018c14b7dbc5a910693f150045bfa803c4ae4eec)
2019-08-19 09:23:20 +00:00
Mohsin Kazmi
6bde1f4cd1 gso: fix l3 and l4 header offset in case of tagged interface
previously, PG and virtio interfaces calculate wrong l3 and l4
header offset. This patch fixes this issue.

Type: fix
Ticket: VPP-1739

Change-Id: I5ba978e464babeb65e0711e1027320d46b3b9932
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 14bea1bb6505c0134dd5d2a18bcc436ce72cd149)
2019-08-19 08:39:57 +00:00
Mohsin Kazmi
859c6a5d01 gso: fix the segmentation to use current_data offset
Type: fix
Ticket: VPP-1740

Change-Id: If3e34b5b8260e4c50af338895066c2c96f4603af
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 0a5734372d7176146126f83f51b0b9062f90fe94)
2019-08-18 22:02:42 +00:00
Mohsin Kazmi
62e4d84220 gso: remove the ip checksum flag in case of ipv6
Type: fix
Ticket: VPP-1727

Change-Id: Icfee35c5ab5e1c65079d1ca7bb514162319113e5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 7dfcf7f1f504f5e8283c54a428805cc3a4aa8da9)
2019-08-17 00:36:40 +00:00
Florin Coras
4222fb1835 tcp: fix cc algo name parsing
Type: fix

The initial config parser passed a pointer to the field algo id field in
tcp main. Because the field is a u8 and it was interpreted as a uword,
it ended up overwrting other tcp configuration fields.

Change-Id: Ie9020051c8fca40e14cf42a9888daa87360e5038
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit d25d364d2bc146d3e17ab7c4d558bcb0ce138b89)
2019-08-16 14:30:25 +00:00
John Lo
a5766fe139 vlib: copy trace_handle in vlib_buffer_copy/clone() functions
Since vlib_buffer_copy() and vlib_buffer_clone() both preserve
VLIB_BUFFER_IS_TRACED bit in flags field, it should also copy
trace_handle which would add minimal overhead. Thus, callers of
these functions do not have to call vlib_buffer_copy_trace_flags()
to copy trace_handle.

Type: refactor
Ticket: VPP-1745

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: Iff6a3f81660dd62b36a2966033eb380305340310
(cherry picked from commit 6631780422787166550b9871c46a94c160416324)
Signed-off-by: John Lo <loj@cisco.com>
2019-08-15 15:26:46 -04:00
Andrew Yourtchenko
4c945dacb9 acl: fix stats-segment counters validation on acl update
The stats-segment validation/clear logic for acl counters was wrong,
fix it. Also add the code to the unittests to cover that case,
add a vat command to enable/disable counters, clean up
the unnecessary endian conversion and remove the stray clib_warning()

Change-Id: I421297a92e4aeb885c468c72a97cec25981df615
Type: fix
Ticket: VPP-1744
Fixes: f995c7122ba0d024b17bc3232e8edd18d5e25088
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-08-15 15:22:11 +00:00
Florin Coras
2f51729bb3 tcp: extend protocol configuration
Type: feature
Ticket: VPP-1736

Expose more configuration parameters and refactor some of the existing
ones.

Change-Id: If44c31ff77ce3d7e8da67d39a4ff61346bdf5ccc
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 9094b5c319d3f072d3c248fe7c876e4048c13ac2)
v19.08-rc2
2019-08-14 16:27:49 +00:00
Guanghua Zhang
bb83b16a3c svm: fix svmtool and svmdbtool segment fault.
Type: fix
Ticket: VPP-1741

Signed-off-by: Guanghua Zhang <ghzhang@fiberhome.com>
Change-Id: Ifd3abaa5ec912378dbc7b73c4863aad26777dd7e
(cherry picked from commit 60f16c22b44625d517830b4266a225d3abaccefc)
2019-08-14 15:10:31 +00:00
Benoît Ganne
8ef151c900 gbp: do not scan gbp bihash if not instantiated
Type: fix
Fixes: 32dcd3b2f227dec638c39ade0c58d6741d83ec30

Change-Id: I42550fcc5b3fa486a05770d3e220d7a86315628e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-14 09:46:37 +02:00
Florin Coras
3a7457201c session: fix enqueue notification on 32bit systems
Type: fix
Ticket: VPP-1736

Change-Id: I7b5566525fc30fe0d3cc8cd991960f6ed2f1fc27
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 5d8a806144fbf46c0575ef24ae081724dfbdbe75)
2019-08-13 17:34:16 +00:00
Ian Wells
0325c021f4 papi: Revert vpp-api-python to py2, add py3 pkg
A previous commit, ca3d38ae18c21ce37212f0d5d5f4a1702429e70c, converts
the vpp-api-python package from a python2 library to a python3 one.
This changes the behaviour of the package and breaks anything that
uses it as a dependency.

This change reverts the package behaviour to a python2 package, and
additionally adds a *separate* python3 package for correct python3
behaviour.

Type: fix
Fixes: VPP-1738
Signed-Off-By: Ian Wells <iawells@cisco.com>
Change-Id: I54eb45156eb6e00fc4cd5b48e7a0aa17fd2f43f7
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 13cef0cc2cba4cff22bb5a860a8709cb3cfd35b2)
2019-08-13 08:04:41 +00:00
Alberto Compagno
63cafb331d fib: add adj_midchain.h to the list of files to install in the include path
Type: fix
Ticket: VPP-1735

Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Change-Id: I7063516a60bb211ad91ef04041b2751ca3f6598e
2019-08-13 08:00:23 +00:00
Dave Barach
d34e0cb0c8 http_static: manual cherry-pick 21231,21246
Type: fix
Ticket: VPP-1736

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ie34d1b7d7030c160972f3173a4401ef632e38633
2019-08-12 22:33:03 +00:00
Florin Coras
eda581e443 tcp: handle fin+rst+syn in closing state
Type: fix
Ticket: VPP-1736

Change-Id: I32d4d4a5de04e89087f4ab4a5c425eda572932a8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-12 18:35:16 +00:00
Dave Barach
78cc42d608 http_static: tls support
Type: refactor
Ticket: VPP-1736

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I45745e568cd943293d0015a61f67ec799b6804d8
(cherry picked from commit 6b53fd5163de7d1f452b472ec3ad945f4dbd694c)
2019-08-12 17:34:15 +00:00
Ole Troan
af8075529f api: vppapitrace JSON/API trace converter
Usage: vppapitrace.py [-h] [--debug] [--apidir APIDIR] {convert,replay} ...

optional arguments:
  -h, --help        show this help message and exit
  --debug           enable debug mode
  --apidir APIDIR   Location of JSON API definitions

subcommands:
  valid subcommands

  {convert,replay}  additional help
    convert         Convert API trace to JSON or Python and back
    replay          Replay messages to running VPP instance

To convert an API trace file to JSON:
vppapitrace convert /tmp/api.trace trace.json

To convert an (edited) JSON file back to API trace for replay:
vppapitrace convert trace.json api-edited.trace

To generate a Python file that can be replayed:
vppapitrace convert /tmp/api.trace trace.py
vppapitrace convert trace.json trace.py

Replay it to a running VPP instance:
vppapitrace replay --socket /tmp/api.trace

In VPP that file can be replayed with:
vpp# api trace replay api-edited.trace

This patch also modifies the API binary trace format, to include the
message id to message name table.

Ticket: VPP-1733
Change-Id: Ie6441efb53c1c93c9f778f6ae9c1758bccc8dd87
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit edfe2c0079a756f5fb1108037c39450e3521c8bd)
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-08-12 12:37:37 +00:00
John Lo
3d674e86b7 vlib: fix vlib_buffer_copy to preserve buffer flags bit
Make vlib_buffer_copy() preserve buffer flags bit the same way as
that of vlib_buffer_clone() so both are consistent.

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I6c32aa1e88724b482ce2439d82019e690311b664
(cherry picked from commit 8ed2d524aa401a89547a1e059528f8a34bb8895f)
2019-08-10 13:58:23 +00:00
Florin Coras
28d86217bf tls: mark as no lookup transport
Type:fix

Also fix transport close while handshake is ongoing.

Change-Id: I004c56d2297d0847c2cb77202f8fba3edaacad29
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit d09236d17d86a5d50166b2017f8f30a560c6e1b8)
2019-08-09 19:19:31 +00:00
Florin Coras
a932a34a22 udp: fix rx event generation
When session is owned by another thread, avoid postponing the generation
of the rx event.

Type:fix

Change-Id: Ie6afc8116ce40e83d8aae0432b48e19b31287d8b
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 9cbf6818b37275199b6c0ebef0ef3d8ecaac0a3b)
2019-08-09 16:58:17 +00:00
Florin Coras
ec25b91ad3 session: allow closed transports to send
Type:fix

Transports like tcp may notify session layer of a close but they may
defer the connection's deletion (e.g., tcp time-wait). During that time,
transports may still want to send packets. So, unless the session has no
transport (transport-deleted state), allow the transport to send.

Change-Id: I3ae335c7b951ff64be8529a5e3f3ad790feddc84
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit a678974cc52ac61dd6094c3f6649f9e3202be1cb)
2019-08-09 16:25:14 +00:00
Florin Coras
1403fe6047 tls: handle transport reset
Type:fix

Change-Id: I5994fb53dc4b9fd58920b3d67472c38b41db27c2
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit f03c49413f270386d46a82dd9a3bce819cf81250)
2019-08-09 15:10:18 +00:00
Florin Coras
58e95bc2cd svm: fix fifo max writeable chunk computation
Type:fix

Change-Id: I60fdd7651a3d3fac505e7aec7a41f9d096022895
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit fcd26a039409e2697a6797e74b0c45544503e853)
2019-08-09 13:53:03 +00:00
Florin Coras
0f0ff02a93 tls: fix close with data
Type:fix

Also changes the way the ctx is freed. TLS now waits for tcp delete
notification before freeing the ctx.

Change-Id: I2f606a9ce7b3755ae9d11d6fe714fe11b65dcb98
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit ef2b3357b4b2a682ef81ffa2c71cec14f83101d6)
2019-08-09 13:52:29 +00:00
Florin Coras
c9a9f5d347 tcp: fix zero rwnd sent check
Type:fix

Change-Id: I1e6f2cb28c1bf544cc3d060b11c8935f9edb0eed
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit d1ba3d257788f1a65016a50a53d85f2b905874bb)
2019-08-09 13:52:02 +00:00
Florin Coras
c7f0fe030f tcp: cleanup timers
Type:refactor

Change-Id: I37dbc8b55827d66c2578d6ab8b86ed7e18198aa6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-09 13:51:40 +00:00
Aloys Augustin
7119c22f82 udp: fix connections move
Without this the use of uc0 is racy between the current thread and the
thread that owns it and will delete it.

This also ensures we don't trigger a read event on the session before
moving it to the right thread and notifying the application.

Type: fix
Change-Id: Icb1ca3ee5805ea3c0d2d424d4b23511465deb3b6
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
(cherry picked from commit b3392334942ed5459edfa7f11e098f4eab3aa29a)
2019-08-08 02:25:24 +00:00
Andrew Yourtchenko
23526f78a8 docs: Initial changes for stable/1908 branch
This patch adds an entry for the defaultbranch
in .gitreview

Change-Id: Icb772912db57db055aec94d3a6a3cba21ba00876
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
v19.08-rc1
2019-08-07 17:30:04 +00:00
Benoît Ganne
c0bc26eaf3 rdma: add missing symbols
rdma-core-25.0 move some symbol to another library, make sure we link
to it.

Type: fix
Fixes: ec757593859bd8c16839ea8a81a2ef4eb8b29539

Change-Id: I6b8a56ea5fc7787d3de0982015ed47b767557c06
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-07 15:53:12 +00:00
Florin Coras
08f2a5dae9 interface: fix checksum flags
Type:fix
Fixes:4208a4c

Change-Id: I7077788cd14f539b06ead5dc65d8411940438bae
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-08-07 15:13:42 +00:00
Benoît Ganne
388f418a8e gbp: add l3out redirect to remote SEP unit test
Type: test

Change-Id: I0fafaebbb1f70488e0bc7d21da778d55fe15c3f5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-07 08:56:03 +00:00
Neale Ranns
e3282bae27 vom: export/install cmake files
Type: feature

allow other projects to use cmake modules to find VOM

Change-Id: I00e01e9bec3ecf79903cd522d2770bdb70e5399b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-07 08:54:43 +00:00
Neale Ranns
d5d7b96ec1 tests: UT for MPLS 6PE
Type: test

Change-Id: I48650473591aa181167cf3a86ed2f5da58a81072
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-07 08:42:38 +00:00
Neale Ranns
adb17a813c fib tests: IP multicast over GRE
Type: feature

Change-Id: I1632ff23b1bf6d91aa3406c95ebd6ef0aa595f35
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-07 08:42:17 +00:00
Benoît Ganne
8511687d59 gbp: update gbp endpoint cli
Type: feature

Change-Id: I0afc6eb4765029dc28859c9ac2b0578749a38d3d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-06 15:59:10 +00:00
Nathan Skrzypczak
f8475a7b28 udp: fix session migrate when not needed
Type: fix

Change-Id: I56f5f5e7e6430552f0346a65b1e5707edc28c1c0
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-06 14:00:20 +00:00
Nathan Skrzypczak
d597ec7931 quic: Add missing session_migrate_callback
Change-Id: Ibbec53e07852f1b8987696fddbc3bf83f75705ce
Type: fix
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-06 13:13:25 +00:00