7900 Commits

Author SHA1 Message Date
Neale Ranns
251c1e73e1 ct6: dst,src copy typo
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I266fa5dc637383fd8dac6592c9c266a1b70a73e9
(cherry picked from commit 629e268aa171a8bc03fb93fc995725b78ae64063)
2020-08-12 15:28:04 +00:00
Yu Ping
fb5ef86105 tls: enable TLS OpenSSL plugin works in 3.0.0
Type: fix

Change-Id: Id1602981fcc6efed1b0efe79a1fc8177457acdb5
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit 1c6486f7b8a00a1358d5c8f4ea1d874073bbcd6c)
2020-08-12 15:28:04 +00:00
Nitin Saxena
d07624f149 ip: avoid fib lookup for consecutive pkts having same source IP
Type: fix
Fixes: be2286b0

This patch does following:

- If terminating frame has consecutive packets with same source IP, this patch
  avoids fib lookup for those packets in ip4-local node. This drops cycle count
  for ip4-local node on both ARM and x86. It being done by enabling dead code in
  else {} case of ip4_local_check_src_x2() and ip4_local_check_src() functions.

- In case all packets in terminating frame have unique source IP (e.g:
  incrementing), ip4-local is costlier by 2 cycles (broadwell)

Change-Id: I472ddc324716cec8bfe601568b8aeb7565f97ab3
Signed-off-by: Nitin Saxena <nsaxena@marvell.com>
(cherry picked from commit 2d18d2ea9f0e3d6c47d365ec135af651b14e8165)
2020-08-12 15:28:04 +00:00
Zhiyong Yang
a4200a6824 fib: leverage well-optimized clib_memcpy
Type: fix

Change-Id: I684910837ca4d9c8a07262459158bbb0423a33af
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
(cherry picked from commit d3d7ef5ec828ec895c6f90090118782e497b9084)
2020-08-12 15:24:14 +00:00
Florin Coras
7e8c693f7d session: remove io event dispatch dbg msg
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I166ab7b96444587a3252925d3a28505e0db52d74
(cherry picked from commit 87b0c892947006cbfa80fd2af15e8edb4029f327)
2020-08-12 15:24:14 +00:00
Florin Coras
71eab61d31 tcp: fix persist assert
Type: fix

Persist and retransmit can pop at the same time.

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia9530645cc84c83a881a75d7b4627197dc50ed29
(cherry picked from commit a6696719cb9fcd8ab54a5007e91dac6aeffe4e70)
2020-08-12 15:24:14 +00:00
Florin Coras
9568a58ee5 tcp: fix scoreboard assert
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3c70b331932708a1b773392e089aed9dba9b3b31
(cherry picked from commit edf1da94dc099c6e2ab1d455ce8652fada3cdb04)
2020-08-12 15:24:14 +00:00
Florin Coras
40f1beaae3 tcp: fix last sacked with no holes
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id12b0a9b8bc47aef8b393544e5b4c8228ed6a606
(cherry picked from commit 479f7fec6a876bf06f6007c03fd7b9fa3404df54)
2020-08-12 15:24:14 +00:00
Florin Coras
1bc07facef vppinfra: retry socket connect on EAGAIN
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I93577acf559a8fa639aab7ec3f7cdbe7df9a248d
(cherry picked from commit 42ddf69ed0560cff70a2f3fafc732fc5a33255c0)
2020-08-12 15:24:14 +00:00
Florin Coras
06f4a811a7 svm: fix eventfd signal write error check
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I706c8642ca0877430a42cc0ca5bc61a45428fc98
(cherry picked from commit e4a08c1f3bf58670ff94382b2821518ad954a854)
2020-08-12 14:37:52 +00:00
Dave Barach
756437e6f2 vlib: fix coverity warning / real bug
The path must be next-to-impossible to hit, because the code has been
wrong for at least 5 years.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I23b8c4e1631827e7931f353c561c1e19c596c598
(cherry picked from commit 5c944eef7012e7c5b363399ed92966fb659196b7)
2020-08-12 14:37:52 +00:00
Yu Ping
da99771dfe tls: Make tls CPS test run for a quite long time
Type: fix

Change-Id: I8cfb48bd7f92689b296861dd368186408918061b
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit a9ed934745403461834b4361f06bd3865682f368)
2020-08-12 14:37:52 +00:00
Florin Coras
20ebef4714 tcp: fix duplicate sack whith reneging
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6f7fb91e059996ff702eb9c36e3abaed237fe221
(cherry picked from commit 067f8f963d64b1cbc70f2b78ebd2c6d3791e7d22)
2020-08-12 14:37:52 +00:00
Florin Coras
c2130c0102 tcp: fix rate samples for old acks
Type: fix

Change-Id: Ieab35bbfba81faae61b1267d8661df5195877824
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 2f04cb9f142abef82cd379432cecdafef9e776db)
2020-08-12 14:37:52 +00:00
Jon Loeliger
a1261bd0b3 build: Fix Subject-line feature list extraction
Bang on sed until a better incantation appears.

Change-Id: Ib8ad0996b6325db0fe983c86dd7dc553c9d388c4
Type: fix
Fixes: 26ce6ca1fe6f524a9049444fe8d55042fd7530a6
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 171577e129363aec30640a50f91cf0ff46d61bb9)
2020-08-12 14:37:52 +00:00
Florin Coras
34ccf72c4a svm: broadcast on raw dequeues and full rings
Type: fix

Change-Id: I0cac9001290e7ed4e2e318ae62c56e97ec75a3db
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit fea813ae3de5343a2bc91306fddf6dbd1832f93d)
2020-08-12 14:37:52 +00:00
hanlin
1144fb0f98 vcl: hold errno when calling LDBG
Type: fix

Call trace of LDBG:
LDBG->clib_warning->_clib_error->dispatch_message->os_puts->writev
However, writev will hijacked by LDP, and then execute following code:
if ((errno = -ldp_init ()))
    return -1;
Now, errno will be set.

Because we always call LDBG just before return from ldp_accept4, listen,
and etc. So errno will be overwritted after LDBG called.

Signed-off-by: hanlin <hanlin_wang@163.com>
Change-Id: I7a90f3a14772994f11f09650481411796e3f5630
(cherry picked from commit 9f3f18f99fd321cdcfc331e92b10b64f0ef590b3)
2020-08-12 14:37:52 +00:00
hanlin
6104daa550 vcl: EPOLLOUT should be generated when epoll_ctl called with EPOLLOUT
event

Type: fix

When we call epoll_ctl to add or mod fd with EPOLLOUT event, mostly to
check if we can write. So we expect a EPOLLOUT event should be generated
immediately unless tx queue is full.

Signed-off-by: hanlin <hanlin_wang@163.com>
Change-Id: Ie99986a44dbb07b6ff2fba6512171056f79e77bd
(cherry picked from commit 475c9d7bcd0f2ceca77022eaef67ad9a84365609)
2020-08-12 14:37:52 +00:00
Florin Coras
c69b18f818 tcp: accept sack reneging as a cc event
Type: fix

Change-Id: Iead1303ca3dec7593eb3ce54f291b82d94c821a4
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 1de7167e7a12a80cc5996959aeb1fbe4b2853ccb)
2020-08-12 14:37:52 +00:00
Jon Loeliger
62c6e93d10 interface: Prevent bad inner-dot1q any exact-match configuration
Someone much more knowledgeable than I wrote:

    For L3 IP forwarding, any VLAN tags on a packet must be exact
    match to a sub-interface which means both outer and inner VLAN
    tag IDs must be exact-matched to specific values defined of that
    sub-interface.  Without exact match on a L3 sub-interface, VPP
    has no mechanism to know what VLAN tags to use for packet output,
    such as ARP request packets or IP packets, on that sub-interface.

    Thus, sub-interface with "inner-dot1q any" is not an exact match
    sub-interface by definition since no match is present on inner
    tag.

While in the area, fix a memory leak that would ensue on poorly
configured interfaces.

Change-Id: I8d17a96dbca3e3724c297ecc935ca61764e6ce2e
Type: fix
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit b22e1f06bbebc48ec72ce8effa529e69ffbb12ca)
2020-08-12 14:33:06 +00:00
Damjan Marion
74331c935f build: use cmake build types
Type: make

Change-Id: If822c85d6ff26982516ea1d597ca81aa84773b2b
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 2baa115da3b752cd7e44cc477f2c45bda22d444b)
2020-08-12 12:46:12 +00:00
Miklos Tirpak
5381da1dc6 gtpu: Track the dst FIB entry instead of RR sourcing that
RR sourcing the destination FIB entry limits the number of tunnels
to 255 for a particular destination. This change removes this limit.

Type: fix

The patch is based on 1f50bf8fc57ebf78f9056185a342493be460a847
that introduced the FIB entry tracking but did not update
the gtpu plugin.

Signed-off-by: Miklos Tirpak <miklos.tirpak@gmail.com>
Change-Id: I8a4a87382a6eb5120e2bb65b9bc3c446bbfdbd3b
(cherry picked from commit 75c72369186f6341a13374d2dd6e60ce3c7a88a6)
2020-08-12 11:16:27 +00:00
Christian E. Hopps
c9563e60fe misc: don't os_exit(1) causing core on SIGINT
It's not typical for a program to core when it receives a SIGINT, so
keep this from happening.

Type: fix
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I2c15985a57e6ea898ff05c4001e4b30b41154eba
(cherry picked from commit 10a8bda37eed33ada1e7c6ece7bda1fe066ba541)
2020-08-12 11:16:27 +00:00
Christian E. Hopps
c7e6b50fdd pg: don't leak open files in packet-generator
Fix pg code to close it's open file descriptors before zero'ing the
pcap_main structure for re-use.

Ticket: VPP-1780
Type: fix
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I32945c6476ae83b8d210ee67ac78db3e8f786f46
(cherry picked from commit 19871f25394fa9a4bfb55006092cbcc28b446c04)
2020-08-12 11:16:27 +00:00
Paul Vinciguerra
99e0ee56eb vpp: fix .short_help for "ip virtual"
Type: fix

"# <feature-name>: <subject>

Change-Id: I8b6b6b8c70faec7cd95e1842259e907fb9587017
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 0812aea046209dc990ec704258570f46d3fa74c8)
2020-08-12 11:16:27 +00:00
Paul Vinciguerra
e144c1b9d2 vxlan geneve gtpu: fix short help
Type: fix

Change-Id: Id53eb6ed15f270d747b9831a7b585cbafe515dd2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 5fb2278cb8badbbfe727acbdcaeda008a7fd2833)
2020-08-12 11:16:19 +00:00
Paul Vinciguerra
ffd24e5243 ip: cleanup punt socket cli help
Make the help string consistent with the cli parser.

Type: fix

Change-Id: I7140bd589c2a94dbf5af5cc633cb495457a6af22
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 32c4d38f7ac6fe22abb0b4859f6075bb9b661773)
2020-08-12 07:43:14 +00:00
Paul Vinciguerra
43deb075fb feature: add descriptive cli command output for 'set interface feature'
DBGvpp# set interface feature local0 arp-foo arc bad-arc
  set interface feature: Unknown arc name (bad-arc)...

  DBGvpp# set interface feature local0 arp-foo arc arp
  set interface feature: Feature (arp-foo) not registered to arc (arp)...
  See 'show features verbose' for valid feature/arc combinations.

  DBGvpp# set interface feature local0 arp-disabled arc arp

Type: fix

Change-Id: I036bb2a75dd2d40f6901e4fde3eb14925238e19b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit a4e2e7cc95250220e0d892eb11dcc0adc9fd7e22)
2020-08-12 07:43:14 +00:00
Paul Vinciguerra
67cb0f82a1 feature: add [verbose] to show features help
Type: fix

Change-Id: Idf694477c18852e5541c28a493a56b302122e46c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit baa171041bc950f192c147f7b79a8add2299b74a)
2020-08-12 07:43:14 +00:00
GordonNoonan
8ab656321e vlib: fix startup-config-process stack overflow
Type: fix

Startup config setting an i40e/ice interface
up in Debug VPP consumes more than the currently
available stack space.

Signed-off-by: GordonNoonan <gordon.noonan@intel.com>
Change-Id: I98b52c5596799017b97f802a8661b76cd1bb3245
(cherry picked from commit b2dbb36fc265b8996fc7fa310dda447d5b0479cb)
2020-08-12 07:43:14 +00:00
Vratko Polak
a750b7f71f vlib: fix an issue with show pci
The fix has been received over e-mail from Lijian Zhang.
https://lists.fd.io/g/vpp-dev/message/14808

Type: fix
Ticket: VPP-1805

Change-Id: I73e5fe7dcbe2b0b1c639d844f29183eab3b6dd66
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit dea0b23fa73fe3d53b8f3b004f7b8a2a8456d7f7)
2020-08-12 07:43:14 +00:00
Bernhard M. Wiedemann
55ae848ce4 build: Allow to override build date with SOURCE_DATE_EPOCH
and make host and user overridable
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Also switch to UTC to be independent of timezone.
Also use ISO 8601 date format to be easier to parse.
This is similar to c9f40227836b827b71a6cbc4744d4b7151b2fcef
and df82ec8fe7d91467c8b479bba74c761c0a6ffc59
which was lost in the move away from automake.

Note: This date call is designed to work with different flavors
of date (GNU, BSD and others).
If only GNU (Linux) support is needed, the patch can be simplified.

This PR was done while working on reproducible builds for openSUSE.

Type: fix

Change-Id: If4cab12320e6b5fcb1f2842fac5d745b33b01ed7
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
(cherry picked from commit 3d14f036199d9b3098268821424b4e6f5e8f46dc)
2020-08-12 07:43:14 +00:00
Benoît Ganne
a699926a0d vlib: fix vector-as-C-string overflow
Type: fix

Change-Id: If0419ff1a82d45e5b3326973008e1b9feb290c5a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 62d9fda8e474f87459c6e24d13b09f7bfec146f3)
2020-08-12 07:43:14 +00:00
Benoît Ganne
d8e41e7810 classify: forbid invalid match config
Forbid too long match to be configured.

Type: fix

Change-Id: Icfced0f86821d5febd6a3c81e1315bd9737498c0
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 71a70d73f34f7c057dd95dbca39fb8e602087a75)
2020-08-12 07:43:14 +00:00
Benoît Ganne
280079fb99 vppinfra: fix cpu flag string overflow
Type: fix

Change-Id: Idb1fff8a172034044bb33d5b271a84d1fd672ef5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit a7cb357491bc8adeac23a329685e8ea9aa2d2f33)
2020-08-12 07:43:14 +00:00
Benoît Ganne
6051aa4924 l2: fix l2input_feat_names overflow
Type: fix

Change-Id: I59549b3aab5a0ccfe7db02757f78528e028121a5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 70ef0faea9f706004c068fb843797a7cb08a9e68)
2020-08-12 07:43:14 +00:00
Neale Ranns
f7b581260f ipsec: Init salt value in SA creation CLI (so it's not random)
Type: fix

Change-Id: Idf4d0b59a1eb2c739a67a4786470884050f81561
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 8dc75c0cc3ac0db13778a0a32f9aa81597b80556)
2020-08-12 07:43:14 +00:00
Florin Coras
339cad4aaf api: fix sock reg passing on read event
Type: fix

Change-Id: I383242e04a114b69fe247d912842be3560e96c10
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 5224b5cbd51ed48d1d2ce2a412998d8a944c480b)
2020-08-12 07:43:14 +00:00
Benoît Ganne
299f9caae6 ipsec: make sure pad_bytes does not exceed pad data size
This helps GCC understand the memcpy will not overflow pad_data. GCC-6
(default on Debian 9) in particular got confused.

Type: fix

Change-Id: I176eb01531b9d5c7ebec40f015e510b2d56e77c4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 4505f0154eaba59c432c869b65e2dc493837032a)
2020-08-12 07:43:14 +00:00
johny
b04bdd12e6 ip: coverity fix
Delete Null-checking "p0" in function ip6_tcp_udp_icmp_bad_length,
because it's not necessary.

Type: fix

Signed-off-by: johny <jan.cavojsky@pantheon.tech>
Change-Id: I2bf43a60c1c1d76e42581df27f2285c9e9563093
(cherry picked from commit a633a4318bea2f9edcb80d9685b0f811cac679ea)
2020-08-12 07:43:14 +00:00
Florin Coras
3d3c4f0491 api: fix free socket process args
Type: fix

Change-Id: I910be067de6ed65790d25cc95a3d8b5b66680567
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit b0384230d95d9de5e5fec0a311b8644c99f85c31)
2020-08-12 07:43:14 +00:00
wanghanlin
889ea0f54c vcl: RX event may lost when accept session repeatedly
Type: fix

Some applications may call accept repeatedly to process all connect
request until get EAGIAIN error. Subsequent call may get RX event of
previous accepted session, then should process it rather than just
discard it.

Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
Change-Id: Ice53442de66289a62591b79a9cc31e883e894c23
(cherry picked from commit 96453fd2417ebd1d69354a7fb692976129cea80e)
2020-08-12 07:43:14 +00:00
Florin Coras
ec12ffe1bd session: close for reset replies independent of state
Type: fix

Change-Id: I8b8875f1dc9203dfbb443ac43df8250cbb0b1edc
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit f1910326d537ad7692d4a9b807ebbef93106acea)
2020-08-12 07:43:14 +00:00
Florin Coras
9e51b52bb9 tcp: fix tail rescue with sacks
Type: fix

Change-Id: Iad73f47cef3d29c4b0b7d1f58f2f2b14ba4b1d38
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 3eba7f1575a17b77924bf5be67b03b0227d04b78)
2020-08-12 07:43:14 +00:00
johny
25b58c6d21 ip: fix cancel termination after receive malformed ip6 packet
This fix is for cancel termination of vpp after receive malformed
packet type of ip6.To avoid termination of vpp are checked if are
missing data in packet. This occours, when payload length in ip6
header packet is more than real count of data in packet. When
this error occours, packet is ignore.

Type: fix
Ticket: VPP-1693, VPP-1694

Change-Id: I9d9ecea7b75c8702cb31aa8051c8d4d7ce19659d
Signed-off-by: johny <jan.cavojsky@pantheon.tech>
(cherry picked from commit 17478e4eb81d384f171ca27c9110a051cd434f16)
2020-08-12 07:43:14 +00:00
Klement Sekera
cba508a212 tests: fix wrong checksum error message
This change fixes the error message, which would previously report
mismatch on IPv6 layer instead of TCP layer.

Type: fix

Change-Id: Ie78779685362a420d155f928b3cdb341bc3fb8bc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 66cea092c7a584bb7b82000fbfad349e6f0af7e1)
2020-08-12 07:43:14 +00:00
Yu Ping
9e357046a3 vcl: resolve VCL part session cleanup issue
In Nginx performance test, we notice that there are so many session kept
open with the state of TRANSPORT_DELETE, and it is root caused that
vppcom fails to return close state.

Type: fix

Change-Id: Ia30f959e0e5adb5b8bcfa13fb1dd7b2cb410a31b
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit b2955355cc9a654447d8647e33def67cd27892f6)
2020-08-12 07:43:14 +00:00
Yu Ping
e09a07826e tls: change SSL_has_pending to avoid BIO check error
Type: fix

Change-Id: I454aff1b187b75a1328c90e30b9b487377ae5f68
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit ce9bdfe5fcfa6e2acd670ea0063ce5e0fde15096)
2020-08-12 07:43:14 +00:00
Jon Loeliger
be4511d318 map: Fix a coverity MAP dead-code issue.
Type: fix

Change-Id: I5467bbe3b25b1ea3fb44157abe6e7bfb3f191e77
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 3aae3dc7acddbe2f46de785b50c3358b7d3e0acc)
2020-08-12 07:43:14 +00:00
Jon Loeliger
897c941c8d map: Avoid null dereference in 'map show' and 'map del'
If a map domain is created without a tag name, inspecting
the map data will segfault looking for an unset name in
the so-called "domain extras" vector.

Enhance "show map domain" to show all map domains.

Type: fix
Change-Id: Ic55662b84eec58221816da270b2ef9e89c3a31c3
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 4a6d093e7ef72b06b35ffee911d35033dfde0171)
2020-08-12 07:43:14 +00:00