7146 Commits

Author SHA1 Message Date
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
Benoît Ganne
dd1ccb4fd3 rdma: fix double-free in rdma-tx
In case of tx success after multiple retries, the last buffers to be
enqueued will be both enqueued for tx and freed.

Type: fix
Fixes: 211ef2eb24

Change-Id: I57d218cff58b74c1f3d6dc5722624327f0821758
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-06 11:50:43 +00:00
Lijian.Zhang
ae16a801d5 dpdk: remove SFP eeprom dump from 'show hardware-interfaces' and 'show hardware-interfaces verbose'
Type: fix

It's time-consuming to execute 'show hardware-interfaces detail' in CSIT script.
'show hardware-interfaces' dumps SFP eeprom, via a software emulated I2C bus.
Currently 'show hardware-interfaces', 'show hardware-interfaces verbose' and
'show hardware-interfaces detail' give exactly the same output,
and they all will dump SFP eeprom.
Will move the SFP eeprom dump to 'show hardware-interfaces detail' only,
and use “show hardware-interfaces verbose” in CSIT script to save time.

Change-Id: I1a6e5a0ca5fce5b4f0b9a6eb4e9dfd76d45b2487
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-08-06 11:48:37 +00:00
Prashant Maheshwari
3bcf1a940a ethernet: change to mark the CFI bit in the L2 header.
Type: fix
Fixes: 039cbfe2

Signed-off-by: Prashant Maheshwari <pmahesh2@cisco.com>
Change-Id: Idca91c73758824688dd6ce61df994be66753d838
2019-08-06 08:13:33 +00:00
Benoît Ganne
ec75759385 rdma: bump rdma-core to 25.0
Type: make

Change-Id: Ie7596e2976917657b089162c44b3b669e3a2d048
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-05 20:54:44 +00:00
Florin Coras
0a6562c780 svm: fix fifo growth on dequeue with drop
Type:fix

Change-Id: I39c339abf1b51105ef1bcf3d6f0f4f6ded54f32d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-05 10:07:09 -07:00
Florin Coras
0048223baa session: cache align transport base class
Type:refactor

Also remove tx stats. Expectation is that transports will keep track of
them.

Change-Id: I083b328d87d0ad3688b630ddb5ef97827a4dbc2b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-05 16:24:45 +00:00
Florin Coras
470b2a6165 vcl: fix bapi disconnect with socket transport
Type:fix

Change-Id: I7b69c28118f3d7054a20ca48792dfc403a8e2694
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-05 16:22:17 +00:00
Nathan Skrzypczak
7858d6e9e2 docs: Add more quic plugin documentation
Type: docs

Change-Id: I0209769f73a46ddad7c2625ad0f774ee2eef43dd
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-05 16:19:54 +00:00
Nathan Skrzypczak
09db37a5d4 quic: fix memset 0 picotls depends on
Type: fix

Change-Id: Id03cc839662179f8543b0b3f540932e1d87f1cea
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-05 15:15:27 +00:00
John Lo
b1b98f5f5a vxlan: fix VXLANoIP6 checksum offload setup
Fix UDP over IP6 checksum offload setup for VXLAN and VXLAN-GBP.

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: If110467a68234d8eed941869a2a03735f339dc33
2019-08-05 14:12:15 +00:00
John Lo
3bc6bc21fb ip: fix ip6/udp checksum for pkts using buffer chaining
Fix ip6_tcp_udp_icmp_compute_checksum to work properly for packets
with multiple buffers.
Fix ip4_tcp_udp_compute_checksum to exit upon detecting error.

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I673547f4479d72cd60757383343fc562cff10265
2019-08-03 14:36:39 -04:00
Nathan Skrzypczak
46eb1950a1 quic: Improve quic echo connect threading
Type: fix

Change-Id: I64f90139ad70e722f1ecbc4e0c6c1e723ec0f054
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-02 21:51:48 +00:00
Filip Tehlar
be0ffbc70a vlib: fix out of memory issue
'show node foo' causes infinite loop resulting in out of memory.
This patch fixes the issue by breaking the loop on invalid input.

Ticket: VPP-1538
Type: fix
Fixes: 98afc711c5
Change-Id: Icf2be92e277a7f820d4e08bea9ef22ffbbb116f6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-08-02 20:34:31 +00:00
Steven Luong
5dedae7291 devices: add null check after map_guest_mem calls
map_guest_mem may return null. Coverity complains about calls
without checking its return. Simple stuff.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I0626115f4951a88f23d9792f0232fb57c132fbc2
2019-08-02 20:32:14 +00:00
Florin Coras
d2c9e70209 vcl: initialize worker thread index and heap map slot
Type: fix

Change-Id: I7e762b43a2a074dc81cb7b0f6446e315e63ecae5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-02 11:35:07 -07:00
Nathan Skrzypczak
d516ca42d3 vppinfra: Expose function setting __os_thread_index
Type: feature

This is needed when creating pthreads in client applications,
they need a way to set __os_thread_index per thread
that does not conflict with the binary API thread index.

If __os_thread_index is left to 0 in two client pthreads and
they call vl_msg_api_alloc and vec_resize at the same time
it can fail due to them sharing (and push/poping) the same
clib_per_cpu_mheaps slot.

Change-Id: I85d4248a39b641a4d3ad5a1c1bd6e0db5875fab6
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-02 16:49:01 +00:00
Florin Coras
edfe0eea7a tcp: add more connection stats
Type:feature

Change-Id: If02884d0f1f26bfe31ec609ea9611cb27b699868
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-02 16:32:34 +00:00
Dave Barach
c62a83daea ethernet: fix ARP feature arc definition
This patch gets rid of an ugly warning during vpp startup:

"vnet_feature_init:143: WARNING: arp arc: last node is arp-disabled,
but expected error-drop!"

Type: fix
Fixes: 1ff56f00ca015e82ef29955986e503913d1c3b86

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I80914a3c113c090a09bd5a5131e39f036871d92e
2019-08-02 14:14:03 +00:00
Steven Luong
678d64d0b2 vmxnet3: don't bypass ethernet_input
Queue everything to ethernet_input to not break pcap rx trace.
Fix a minor typo in vmxnet3_api.c

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I7df7b3e20b525e3d6f7421c8e213b6541cdd15b6
2019-08-02 13:40:11 +00:00
Florin Coras
23b26e71e7 lb: fix usage of lb_main in test
Type: fix

Change-Id: I9f8a8da31624637c060a9757256589c8f372f192
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-02 11:33:43 +00:00
Neale Ranns
2be3eb6793 ipsec: FIx feature ordering
Type: fix
Fixes: 1404698df397bc4d3007daea41f52ad75ed4486c

Change-Id: Ibb77d95bb5e862cf5d1cb65843c526fd2e225c62
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-02 10:38:49 +00:00
Chenmin Sun
7c615ae9bf virtio: add the display information in virtio cli
Type: fix

1. Add option '[gso-enabled]' in cli 'create interface virtio'
2. Add gso information in virtio_show()

Change-Id: I4eb58f4421325ef54a6a68c8341b3a6d3d68136a
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
2019-08-02 09:21:33 +00:00
Aloys Augustin
2253abad90 quic: fix connection move with multiple workers
Change-Id: Ibd1012c2c1382de442ed294dd9e8a0ec89349fa1
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-08-02 06:31:15 +00:00
John Lo
778ce57318 interface: fix pcap tx/rx trace cli handling
Provide default packet_to_capture value. Display interface name
correctly for "pcap tx/rx trace status".

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I7064d0dbea236a9aff68bba7fbaf2c4a73b16c6f
Signed-off-by: John Lo <loj@cisco.com>
2019-08-01 22:53:14 +00:00
Florin Coras
49568afd20 session: session pool migration notification
Type: feature

Change-Id: Ia9a5b1a6d85c7f3f2e6db583b33b5b20029a1e88
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-01 22:50:09 +00:00
Florin Coras
4f9446444d vppinfra: fix spinlock and rwlock tests
Type: fix

Change-Id: I67b72b5ad03b972198c27bc0d927867f41b0e20b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-01 19:16:37 +00:00
Neale Ranns
3b9374fa57 ipsec: Redo the anit-replay check post decrypt
Type: fix

Change-Id: I1fa8c5326d6f22cfb8dd40e97d8a22d11a716922
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-01 18:04:42 +00:00
Nathan Skrzypczak
55c68c9521 docs: Small fixes and ordering
* deactivtates the TODOs on doxygen (were empty)
* This move punt.md to readthedocs (should be the new
place for dev doc ?)
* Makes Handoff queue demo plugin a child of dev doc
in doxygen

Type: fix

Change-Id: I1f0476a911b35208212af8dd608bc76160efd22a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-01 18:01:57 +00:00
jaszha03
30aaf97a90 vppinfra: refactor clib_rwlock_t to use single condition variable
Previous implementation of clib_rwlock_t used two spinlocks: one
writer lock, and one to guard the counter for the number of readers.
This implementation uses a single condition variable rw_cnt which
has the following properties:

if a writer has the rwlock, rw_cnt = -1
if the rwlock is free, rw_cnt = 0
otherwise, rw_cnt > 0 and rw_cnt = number of readers
rw_cnt will never be less than -1

Benchmarking:
The results below are the cycle counts from test_rwlock.c, configured so
that for 10000 iterations, 6 reader and 6 writer threads on separate cores
are spawned such that each writer thread increments a global counter
10000 times in each iteration. For Taishan, 4 reader and 4 writer
threads are spawned in each test.

x86 Xeon old rwlock: 12.473e8, 11.655e8, 13.201e8, 11.347e8, 13.182e8
x86 Xeon new rwlock: 5.881e8, 5.796e8, 6.536e8, 5.540e8, 5.890e8
Aarch64 ThX2* old rwlock: 9.263e7, 8.933e7, 9.074e7, 8.979e7, 9.378e7
Aarch64 ThX2* new rwlock: 7.221e7, 8.107e7, 7.515e7, 7.672e7, 7.386e7
A72 old rwlock: 3.268e6, 3.200e6, 3.086e6, 3.176e6, 3.170e6
A72 new rwlock: 1.261e6, 1.288e6, 1.251e6, 1.229e6, 1.234e6

*ThunderX2 used additional gcc options "-march=armv8.1-a+crc+crypto+lse"

Type: refactor

Change-Id: I7c347d3037b36205ab532cbcb52a374c846eb275
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-08-01 18:01:33 +00:00
Dave Barach
691a3b7f11 vppinfra: remove unused historical code
"timer.[ch]" used a signal handler to deliver timer callbacks. Without
indulging in a set of sigprocmask(...) system calls, it would be
unsafe to use the mechanism.

Rather than wait for another developer to accidentally open this
particular can of worms, best to remove the code. It's nothing more
than an attractive nuisance at this point.

Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ia3e7b00a389c302b466605dff0c1bf3566b8dbbd
2019-08-01 18:00:54 +00:00
Dave Barach
67d09e05d0 vppinfra: make first bihash add thread-safe
Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ie37ff66faba79e3b8f46c7a704137f9ef2acc773
2019-08-01 16:04:06 +00:00
Nathan Skrzypczak
797848d42a quic: Improve quicly_ctx handling & crypto ctx
Type: fix

Change-Id: I898de67c017c3a45bed123d81041b32b43f749d0
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-01 15:34:24 +00:00
Neale Ranns
1ff56f00ca ethernet: Fix node ordering on ARP feautre ARC
Type: fix
Fixes: fe2fff37

this improves the tracing for dropped ARP packets

Change-Id: Iefd0391e349fc54f1beebda403b2349534b20c48
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-01 13:09:46 +00:00
Filip Varga
67eb4bb477 nat: handoff rewrite & fixes for multi-worker
Type: fix

Change-Id: Ib9164d8f6c681e8900e645306f3a2dc0ac0e40a8
Signed-off-by: Filip Varga <filipvarga89@gmail.com>
2019-08-01 12:53:06 +00:00
jaszha03
fb1ccc7c36 vppinfra: refactor clib_spinlock_t to use compare and swap
Tested performance of a CAS implementation (using __atomic_compare_exchange)
against a TAS implementation (using __atomic_exchange) using test_spinlock.c
and found some performance improvement.

Generated assembly for CAS and TAS implementations show that TAS always
executes with a load-store dependency, but CAS moves a branch condition
between the load and store so that only a load occurs when the lock is free.

Benchmarking:
The results below are the cycle counts from test_spinlock.c, configured so
that for 10000 iterations, 12 threads on separate cores are spawned, each of
which increments a global counter 10000 times in each iteration. For
A72, 8 threads are spawned in each test.

x86 Xeon TAS: 7.333e8, 7.605e8, 7.535e8, 7.485e8, 7.321e8
x86 Xeon CAS: 5.842e8, 5.433e8, 5.389e8, 5.983e8, 5.552e8
Aarch64 ThX2* TAS: 9.852e7, 10.209e7, 9.190e7, 9.600e7, 9.224e7
Aarch64 ThX2* CAS: 7.640e7, 7.486e7, 7.425e7, 7.269e7, 7.534e7
A72 TAS: 7.289e6, 6.963e6, 7.208e6, 6.976e6, 7.200e6
A72 CAS: 1.695e6, 1.608e6, 1.600e6, 1.634e6, 1.746e6

*ThunderX2 used additional gcc options "-march=armv8.1-a+crc+crypto+lse"

Type: refactor

Change-Id: Ic5cd97991804f6b012707fad1a5d1a6edb96cd3d
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-08-01 11:54:17 +00:00