7306 Commits

Author SHA1 Message Date
Elias Rudberg
8e35619169 dpdk: fix null-termination of strings
Fix problem with some strings not being null-terminated,
by using the vec_terminate_c_string macro in two places.
The problem was found using AddressSanitizer.
(Also make sure indentation is OK for those changes.)

Ticket: VPP-1772
Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: Ib7826e3c322e58b649e2d7f6053786da618a5e9e
(cherry picked from commit 7fd402163c221919446942c0784073a56bfd4f70)
2019-09-30 15:23:24 +00:00
Benoît Ganne
003dd32489 hsa: fix memory management bugs
Fix use-after-free and non-null terminated string.

Type: fix

Change-Id: Ibba2a6cae68c612a34477aa813b3bf27a0c8fc1f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 58519563acc0933771172941291b7d0de2ffeddc)
2019-09-30 15:23:02 +00:00
Benoît Ganne
fcb879c96c quic: fix use-after-free
Type: fix

Change-Id: I5e5e37684e336ca992dae8ea1d39b1fb103802b1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 6d6456ab421ee30f14aded964bad2d3ba55bcf20)
2019-09-30 15:22:43 +00:00
Benoît Ganne
c811c43606 quic: fix non-null terminated hostname string
Type: fix

Change-Id: I089d359d5726050f32f69366547086216fdb3098
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit b840c773dc9d7f0f9f85753a20d00acb53a6bce7)
2019-09-30 15:22:20 +00:00
Florin Coras
bda5886239 session: fix session filter range
Type:fix

Change-Id: I173f45bf3d90e6979675b2ac812a969539f02147
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 61a89f2b614184eeced3f67affed959897d4da18)
2019-09-30 15:20:13 +00:00
Nathan Skrzypczak
2af93b2643 misc: fix shebang with missing env
This is needed for macos where /usr/bin/python[23] does not exist
and /usr/bin is write protected

Type: fix

Change-Id: Ia1b3c732248c78482993de532fa2ea96e376d90a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 5c2f96436afd0cef13797f764474a54f464d7916)
2019-09-30 15:19:53 +00:00
Vratko Polak
e6b29a9df5 papi: let async calls return context
Callback receives "reply" messages containing context,
but previously there was no easy way
to get the automatically generated context value
of the originally sent "command" message.

With this, the caller can store the contexts,
so the callback knows which command got replied to.

Type: feature

Change-Id: I58ca812d20b03916f74096c396126710115a747c
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 2f6e0c6002f732b7f938a0f770f19c9dec9269f1)
2019-09-30 15:19:29 +00:00
Filip Tehlar
45a02523b1 ikev2: fix crash during IKE SA Init exchange
Type: fix

Change-Id: If827fe348fe35d1221d29f91b7e6ea1624d13999
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit b736e75d5bb2d132fb00c35b6aabaa52e5f624ad)
2019-09-30 15:19:09 +00:00
Aloys Augustin
587eeecf0d quic: fix server opening stream immediately
Previously, if the first thing a server did was to open a stream and
send data, this could trigger a crash on the clilent side VPP as the
quic session wouldn't be allocated.

Change-Id: I43990ce2a71217d6719ecae4da60111d05fbcfc0
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
(cherry picked from commit ffbfe3a2d6aaf4e847a1848c29fc8ce2997ed260)
2019-09-30 15:18:51 +00:00
jialv01
9636f97482 build: fix unsupported CMake comparison operation
VERSION_GREATER_EQUAL is not supported before CMake version 3.7.

Type: fix

Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
Change-Id: Id690b7b7c26121f9d289ebd0aaea0860be63795f
(cherry picked from commit ea397f5a67e8cdef1034757cb07fb409dd150fb8)
2019-09-30 15:18:30 +00:00
Steven Luong
d5e8ed7be1 stats: add /if/<n>/<n>/state for lacp interface state
Add /if/lacp/<bond-sw_if_index>/<slave-sw_if_index>/state

<bond-sw_if_index> is a vector of the bond sw_if_index
<slave-sw_if_index> is a vector of the slave sw_if_index
Content is the integer value of the lacp actor state. The state is actually
a bitfield as described in the lacp protocol spec.

Type: feature

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic6eca8ce2a1acd2d858e4e50b7eac1d000ea08e5
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit 0f09a828ad2dc53d4f1e69de536f3104eaccc4b0)
2019-09-30 15:18:09 +00:00
Klement Sekera
b0888636de tests: run vapi tests by default
Type: fix

Change-Id: I7b190507446fca745fc4bc6abbdeed48f55abdb9
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-09-30 12:13:04 +00:00
Ole Troan
c90f4363aa stats: fix per_worker vector rate heap
The per_worker counters were outside of the stats heap.
Also fixes the length of the per_vector counter.
A simple vector is two dimensional including a thread dimension.

Fixes: f89a6de8f0
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I370bf9cb033d264f42df2723e01b768dc270792b
(cherry picked from commit a41b0b78a4341478ee6c8701f9ec642b5c2d1cdd)
2019-09-30 09:33:03 +00:00
Hongjun Ni
2f77ee8919 lb: vpp hang when executing "lb flush" commands with more parameters.
- get all vip list.
- get all as list per vip.

Ticket: VPP-1778
Type: fix

Change-Id: I0d82f38960ef1264d04ac07589a555d01f6e8110
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2019-09-30 09:32:47 +00:00
jialv01
54e099f101 build: fix running error with vmxnet3_test_plugin.so
vpp_api_test load vmxnet3_test_plugin.so error:
"load_one_plugin:42:/vpp/lib/vpp_api_test_plugins/vmxnet3_test_plugin.so:
  undefined symbol: unformat_vlib_pci_addr"

Type: fix

Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
Change-Id: I444aa05d0bc3c4f4f25082388243f1adb305dd0a
(cherry picked from commit 082ebeba166accc87619c45e7de0c29c9f00d254)
2019-09-30 00:13:27 +00:00
Jakub Grajciar
4aee015225 libmemif: prevent crash in case of invalid connection handle
Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I803c86a48e0148ef143026a5cd93e4510c4f0611
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
(cherry picked from commit bdf3ebe358787ef240dc9fadc515dfd178dfef7b)
2019-09-30 00:10:30 +00:00
Florin Coras
2ff21af396 session: improve cli
Type: feature

Allow session cli filtering based on thread index, transport protocol,
session state and range of session pool indices. For instance

show session thread 1 proto tcp state ready range 0 20 verbose

Shows the session ids for the first 20 tcp sessions in thread 1 that are
in ready state.

To avoid excessive output that could reasult in the worker barrier being
held by the main thread for long periods of time, the session cli will
only output:
- session ids (verbose == 1) for a maximum of 50 sessions / worker
- verbose > 1 details for a maximum of 10 sessions

Change-Id: I2cfb351b548e2e0a1d5b4345810be613e2917d17
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 5bb23ecd098eac639641e2b3d62eb8744e0efef0)
2019-09-30 00:08:22 +00:00
Florin Coras
6702641f53 tcp: use rate sample rtt in recovery if possible
If in recovery and rate samples are taken for burts that have not been
retransmitted, use the rtt estimate.

Type: feature

Change-Id: I95028f492008457c959157aa4ee4c3435fa9c3f0
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 1dbda64b467f020db131cb9a01422b8f3fbf58df)
2019-09-29 16:45:32 +00:00
Florin Coras
dedb3c8d95 tcp: cleanup scoreboard after recovery
Type: fix

When recovering from congestion, remove last hole in scoreboard if it
covers all bytes sent above snd_congestion.

Change-Id: I752accd4590cd9bf553c35a1bb40a38c308c04f5
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 321cfa5fcb8f347329a5296e2024ef0e6cef319f)
2019-09-29 16:41:21 +00:00
Florin Coras
9dba3dbf03 tcp: handle sack reneging
Type: feature

Change-Id: I201155b1b92cf7e57310af726879dab039090582
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 558e3e09577a7b49e2fec58e8ac27f3f3ae0592f)
2019-09-29 16:34:19 +00:00
Simon Zhang
6f3621d772 tcp: enable gso in tcp hoststack
Type: feature

Change-Id: If68d07fbe8c6f7fffd2f93c7e854367082927e4f
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
(cherry picked from commit 1146ff4bcd336d8efc19405f1d83914e6115a01f)
2019-09-29 16:32:26 +00:00
Florin Coras
56f1938ee2 tcp: cc algos handle cwnd on congestion signal
Type: refactor

Change-Id: I15b10a22d0d0b83075a0eef5ef8c09cf76989866
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 8b4114e52f69b9292efb282e49ed4d90699ceeb8)
2019-09-29 16:23:09 +00:00
Florin Coras
0ad8477baf tcp: send rwnd update only if wnd is large enough
Type: feature

Change-Id: I3e97e05a31806afb6b2e84ecf05fb96d285db92e
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 017dc45243bad1b3708d0a9b902d23ca47859344)
2019-09-29 16:22:19 +00:00
Florin Coras
fbe948c813 tcp: force zero window on full rx fifo
Type: feature

Change-Id: I7c5684a9f88e56fd62d83a59c14c4e4a6f096b89
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 182d2198332c2a20891a7cdbceeaaf62b47924e8)
2019-09-29 16:21:06 +00:00
Florin Coras
ea584d137d tcp: validate connections in output
Type: feature

This shouldn't happen unless connections are removed after buffers were
enqueued to tcp-output and before tcp-output runs. For instance, packet
is enqueued to tcp output and cleanup is called for connection.

Change-Id: Ib7dd82ffa6cfb21ff5068aba010e0a3497eeea13
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 78dae00881d26b205ee6721ce8c2bcae76996e79)
2019-09-29 13:15:45 +00:00
Matthew Smith
fe005b4045 ethernet: move dmac filtering to inline function
In eth_input_process_frame(), destination MAC addresses are
compared to the interface hardware address in a loop. Move
this to a separate inline function to facilitate making changes
to the filtering logic more cleanly.

Type: refactor

Change-Id: I0978f01667e78af5214dbbc9ba223f5b84ce6b7e
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
(cherry picked from commit fa20d4c5375c02f61e565b5fc57c490145bc0919)
2019-09-29 13:08:40 +00:00
Florin Coras
bc5f2bcc2c session: avoid bihash list for session tables
Type: fix

Change-Id: I1dbc822061f43fcc25dfa5d1728f5c7575139f45
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 27eeb87f43d9d9dfab3d807f33fc5a4a68cb55d9)
2019-09-29 13:08:00 +00:00
Benoît Ganne
d89329a90f gbp: fix set_mac() in unit tests
Do not use low-level sw_interface_set_mac_address() directly and use
higher-level set_mac() instead, otherwise interface local_mac and
configured mac are out-of-sync

Type: fix
Fixes: 25b049484f

Change-Id: I9366e7afb95ef00e25a94ca3b0e6309871169878
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit a03d25d327ed9db40922cfcf247c3ee793c4754d)
2019-09-29 13:07:26 +00:00
Florin Coras
8d5959f45e tcp: fix rx min/max fifo size parsing
Type: fix

Change-Id: Iff4a13da654dbdf7f08bb6d0743b466a1e6be01b
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 4e1fcf49057b6bd9b4a3a32a8da20a721536c247)
2019-09-29 10:19:18 +00:00
Florin Coras
e7e56def2e tcp: improve mss computation
Type: fix

Use different mss for v4 and v6 packets.

Change-Id: Ifcd322c1fd74f749a42bae671dd6cfed8c32b150
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit cedcf608fefc5bdeff13bb0914fa15266e971d7c)
2019-09-29 10:17:57 +00:00
Guanghua Zhang
1b13beb845 session : make sure session layer is enabled when cli operate the sessions.
Type: fix

show session rules tcp
vpp/src/vnet/session/application_namespace.c:34 (app_namespace_get)
 assertion `! pool_is_free (app_namespace_pool, _e)' fails
Thread 1 "vpp_main" received signal SIGABRT, Aborted.

Signed-off-by: Guanghua Zhang <ghzhang@fiberhome.com>
Change-Id: I3430339a598a92d0a38826471adeb4547b0b7df4
(cherry picked from commit fcd5e12b1c879b27d9ed53c9c5b3ae98b0a04ccf)
2019-09-29 10:17:24 +00:00
Aloys Augustin
c2cfe5d8e5 quic: disable quic plugin by default
Change-Id: I8eb243e80ff043a23cb3efae186164dad6c11ca8
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
(cherry picked from commit baf1c7ccc10134ee38d75532d7bef7d9f3fabfc9)
2019-09-28 20:24:34 +00:00
Damjan Marion
b73d1e91c5 ipsec ip tcp l2: multiarch nodes cannot be declared as static
Credits to ray.kinsella@intel.com who spotted the issue and identified
root cause.

Type: fix

Change-Id: I4afe74c47769484309f6aebca2de56ad32c8041f
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit d770cfc96257f9bd9e0c96c8ebe50e4531dc1bc5)
2019-09-28 20:24:13 +00:00
Klement Sekera
e1204e5049 tests: fix centos detection
Type: fix
Fixes: defde0f870

Change-Id: Ib81e3610bd0fc22901a902dc76692f1951ead2b8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 3a350702ec24d1bde0483da1e946015c2b81e0c4)
2019-09-28 20:23:04 +00:00
Vladimir Kropylev
b462d94038 session: move svm_fifo_clear_deq_ntf to before calling the app callback
Type: fix

in case the app requests another dequeue notification, it should not be cleared

Change-Id: I7e94e8e30ef098f87f5e7f4880af276970ee5b37
Signed-off-by: Vladimir Kropylev <vladimir.kropylev@enea.com>
(cherry picked from commit 5c89fbf28665d13a0052fc88288c1524e0e93918)
2019-09-28 20:21:22 +00:00
Michael Yu
61b1d46db0 devices: fix issue of per_interface_next_index
Per interface, next hop graph node can be customized
with vnet_hw_interface_rx_redirect_to_node function,
but it doesn't work well for af-packet type interface.

In current implementation, with function
af_packet_set_interface_next_node invoked next hop graph
node index can be set to apif->per_interface_next_index,
but it's not set to next0 properly for packet processing
in af_packet_device_input_fn.

Type: fix

Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com>
Change-Id: I8e132ddd1c3c01b6f476de78546d4a9389b3ff87
Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com>
(cherry picked from commit 90b34ed67a516c4391ad353ba431f8419b582d50)
2019-09-28 20:20:42 +00:00
Florin Coras
a2c0637129 tcp: track zero rwnd errors
Type: feature

Distinguish between rcv window errors and errors after we advertised a
zero rcv window, i.e., potential window probes.

Change-Id: I6cb453c7aaae456c0a05a8328cfaa55eaca10bf7
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit a495a3ea146a8484dac9f6b594fb2b044437c7a4)
2019-09-28 20:15:44 +00:00
Simon Zhang
6cf2fde9bb ip: remove unused function parameter
Type: refactor

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: I8674ff5f6f6336b256b7df8187afbb36ddef71fb
(cherry picked from commit e7eba48937c52478d3844745ebb63a4b9ce8d681)
2019-09-27 16:54:02 +00:00
Steven Luong
7f85aecb5c lacp: continuing input packet trace from device driver
lacp gets the packet from the device driver. Let's continue the input
packet trace's trajectory instead of restarting it in lacp-input.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I4d4537e050742a23f74287086d38d39673ebd60f
(cherry picked from commit 977c1dec69bab72dcae0c62578be7fc0892e897b)
2019-09-27 09:38:51 +00:00
Florin Coras
154e4a6cb7 svm: fix fifo hdr freelist allocation
Type: fix

Change-Id: Ia362ad821db1fd506e973e1844cc3ec74703cc17
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 73cad33b56ffc08943e9c0d73ecb14466558baae)
2019-09-27 09:36:42 +00:00
Dave Wallace
997f95e11a hsa: clean up vpp_echo json output
Type: style

Change-Id: I8dbf2197b78690b94a346d6ff564648ab42f8235
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 374f706bff707b8a4bcf62cb1ff0c48d5a65b3bf)
2019-09-27 09:36:17 +00:00
Dave Wallace
244bc6764e quic: enable stable quic tests
Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I041c011ee955acba656b774049b530efe1d50f22
(cherry picked from commit f3a8c0803376bcc05db3b80ed97039d1df601b63)
2019-09-27 09:35:54 +00:00
Dave Barach
b4a243723d dns: update the MAINTAINERS file
This complements the cherrypick done within
commit 46441cb9cde2044c4e3e743d69418cecc897a63a to sync up the file state
with the corresponding commits in master branch.

Type: fix
Ticket: VPP-1752

Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Idc82b1ad59adb0f7c185d27ced57e9a4c25ce62f
(cherry picked from commit 84a563ae4050cc0389dcd438fbe9ea882f2b8404)
2019-09-27 09:32:03 +00:00
Damjan Marion
db418e8e7b avf: reduce default ITR interval
Type: fix
Fixes: b4ff07a

Change-Id: I361ec71944048734b73eec700e32531fb070194e
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 87f0dc7377311a75e906233b398af89d41b72f15)
2019-09-27 07:15:58 +00:00
Lijian.Zhang
c29681395a tap: fix tap interface not working on Arm issue
The VPP code tries to set all userspace memory in the table via IOCTL
to VHOST_SET_MEM_TABLE. But on aarch64, the userspace address range is
larger (48 bits) than that on x86 (47 bits). Below is an segment from
/proc/[vpp]/maps.

fffb41200000-fffb43a00000 rw-s 00000000 00:0e 532232
/anon_hugepage (deleted)

Instead of setting all userspace memory space to vhost-net, will only set
the address space reserved by pmalloc module during initialization.

Type: fix

Change-Id: I91cb35e990869b42094cf2cd0512593733d33677
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Steve Capper <Steve.Capper@arm.com>
(cherry picked from commit ba0da570f264785f6b50eff7829f6653c0924069)
2019-09-27 07:15:38 +00:00
Ole Troan
2160efbaf1 stats: memory leak with per-node-counters on
vlib_node_get_nodes() creates a duplicate node structure which was never freed.

Type: fix
Fixes: 1ddbc0138b
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ib1200854937faaa694b398607d2f0ba65aa81c01
(cherry picked from commit b6fde4a8bae474c6b73d08d223028f42e396d452)
2019-09-26 13:17:19 +00:00
Ole Troan
c395ff1432 vppapitrace: add text output
Add new argument --todump, to mimic the VPP
api trace dump output.

Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ia8c845b321ef9d55dd6e2f388165ca5498406ab6
(cherry picked from commit a2ac36c91749d5377b263c3d99d484ac33854eef)
2019-09-26 09:14:46 +00:00
Dave Barach
a2aa83ca93 misc: improve pcap drop trace output
Append <nodename>: <error-string> to pcap drop traces.

The data displays perfectly fine in [vanilla] wireshark, and makes it
100% obvious which node dropped the packet, and why.

Type: feature
Ticket: VPP-1776

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I9b964b99da4011b93723354db6ef0b128fca20cb
(cherry picked from commit 9382ad9b390e17c8bfd8229342656348d059becb)
2019-09-25 22:19:59 +00:00
Dave Barach
731312df93 misc: unify pcap rx / tx / drop trace
Use a single vnet_pcap_t in vlib_global_main, specifically to support
unified tracing

Update sphinx docs, doxygen tags

Type: refactor
Ticket: VPP-1776

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id15d41a596712968c0714cef1bd2cd5bc9cbdd55
(cherry picked from commit 33909777c63712ca397165cd92e7cc62208eb5c8)
2019-09-25 22:19:59 +00:00
Benoît Ganne
2cf5b1a1ec interface: fix pcap drop trace in case of vlan
Type: fix

Change-Id: If3c4e5c376b51a26143d8922dcacfbda534163bd
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 4e323cbdbd57fcd77db68e295f639288441ef3e3)
2019-09-25 22:19:59 +00:00