7088 Commits

Author SHA1 Message Date
Neale Ranns
83832e7ced qos: Store function
Type: feature

store: write a QoS value into the buffer meta-data
record: Extract a QoS value from a packet header and store it.
mark: Make a change to the content of a packet header by writing a stored
      QoS value

Change-Id: I07d1e87dd1ca90d40ac1ae1774fee1b272cab83f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-31 16:17:36 +00:00
Paul Vinciguerra
b504777e7f vppapigen: implement reversible repr's
Type: feature

Change-Id: I92757f041cde399229c42e34515ace0fcd37908b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-31 16:14:23 +00:00
YohanPipereau
093dd7fe5a build: Append build number for cpack packages
add_vpp_packaging maccro was circumventing scripts/version causing:
1. build number not being appended to the package
2. invalid package name format (due to cmake cpack module)

Change-Id: I2b9a985357a3f3bd501be6db6ca638d4430f4bbb
Type: make
Fixes: def35a2352c9a54f748d301ffa47a446d25a83e0
Signed-off-by: YohanPipereau <ypiperea@cisco.com>
2019-07-31 16:02:50 +00:00
Andrew Yourtchenko
e3cb1f94ba pg: clarify the text of error message
Enabling capture on pg with the file already existing
results in a misleading error message. Fix the text.

Change-Id: I1aea49cfeda3b4bfe6ed7b18fd543948a078508a
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-07-31 15:04:09 +00:00
Dave Barach
baba24e136 vlib: fix format_error_trace
Error index calculation is error_code + error_node->error_heap_index.

Type: fix
Fixes: gerrit 20802

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I66cf05a29b3cfd9ef9c5468e399290e862b784af
2019-07-31 14:30:12 +00:00
jaszha03
25ab6cfed6 vppinfra: added performance test for clib_rwlock_t (test_rwlock.c)
Spawns a uniform number of writer and reader threads across a number of
cores where each writer thread increments a global variable a specified
number of times, and the reader threads continually poll the global's
value until the writers complete.

Type: test

Change-Id: I979c3734c6d03139d0802bff1846875d226f6fbb
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-07-31 13:55:12 +00:00
jaszha03
5cdde5c25a vppinfra: refactor test_and_set spinlocks to use clib_spinlock_t
Spinlock performance improved when implemented with compare_and_exchange
instead of test_and_set. All instances of test_and_set locks were refactored
to use clib_spinlock_t when possible. Some locks e.g. ssvm synchronize
between processes rather than threads, so they cannot directly use
clib_spinlock_t.

Type: refactor

Change-Id: Ia16b5d4cd49209b2b57b8df6c94615c28b11bb60
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-07-31 13:53:55 +00:00
jaszha03
9a4e631890 vppinfra: added lock performance test for clib_spinlock_t (test_spinlock.c)
Spawns a uniform number of threads across a number of cores where each
thread increments a global variable a specified number of times.

Type: test

Change-Id: I12b3a37708a199c297d022348d99dbb0e8349a9f
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-07-31 13:47:53 +00:00
Florin Coras
7e5e62bbcb vcl: fix epoll chain validation
Type:fix

Change-Id: I91dfe7e0ae2e632022fbf639ca16c93f570849de
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-31 13:44:34 +00:00
Paul Vinciguerra
a47a5f20a3 api papi: add alias for timestamp(datetime)/timedelta
Now that we have support for f64:
- create explicit types for timestamp(datetime)/timedelta
- update log_details to use timestamp and remove redundant string representation.
  If you need the string representation, in python do str(timestamp).
  If you prefer the raw f64 value, the client can pass in the
  _no_type_conversion option.

Type: feature

Change-Id: I547b5fa7122d2afa12628b7db0192c23babbbae8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-31 13:20:52 +00:00
Paul Vinciguerra
07f87546c2 vppapigen: add endian_string for f64
Type: fix

Change-Id: I35838baea21ead4a3f45d998ff225a513781d7ee
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-31 13:20:18 +00:00
Andrew Yourtchenko
cb265c6948 tests: disable pg capture before enabling it
In a lot of places within the unit tests pg_start() starts
the capture with an already existing capture running
for the same test.

If the pcap file already exists, then it is renamed and there
is no problem.

However, there is a potential for race if the previous
pg_start() has enabled the capture, but the check for
renaming it happened just slightly earlier than the first
packet has arrived.

Then a second call to pg_start() will hit a check that
a file exists, and will cause an error. This is especially
visible when running the tests in parallel due to increased
load.

Solution: disable the capture before enabling it.
This will flush the aready running capture and eliminate the race.

The additional delay that flushing of the pcap creates has exposed
several other race conditions:

NAT tests: Some of the NAT reassembly tests
verify that the entries were added to the reassembly data structures,
but do so by comparing the quantities of entries. With the default
timeout being 2s, some of the entries might timeout,
resulting in a bogus test failure.

Solution: Bump the timeout to 20s for the affected tests.

Punt tests: nr_packets == 3 makes test intermittently fail,
nr_packets > 3 make it reliably fail, and nr_packets = 2 works

Solution: set nr_packets == 2 for the time being

IGMP tests: the leave-group calls get a spurious packet
from the time the new groups were configured

Solution: add 1 second delay before starting to delete the groups

Type: test

Change-Id: I931182a7b2860cf670e030ee7da8038f6e87356d
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-07-31 13:00:35 +00:00
Neale Ranns
00625a64f4 tests: Split IPSec ESP into parameterized tests per engine
Type: feature

Change-Id: Icb1bd3fce768aebf8919c63a104f771ca7fa1d6f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-31 12:55:46 +00:00
Neale Ranns
1404698df3 ip: Ensure reassembly runs before IPSec decrypt.
Type: fix

Change-Id: I01eeedf8d5015b07b9422c65afe78bfe8177c22c
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-31 10:12:14 +00:00
Neale Ranns
513582c96a fib: Add some path-list flags to its key
Type: fix
Ticket: 1729

The flags that are permanently set on a path-list should form part of
its key in the path-list DB. Otherwise, if shared, they will not behave
as expected.

Change-Id: I0aa7c7c5d270c97b08014e4a47ddbdcee2358706
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-31 10:08:40 +00:00
Neale Ranns
5ca2a8ae19 fib: fix calls to unformat_fib_path
Type: fix
Ticket: 1728

Change-Id: I679c2b8c5b0f751c9476db3669ab3f6c26dcdd28
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-31 10:08:05 +00:00
Neale Ranns
6b43ce57cb ipsec: Typo in flag name
Type: fix

Change-Id: I0c9353598d3c9b7ea587ea8a2b6e1faa5454843d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-31 01:04:43 -07:00
Nathan Skrzypczak
874a31ea0b quic: fix cert loading
Type: fix

Change-Id: I29d24c8ec7b8e0613d4fbf5eedc72384326dc284
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-30 16:29:24 +00:00
Aloys Augustin
1c2af06852 quic: cleanup and refactorisation
Change-Id: I031a60ac010b55110f32f0a08e19b1156aeda268
Type: refactor
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-07-30 16:29:05 +00:00
jaszha03
f25e7cfa5c vppinfra: refactor use of CLIB_MEMORY_BARRIER ()
All instances of test_and_set locks used the following sequence
to release the locks:

CLIB_MEMORY_BARRIER ();
p->lock = 0; // p is a generic struct with a TAS lock

Use clib_atomic_release to generate more efficient assembly code.

Type: refactor

Change-Id: Idca3a38b1cf43578108bdd1afe83b6ebc17a4c68
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-07-30 16:22:03 +00:00
Neale Ranns
6b03ab7311 vlib: Fix packet tracing
Type: fix
Fixes: 99536f4

Change-Id: Ica230ec9fa7f6fd36e2754e8b0b9db555460ca55
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-30 15:15:37 +00:00
Mohsin Kazmi
19b697f307 tap: fix segv when host-if-name is not given
Type: fix
Fixes: c30d87e6139c64eceade54972715b402c625763d

Change-Id: I86b606b18ff6a30709b7aff089fd5dd00103bd7f
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-07-30 14:46:11 +00:00
jaszha03
0455c435af vppinfra: conformed spinlocks to use CLIB_PAUSE
Modified test-and-set spin locks to call CLIB_PAUSE () when spinning
for code consistency. Decreases the memory bandwidth consumed.

Type: fix

Change-Id: I1cca4f87f44f23f257c7a35466cd2e7767072f51
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-07-30 11:46:19 +00:00
Dave Barach
d56550c2b6 misc: add vnet/pipeline.h example
To the sample plugin. We should probably suggest that folks use the
pipeline.h coding model more often. It's really easy, and these days
the performance results are similar to quad-single loop coding.

Type: refactor

Change-Id: Ie2caa087972737e6d9c31c4ac79355f3d8ced282
Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-29 22:35:19 +00:00
Florin Coras
2b5fed8696 session: fix vpp to app msg generation
Type:fix

Freeing mq messages in vpp (producer), if enqueueing fails, invalidates
consumer assumption that messages can be freed without a lock.

Change-Id: I748a33b8846597bdad865945d8e899346d482434
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Tal Saiag <tal.saiag@gmail.com>
2019-07-29 20:46:46 +00:00
Florin Coras
1a3d2370b5 vcl: fix config parsing of hex values
Type:fix

Change-Id: I31f35dd86fb6efb04d4a449f7fc834296baaa043
Signed-off-by: Tal Saiag <tal.saiag@gmail.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-29 20:46:32 +00:00
Paul Vinciguerra
bb2e5221a7 api acl: breakout acl_types.api for reuse by others
Type: refactor

Change-Id: I40518ccddcb78e58f7e6a098c27d9ec53e5a1146
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-29 07:19:40 +00:00
Benoît Ganne
99c358d62a fib: add invalid source type and fix debug log
Add the FIB_SOURCE_INVALID fib source type. This allows to spot
uninitialized fib source more easily (0 no longer means special) and we
can use it as placeholder when no source is present.
Use it to fix FIB_ENTRY_DBG() which was accessing the 1st source, even
when no sources were present.

Type: fix
Fixes: 710071bf0e

Change-Id: I980b6a6a07616d4a8d6f2db166a1dd335721c74d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-28 14:24:29 +00:00
Paul Vinciguerra
3cf9e67f59 api: add vl_api_version_t type
Type: feature
Depends-on: https://gerrit.fd.io/r/20484

Change-Id: Ifc8d7e00d7254db40856a088fdd352d9773f71d5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-28 14:22:11 +00:00
Paul Vinciguerra
2648e4474e build: add option to wipe/rebuild papi
Previously, the only option was to wipe/rebuild all the test dependencies.

Type: make

Change-Id: Ia95d6e800f67bef033dcf614dbfa249c3e43159d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-07-28 14:21:05 +00:00
Mohsin Kazmi
22e9cfd760 pg: add GSO support
Type: feature

Change-Id: I72676495a85fbecc946aa266a75234cce70c3a5e
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-07-28 14:20:06 +00:00
Ahmed Abdelsalam
be83704c5b sr: ipv6 segment routing header (srh) update
SRH has passed WG review in IETF and currently an IESG document.
This patch updates the SRH definition to be compliant with IETF.
 - Change "first_segment" to "last_entry"
 - Change "reserved" to "tag"

Change-Id: I1765c968671655c5646f6de478d1f7196abbc040
Type: fix
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
2019-07-28 14:17:52 +00:00
Ahmed Abdelsalam
0ae1d80f9a sr: fix srv6 end.t behavior
Update the sr_localsid code to set the DPO for SRv6 End.T behavior.

Change-Id: I17e102a419eb2b4fdd1de7a672b109e4ff7e1dc2
Type: fix
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
2019-07-28 14:17:44 +00:00
Florin Coras
854e0a214d session: define connection id length
Type:feature

To be used by transports overwriting the connection id.

Change-Id: Ia5dbd9dccc2e3eb62e602514b24882ddc12ff1f2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-27 16:49:57 +00:00
Florin Coras
b0ffbee67b session: separate ctrl, new and old events
Type: feature

Change-Id: I5e030b23943c012d8191ff657165055d33ec87a2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-26 16:18:50 -07:00
Florin Coras
1f42101f27 tcp: count resets sent
Type:feature

Change-Id: Ie1ab4b24af9c654d5e0ed94b7fa96ca195b01c56
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-26 20:54:17 +00:00
Nathan Skrzypczak
559ee0f54c quic: coverity fixes
Type: fix

Change-Id: I93c083ee78168ed2da283fe4873ca022766fe861
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-26 18:27:11 +00:00
Jakub Grajciar
272e2e456d libmemif: fix autoconnect
Type: fix

Change-Id: I426e210c47869904a01712b765db2356439f706f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-07-26 14:51:59 +00:00
Dave Barach
af57799fde docs: add binary api trace replay details
Folks need to know that they MUST carefully control the set of plugins
to avoid feeding messages to the wrong binary API message handlers.

Change-Id: Iefeeda6670aae4627446caee21717b847305c9b5
Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-26 14:46:17 +00:00
Florin Coras
26dd6de91b session tcp: handle rxt and acks as custom events
Type: feature

Control ack generation and retransmissions with session layer scheduler.

Change-Id: Iacdf9f84ab81f44851980aa45a83e75f29be2b7b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-26 14:39:30 +00:00
Neale Ranns
038e1dfbdf dhcp ip: DSCP settings for transmitted DHCP packets
Type: feature

- Define the ip_dscp_t and use in the IP headers
- Add DSCP setting to the DHCP client for use with packet TX

Change-Id: If220dde0017ea78793747d65f53e11daf23a28fa
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-26 13:27:14 +00:00
Neale Ranns
08ac303e43 dpdk: fix vlan stripping
Type: fix
Fixes: ce3e971

Change-Id: I30bbeced2f5ae7613e65546f2b9b41e2fb514208
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-07-26 11:43:52 +00:00
Neale Ranns
99536f4b49 dhcp: send unicast and broadcast packets via the IP adjacency
Type: feature

this means DHCP packets are subject to the IP features configured on the interface
- the unicast packets already were sent throught the adj
- added UT for DHCP client sending a unicast renewal

Change-Id: Id50db0b71822f44bf7cb639a524195cdc9873526
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-26 09:32:56 +00:00
Zhiyong Yang
1f5a6063c1 misc: remove unnecessary cast in classify
Type: style

Change-Id: I7628f7fba8250afe41f115595cca4129e43350d3
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-07-25 22:50:30 -04:00
Dave Wallace
de85e7fca1 misc: 19.04.2 Release Notes
Type: docs

Change-Id: I1ee3909e042e56fd4caf3732762e9a9276aa6db1
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-07-25 18:12:56 +00:00
Benoît Ganne
6ceee457dd build: vppapigen search VPP_INCLUDE_DIR if set
When building out-of-tree plugins, we must search for .api in VPP
installed include directory.

Type: fix

Change-Id: I76b7bace69ff54a385d944313879e2aeb7293648
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-25 18:12:25 +00:00
Benoît Ganne
98438e44c2 build: package .api files in vpp-dev
Type: fix

Change-Id: I035ff638d346109e1b3b5e5a8cdd36d650c45e5e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-25 18:11:45 +00:00
Florin Coras
5f06632fc7 session: add transport deleted state
Type: fix

Distinguish between closed and deleted states to avoid deleting the
session prior to the transport connection.

Change-Id: Ia285ce94b26a70773f8c0ce9d2c73095d3e2a337
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-07-25 17:59:17 +00:00
Dave Barach
6c84fb2ee1 vppinfra: fix coverity warning in mpcap.c
Type: fix
Ticket: VPP-1649

Change-Id: Ief77ec8d5f06bfcc63af6454c4cd9979cf0ab49d
Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-25 15:12:28 +00:00
Benoît Ganne
d39495d0bb build: add missing .api files for packaging
Type: fix

Change-Id: Ic43fb0826907e3f3b42a78bfbd9a807cdbf1e8f9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-25 14:14:03 +02:00