vpp.git
4 years agomemif: API cleanup 27/21427/9
Jakub Grajciar [Wed, 21 Aug 2019 08:51:21 +0000 (10:51 +0200)]
memif: API cleanup

Use consistent API types.

memif_create now enables zero-copy by default.
Add no_zero_copy param to memif_create which
if set, disables zero copy.

Type: refactor

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I11df8b9212c40de179ee71dc9da14039b982ede5
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agolibmemif: prevent crash in case of invalid connection handle 05/21905/2
Jakub Grajciar [Mon, 9 Sep 2019 08:39:08 +0000 (10:39 +0200)]
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>
4 years agovlib: clean up the "pcap dispatch trace" debug CLI 17/21617/5
Dave Barach [Thu, 29 Aug 2019 22:01:30 +0000 (18:01 -0400)]
vlib: clean up the "pcap dispatch trace" debug CLI

Separate debug CLI arg parsing from the underlying action
function. Fixes a number of subtle ordering dependencies, and will
allow us to add a binary API to control the feature at some point in
the future.

Type: refactor
Ticket: VPP-1762

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I1240fe3f61a0acf5ee9faed60d6ad3386e72e569

4 years agoip: fix udp/tcp checksum corner cases 77/21877/3
Dave Barach [Wed, 4 Sep 2019 16:09:32 +0000 (12:09 -0400)]
ip: fix udp/tcp checksum corner cases

When checksumming chained buffers with odd lengths: insert a
NULL byte, or the calculation fails.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I380f7c42897bdb28c8c29aa1c4cdaaa849cc9ecc

4 years agoikev2: fix crash during IKE SA Init exchange 48/21848/2
Filip Tehlar [Wed, 4 Sep 2019 11:34:15 +0000 (11:34 +0000)]
ikev2: fix crash during IKE SA Init exchange

Type: fix

Change-Id: If827fe348fe35d1221d29f91b7e6ea1624d13999
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agobonding: add weight support for active-backup mode 25/21425/14
Steven Luong [Tue, 20 Aug 2019 23:58:00 +0000 (16:58 -0700)]
bonding: add weight support for active-backup mode

Not all interfaces have the same characteristics within the bonding group.
For active-backup mode, we should do our best to select the slave that
performs the best as the primary slave. We already did that by preferring
the slave that is local numa. Sometimes, this is not enough. For example,
when all are local numas, the selection is arbitrary. Some slave interfaces
may have higher speed or better qos than the others. But this is hard to
infer.

One rule does not fit all. So we let the operator to optionally specify the
weight for each slave interface. Our primary slave selection rule is now
1. biggest weight
2. is local numa
3. current primary slave (to avoid churn)
4. lowest sw_if_index (for deterministic behavior)

This selection rule only applies to active-backup mode which only one slave
is used for forwarding traffic until it becomes unreachable. At that time,
the next "best" slave candidate is automatically promoted. The slaves are
sorted according to the preference rule when they are up. So there is no need
to find the next best candidate when the primary slave goes down.

Another good thing about this rule is when the down slave comes back up, it
is selected as the primary slave again unless there is indeed a "better"
slave than this down slave that were added during that period.

To set the weight for the slave interface, do this after the interface is
enslaved

set interface bond <interface-name> weight <value>

Type: feature

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I59ced6d20ce1dec532e667dbe1afd1b4243e04f9

4 years agoquic: fix server opening stream immediately 33/21833/3
Aloys Augustin [Thu, 5 Sep 2019 15:58:21 +0000 (17:58 +0200)]
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>
4 years agotap: revert clean-up when linux will delete the tap interface 46/21846/1
Mohsin Kazmi [Thu, 5 Sep 2019 18:17:30 +0000 (20:17 +0200)]
tap: revert clean-up when linux will delete the tap interface

Type: fix
Ticket: VPP-1766

revert e4ac48e792f4eebfce296cfde844ee73b1abd62f

Change-Id: I03feea4008a47859d570ad8d1d08ff3f30d139ef
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 623a1b7053424b539a51faf866ab839d3da3f45b)

4 years agobuild: fix unsupported CMake comparison operation 41/21741/5
jialv01 [Wed, 4 Sep 2019 03:31:10 +0000 (11:31 +0800)]
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

4 years agodpdk: fix extended stats 74/21774/2
Filip Tehlar [Tue, 3 Sep 2019 14:21:05 +0000 (14:21 +0000)]
dpdk: fix extended stats

Extended stats are not displayed due to incorrect condition.

Type: fix
Change-Id: Ie04664e6274137462dce832bf7ee06204cd77be5
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agobfd: API cleanup 63/21663/4
Jakub Grajciar [Mon, 2 Sep 2019 11:28:52 +0000 (13:28 +0200)]
bfd: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I4b91ebe8aadbec8b95716ed1cde4b0a13eee3a3f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agostats: add /if/<n>/<n>/state for lacp interface state 26/21126/10
Steven Luong [Wed, 7 Aug 2019 19:20:22 +0000 (12:20 -0700)]
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>
4 years agomemif: always enable zero-copy when creating memif using API 58/21758/3
Jakub Grajciar [Wed, 4 Sep 2019 08:32:49 +0000 (10:32 +0200)]
memif: always enable zero-copy when creating memif using API

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I823b6297e1d2bdd438633ec7b877960e6d8423fa

4 years agosession: improve cli 53/21653/15
Florin Coras [Sat, 31 Aug 2019 16:45:13 +0000 (09:45 -0700)]
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>
4 years agotcp: cc algos handle cwnd on congestion signal 32/21732/3
Florin Coras [Tue, 3 Sep 2019 19:37:11 +0000 (12:37 -0700)]
tcp: cc algos handle cwnd on congestion signal

Type: refactor

Change-Id: I15b10a22d0d0b83075a0eef5ef8c09cf76989866
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoethernet: move dmac filtering to inline function 62/21462/8
Matthew Smith [Fri, 12 Jul 2019 16:48:24 +0000 (11:48 -0500)]
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>
4 years agoavf: reduce default ITR interval 88/21788/1
Damjan Marion [Wed, 4 Sep 2019 13:26:55 +0000 (15:26 +0200)]
avf: reduce default ITR interval

Type: fix
Fixes: b4ff07a

Change-Id: I361ec71944048734b73eec700e32531fb070194e
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agoapi: memclnt api use string type. 82/21582/6
Ole Troan [Wed, 28 Aug 2019 12:12:02 +0000 (14:12 +0200)]
api: memclnt api use string type.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Idad79286b7730c8e85202c4b8e675ea50f8bbc48
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agosession: avoid bihash list for session tables 34/21734/2
Florin Coras [Tue, 3 Sep 2019 20:06:11 +0000 (13:06 -0700)]
session: avoid bihash list for session tables

Type: fix

Change-Id: I1dbc822061f43fcc25dfa5d1728f5c7575139f45
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoethernet: fix dmac check avx2 loop condition 40/21740/1
Matthew Smith [Tue, 3 Sep 2019 21:45:33 +0000 (16:45 -0500)]
ethernet: fix dmac check avx2 loop condition

In eth_input_process_frame(), a loop which checks the destination
MAC address of received packets had a different condition for avx2
than it did for the non-avx2 version of the loop. It could result
in one unnecessary execution of the loop body after all packets
had been processed.

Type: fix
Fixes: 8d6f34e2b1cbfde5702e88686631527d5e1e10a0

Change-Id: Ib673f45917a0dea461987fdc8f0ca318b749fb1a
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agoapi: enforce vla is last and fixed string type 92/21492/12
Ole Troan [Fri, 23 Aug 2019 20:55:18 +0000 (22:55 +0200)]
api: enforce vla is last and fixed string type

Enforce that variable length fields are the last element of API messages.

Add a 'fixed' version of string type, since dealing with
multiple variable length strings turned out too painful
for the C language bindings.

The string type is now:
{
  string name[64]; // NUL terminated C-string. Essentially decays to u8 name[64]
  string name[];   // Variable length string with embedded len field (vl_api_string_t)
};

The latter notation could be made available to other types as well.
e.g.
{
  vl_api_address_t addresses[];
}
instead of

{
  u32 n_addr;
  vl_api_address_t addresses[n_addr];
};

Type: fix
Change-Id: I18fa17ef47227633752ab50453e8d20a652a9f9b
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agostats: memory leak with per-node-counters on 31/21731/2
Ole Troan [Tue, 3 Sep 2019 18:58:08 +0000 (20:58 +0200)]
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

4 years agogbp: fix set_mac() in unit tests 21/21721/2
Benoît Ganne [Tue, 3 Sep 2019 15:54:21 +0000 (17:54 +0200)]
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>
4 years agovppinfra: add bihash_init2 20/21720/2
Dave Barach [Tue, 3 Sep 2019 14:57:19 +0000 (10:57 -0400)]
vppinfra: add bihash_init2

Add controls to list / not list a specific bihash in clib_all_bihashes,
to immediately initialize a bihash.

clib_bihash_init2 is now the primary API. It takes a typical args_t
structure. clib_bihash_init becomes a compatibility widget. It
fabricates an args_t and calls init2...

Type: refactor
Ticket: VPP-1758

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib3e1304884997cf7025af20bdc67a7dda290f15b

4 years agotap: fix tap interface not working on Arm issue 69/21469/3
Lijian.Zhang [Wed, 21 Aug 2019 09:51:16 +0000 (17:51 +0800)]
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>
4 years agotcp: send rwnd update only if wnd is large enough 46/21646/4
Florin Coras [Fri, 30 Aug 2019 18:06:35 +0000 (11:06 -0700)]
tcp: send rwnd update only if wnd is large enough

Type: feature

Change-Id: I3e97e05a31806afb6b2e84ecf05fb96d285db92e
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoquic: disable quic plugin by default 76/21676/3
Aloys Augustin [Mon, 2 Sep 2019 14:29:19 +0000 (16:29 +0200)]
quic: disable quic plugin by default

Change-Id: I8eb243e80ff043a23cb3efae186164dad6c11ca8
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
4 years agotap: interface rx counter not increment correct 45/21645/2
Steven Luong [Fri, 30 Aug 2019 17:49:44 +0000 (10:49 -0700)]
tap: interface rx counter not increment correct

vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using
hw_if_index may work as long as there is no subinterface created to cause
hw_if_index and sw_if_index to differ.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I6db042186eeeacf32250f7ef261af8cd6f5ce56e

4 years agoipsec ip tcp l2: multiarch nodes cannot be declared as static 88/21688/2
Damjan Marion [Mon, 2 Sep 2019 17:00:33 +0000 (19:00 +0200)]
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>
4 years agotls: some rework based on TLS openssl C API 53/21453/5
Ping Yu [Thu, 22 Aug 2019 17:43:00 +0000 (13:43 -0400)]
tls: some rework based on TLS openssl C API

Type: fix

Change-Id: I5d0ac1fe6a6770ab8b3a9c366d10387718391199
Signed-off-by: Ping Yu <ping.yu@intel.com>
4 years agotests: run vapi tests by default 79/21679/2
Klement Sekera [Mon, 2 Sep 2019 15:19:41 +0000 (15:19 +0000)]
tests: run vapi tests by default

Type: fix

Change-Id: I7b190507446fca745fc4bc6abbdeed48f55abdb9
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agotests: fix centos detection 75/21675/2
Klement Sekera [Mon, 2 Sep 2019 14:26:26 +0000 (14:26 +0000)]
tests: fix centos detection

Type: fix
Fixes: defde0f870

Change-Id: Ib81e3610bd0fc22901a902dc76692f1951ead2b8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agovmxnet3: interface rx counter not increment correctly 47/21647/2
Steven Luong [Fri, 30 Aug 2019 18:22:13 +0000 (11:22 -0700)]
vmxnet3: interface rx counter not increment correctly

vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using
hw_if_index may work as long as there is no subinterface created to cause
hw_if_index and sw_if_index to differ.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: If50412dc1e84c4f1f5b977b58d0e1aeb5ab8ebe6

4 years agotcp: fix rx min/max fifo size parsing 54/21654/1
Florin Coras [Sat, 31 Aug 2019 16:46:24 +0000 (09:46 -0700)]
tcp: fix rx min/max fifo size parsing

Type: fix

Change-Id: Iff4a13da654dbdf7f08bb6d0743b466a1e6be01b
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agosession: move svm_fifo_clear_deq_ntf to before calling the app callback 34/21634/2
Vladimir Kropylev [Fri, 30 Aug 2019 10:04:06 +0000 (13:04 +0300)]
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>
4 years agovmxnet3: per interface gso support 13/21613/3
Steven Luong [Thu, 29 Aug 2019 19:47:57 +0000 (12:47 -0700)]
vmxnet3: per interface gso support

gso option for vmxnet3 is per VPP process currently. There is no reason why
we cannot provide per interface gso support.

Type: feature

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ife962b52221191050dedd18252b859880ccd7599

4 years agodevices: fix issue of per_interface_next_index 07/21607/8
Michael Yu [Thu, 29 Aug 2019 16:50:16 +0000 (00:50 +0800)]
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>
4 years agotcp: force zero window on full rx fifo 30/20830/3
Florin Coras [Wed, 24 Jul 2019 17:27:20 +0000 (10:27 -0700)]
tcp: force zero window on full rx fifo

Type: feature

Change-Id: I7c5684a9f88e56fd62d83a59c14c4e4a6f096b89
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agodpdk: enable checksum offload for Intel SRIOV NIC drivers 12/21612/3
John Lo [Thu, 29 Aug 2019 19:40:26 +0000 (15:40 -0400)]
dpdk: enable checksum offload for Intel SRIOV NIC drivers

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I3ee59106ba45164a4ee3788bf4dcf5bf4c2dc1c2

4 years agotcp: improve mss computation 72/21572/4
Florin Coras [Tue, 27 Aug 2019 19:15:43 +0000 (12:15 -0700)]
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>
4 years agovcl: initialize ctrl_mq in workers 27/21627/3
Florin Coras [Fri, 30 Aug 2019 05:45:04 +0000 (22:45 -0700)]
vcl: initialize ctrl_mq in workers

Type: fix

Change-Id: I1b9c8b0f9292f039b941e18d8aca5d734d5f1e77
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agovcl: allow non-blocking connects 10/21610/7
Florin Coras [Thu, 29 Aug 2019 19:03:17 +0000 (12:03 -0700)]
vcl: allow non-blocking connects

Type: feature

Change-Id: I55349f482ce6781337f747b2f0d2c0a027c3a675
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agotcp: track zero rwnd errors 24/21624/6
Florin Coras [Fri, 30 Aug 2019 01:33:24 +0000 (18:33 -0700)]
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>
4 years agosession : make sure session layer is enabled when cli operate the sessions. 94/21494/4
Guanghua Zhang [Sat, 24 Aug 2019 02:52:19 +0000 (10:52 +0800)]
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

4 years agostats: null-terminate default socket name 05/21605/2
Benoît Ganne [Thu, 29 Aug 2019 16:16:14 +0000 (18:16 +0200)]
stats: null-terminate default socket name

Type: fix
Fixes: d991a798ff

Change-Id: I1920a40d7bbb01593676d9d8564158fdba9452bb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agolacp: continuing input packet trace from device driver 08/21608/1
Steven Luong [Thu, 29 Aug 2019 16:50:28 +0000 (09:50 -0700)]
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

4 years agoip: remove unused function parameter 96/21496/2
Simon Zhang [Sun, 25 Aug 2019 07:30:45 +0000 (15:30 +0800)]
ip: remove unused function parameter

Type: refactor

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: I8674ff5f6f6336b256b7df8187afbb36ddef71fb

4 years agolb: fix memcpy error issue 70/21470/4
Yulong Pei [Fri, 23 Aug 2019 09:24:13 +0000 (17:24 +0800)]
lb: fix memcpy error issue

vl_api_prefix_t size is 21 byte, ip46_address_t size is 16 byte, only copy
16 byte of vl_api_prefix_t to ip46_address_t is not correct.

Type:fix

Change-Id: I35ede7836a0c878d39388b29b15d91bb08f87a07
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
4 years agosvm: fix fifo hdr freelist allocation 03/21603/3
Florin Coras [Thu, 29 Aug 2019 00:12:32 +0000 (17:12 -0700)]
svm: fix fifo hdr freelist allocation

Type: fix

Change-Id: Ia362ad821db1fd506e973e1844cc3ec74703cc17
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agobier: API cleanup 96/21596/2
Jakub Grajciar [Thu, 4 Apr 2019 08:20:21 +0000 (10:20 +0200)]
bier: API cleanup

Use consistent API types.

Type: fix

Change-Id: I416171c729193e64a68e85a3f1f25d03a9a559d1
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agohsa: clean up vpp_echo json output 95/21595/2
Dave Wallace [Thu, 22 Aug 2019 21:15:54 +0000 (21:15 +0000)]
hsa: clean up vpp_echo json output

Type: style

Change-Id: I8dbf2197b78690b94a346d6ff564648ab42f8235
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agoquic: enable stable quic tests 86/21486/6
Dave Wallace [Fri, 23 Aug 2019 14:37:51 +0000 (14:37 +0000)]
quic: enable stable quic tests

Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I041c011ee955acba656b774049b530efe1d50f22

4 years agolacp: mark is_mp_safe for show and dump binary API 43/21343/5
Steven Luong [Fri, 16 Aug 2019 03:30:23 +0000 (20:30 -0700)]
lacp: mark is_mp_safe for show and dump binary API

show and dump binary APIs for lacp neighbors are running in the same thread
as the create and delete interface. There is no need for barrier lock.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Id584bd7408210fcc23b464ef2084f11f88bca58b

4 years agoacl: perform a sanity check of ACL rules before creating ACL 15/21515/3
Andrew Yourtchenko [Mon, 26 Aug 2019 12:25:42 +0000 (12:25 +0000)]
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>
4 years agosession: fix unbind coverity warning 76/21576/2
Florin Coras [Tue, 27 Aug 2019 22:13:35 +0000 (15:13 -0700)]
session: fix unbind coverity warning

Type:fix

Change-Id: If4fce6bd9b06ed545d72df847afd6a74cdefe042
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoquic: Fix listener vpp_session_handle 86/21586/1
Nathan Skrzypczak [Wed, 28 Aug 2019 13:19:17 +0000 (15:19 +0200)]
quic: Fix listener vpp_session_handle

Type: fix

Change-Id: I19f70403e15cd180e9d337fbdad47191de333b34
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agordma: fix pending packets check on tx 46/21546/2
Benoît Ganne [Tue, 27 Aug 2019 08:58:59 +0000 (10:58 +0200)]
rdma: fix pending packets check on tx

Fix coverity CID 203636: Control flow issues  (NO_EFFECT).
This greater-than-or-equal-to-zero comparison of an unsigned value is
always true. "n_left_from >= 0U".

Type: fix
Fixes: e7e8bf37f100b20acb99957572f1796f648c2853

Change-Id: Ibbf8c82defb12d6d532345eea657d5f300e6a514
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoipsec: Add 'detail' option to 'sh ipsec sa' 66/21566/2
Neale Ranns [Tue, 27 Aug 2019 12:47:17 +0000 (12:47 +0000)]
ipsec: Add 'detail' option to 'sh ipsec sa'

Type: feature

with detail option prints all details for all SAs

Change-Id: Ic3c423c085dfc849cf9c3e18a6f624b82150d961
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agointerface: Remove residual dpdk bonding code 71/21571/2
Steven Luong [Tue, 27 Aug 2019 14:43:27 +0000 (07:43 -0700)]
interface: Remove residual dpdk bonding code

dpdk bonding code was removed in 19.08. However, there are still references
to VNET_SW_INTERFACE_FLAG_BOND_SLAVE which was set by the already removed
code.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I949a7281e6273f2733dd7532cc4a3bb4f3ce30de

4 years agosession: move ctrl messages from bapi to mq 45/21445/26
Florin Coras [Wed, 21 Aug 2019 23:20:44 +0000 (16:20 -0700)]
session: move ctrl messages from bapi to mq

Type:refactor

Moves connect, disconnect, bind, unbind and app detach to message
queue from binary api. Simplifies app/vcl interaction with the session
layer since all session control messages are now handled over the mq.

Add/del segment messages require internal C api changes which affect all
builtin applications. They'll be moved in a different patch and might
not be back portable to 19.08.

Change-Id: I93f6d18e551b024effa75d47f5ff25f23ba8aff5
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoapi: revert use string type for strings in memclnt.api 70/21570/5
Ole Troan [Tue, 27 Aug 2019 13:05:27 +0000 (15:05 +0200)]
api: revert use string type for strings in memclnt.api

This reverts commit 2959d42feb576c0e00c28c4e27658b25f6c783e9.
Lacks client side fixes.

Type: fix
Change-Id: Ib94b18e74325cede41ed1733e57896f17a952526
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoipsec: Fix NULL encryption algorithm 65/21565/2
Neale Ranns [Tue, 27 Aug 2019 12:26:14 +0000 (12:26 +0000)]
ipsec: Fix NULL encryption algorithm

Type: fix
Ticket: VPP-1756

the block-size was set to 0 resulting in incorrect placement of the ESP
footer.

add tests for NULL encrypt + integ.

Change-Id: I8ab3afda8e68f9ff649540cba3f2cac68f12bbba
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoip: reassembly: remove unnecessary code 56/21556/2
Klement Sekera [Tue, 27 Aug 2019 09:20:33 +0000 (09:20 +0000)]
ip: reassembly: remove unnecessary code

Type: refactor

Change-Id: I30cb324006c3c6ab88d01c044cf80fab3a34f13a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agoapi: use string type for strings in memclnt.api 50/21450/6
Ole Troan [Thu, 22 Aug 2019 07:02:59 +0000 (09:02 +0200)]
api: use string type for strings in memclnt.api

Explicitly using string type in API allows for autogenerating tools to print
strings instead of hex-dumping byte strings.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I573962d6b34d5d10aab9dc6a5fdf101c9b12a6a6
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agogso: fix segmentation when gso_size greater than vlib buffer size 66/21466/4
Mohsin Kazmi [Thu, 22 Aug 2019 16:40:28 +0000 (18:40 +0200)]
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>
4 years agomisc: 19.08 new features 38/21538/2
Andrew Yourtchenko [Tue, 20 Aug 2019 16:31:34 +0000 (16:31 +0000)]
misc: 19.08 new features

The full RELEASE.md diff is b610f2022c9f4e10a922e7b57c80ec77cd45d021

Change-Id: Ide6d85d41bdc836a03390a50ab94f6ebbaae0b28
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 1c586de48cc76fc6eac50f5d87003e2a80aa43e7)

4 years agomisc: VPP 19.08 Release Notes 37/21537/1
Andrew Yourtchenko [Sat, 17 Aug 2019 14:57:13 +0000 (14:57 +0000)]
misc: VPP 19.08 Release Notes

Change-Id: I81c7ad50c66b4b8d690e87aad1f3c16af065fc85
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit b610f2022c9f4e10a922e7b57c80ec77cd45d021)

4 years agoip: ip6_preflen_to_mask incorrect result for prefix len > 64 20/21520/2
Andrew Yourtchenko [Mon, 26 Aug 2019 12:58:48 +0000 (12:58 +0000)]
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>
4 years agordma: use rings for buffers management 05/21505/2
Benoît Ganne [Wed, 21 Aug 2019 13:11:43 +0000 (15:11 +0200)]
rdma: use rings for buffers management

Refactor rdma driver for improved performance and prepare for raw
datapath access.

Type: refactor

Change-Id: Iae31872055a6947708ea9f430bd1dc083ea63b5a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agotcp: fix byte tracker samples flush 91/21491/3
Florin Coras [Fri, 23 Aug 2019 17:28:01 +0000 (10:28 -0700)]
tcp: fix byte tracker samples flush

Type: fix

Change-Id: I3b4cb8fc17387693d6ad6cdef004ca99cd56bc23
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agovppapitrace: add text output 78/21478/2
Ole Troan [Fri, 23 Aug 2019 12:19:37 +0000 (14:19 +0200)]
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

4 years agodns: fix trivial multi-thread deadlock 68/21468/1
Dave Barach [Thu, 22 Aug 2019 23:32:49 +0000 (19:32 -0400)]
dns: fix trivial multi-thread deadlock

Add a simple lock trace mechanism

Type: fix
Ticket: VPP-1752

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Idc82b1ad59adb0f7c185d27ced57e9a4c25ce62f

4 years agotests: move plugin tests to src/plugins/*/test 46/21446/3
Dave Wallace [Thu, 22 Aug 2019 00:32:29 +0000 (00:32 +0000)]
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

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I503e6a43528e14981799b735fa65674155713f67
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
4 years agodns: make the dns name resolver a plugin 44/21444/4
Dave Barach [Wed, 21 Aug 2019 23:23:00 +0000 (19:23 -0400)]
dns: make the dns name resolver a plugin

Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I823c2cd307a4613653a2d20f564dda062d4da31b

4 years agoavf: properly set irq queue masks 55/21455/2
Damjan Marion [Thu, 22 Aug 2019 11:36:15 +0000 (13:36 +0200)]
avf: properly set irq queue masks

Type: fix
Fixes: ae91180

Change-Id: I9c55c3fdf41089d337b998e2e28abb23d81525ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agonat: handoff traffic matching for dynamic NAT 29/21429/4
Filip Varga [Mon, 12 Aug 2019 12:24:39 +0000 (14:24 +0200)]
nat: handoff traffic matching for dynamic NAT

Type: feature

Change-Id: I5c5af6f9acb340cc674323305104b8ce23e6d21d
Signed-off-by: Filip Varga <fivarga@cisco.com>
4 years agoip: fix merge issue 54/21454/1
Klement Sekera [Thu, 22 Aug 2019 11:34:33 +0000 (11:34 +0000)]
ip: fix merge issue

Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Idd64b0b3eedb7179f6d316b66cea8160ad577990
Type: fix
Fixes: 630ab5846bceddf8d663e9f488a2dc0378949827
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agovlib: fix null pointer crash on strncmp 42/21442/2
Steven Luong [Wed, 21 Aug 2019 18:35:27 +0000 (11:35 -0700)]
vlib: fix null pointer crash on strncmp

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4b71de0 in __strncmp_sse42 () from /lib64/libc.so.6
(gdb) up
up
    vm=0x7ffff6664d40 <vlib_global_main>, addr=0x7fffb4bec6d0,
    ids=0x7fffb31675f0 <avf_pci_device_ids>, handle=0x7fffb4bec594)
    at /usr/src/debug/vpp-20.01/src/vlib/linux/pci.c:1250
1250   if (strncmp ("vfio-pci", (char *) di->driver_name, 8) == 0)
(gdb) p di
p di
$1 = (vlib_pci_device_info_t *) 0x7fffb6446164
(gdb) p di->driver_name
p di->driver_name
$2 = (u8 *) 0x0
(gdb)

driver_name may be null. strncmp is not forgiving. Change to use C11 safeC
version.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I1777a5966ceee7409d7bde86c30b14dc75534a5a

4 years agohsa: fix http response 41/21441/2
Benoît Ganne [Wed, 21 Aug 2019 18:32:18 +0000 (20:32 +0200)]
hsa: fix http response

http_ok is a const null-terminated string, not a vector.

Type: fix
Fixes: 844a36d1a6

Change-Id: Ide1a23506d9f43cd33c3a4b8ba11658c67fbecc8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosr: fix sr_set_encap_source reply 40/21440/4
Vratko Polak [Wed, 21 Aug 2019 16:40:03 +0000 (18:40 +0200)]
sr: fix sr_set_encap_source reply

Can we get a reply macro that would avoid such copypaste errors?

Type: fix

Change-Id: I753efb1d82fced668c27f2e44b0318bfd31c0a23
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agovcl: fix ldp_set_app_name overflow 39/21439/1
Benoît Ganne [Wed, 21 Aug 2019 16:27:23 +0000 (18:27 +0200)]
vcl: fix ldp_set_app_name overflow

In case of overflow, we null-terminate the parameter ('app_name')
instead of ldp global name ('ldp->app_name').
Moreover, snprintf() always safely null-terminate the destination string
even in case of overflow.

Type: fix
Fixes: 048b1d6ab7

Change-Id: I4d8b0e020a228e982b6699d652b341c5afe92993
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agotcp: add option for always on event logging 13/21413/9
Florin Coras [Tue, 20 Aug 2019 14:09:31 +0000 (07:09 -0700)]
tcp: add option for always on event logging

Type: feature

Add option to always compile in debugging infra. Debug verbosity can be
controlled via configuration updatable via cli. Compile time inclusion
and configuration of event logging verbosity is still available in order
to minimize event logging impact.

Change-Id: I9d946efe9fa4204fdace1adb1d6588c97b5ae758
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoavf: print queue id in packet trace 35/21435/2
Damjan Marion [Wed, 21 Aug 2019 14:33:56 +0000 (16:33 +0200)]
avf: print queue id in packet trace

Type: feature

Change-Id: If3deb26b9ee3b9e677c9dc50789bf81fe6c11dee
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agodns: add basic functional "make test" case 33/21433/2
Dave Barach [Wed, 21 Aug 2019 13:11:41 +0000 (09:11 -0400)]
dns: add basic functional "make test" case

Type: test
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I88e93b510d8d4f7b59f3e630539dc7e0264afa47

4 years agolibmemif: introduce 'memif_per_thread_' namespace 66/20966/12
Jakub Grajciar [Wed, 31 Jul 2019 12:40:52 +0000 (14:40 +0200)]
libmemif: introduce 'memif_per_thread_' namespace

APIs in 'memif_per_thread_' namespace are used to split the global
database into separate databases, to improve multi-thread use cases.

Using 'memif_per_thread_init' client can create separate libmemif
databases (libmemif_main_t). Client will reference these databases
using memif_per_thread_handle_t. Each database requires unique socket.
Created interface will be stored in the same database as the socket
passed in connection arguments.

Example code: extras/libmemif/examples/icmp_responder_3-1/main.c

Type: feature

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I261563ecc34761a76e94f20c20015394398ddfd7
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agodpdk: bump DPDK version to 19.08 06/21406/2
Damjan Marion [Tue, 20 Aug 2019 10:38:08 +0000 (12:38 +0200)]
dpdk: bump DPDK version to 19.08

Type: feature

Change-Id: I16b8cdf0b6af6715a5f01ad84365a8c8a1b76237
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agoavf: fix init when num_rx_queues > num_tx_queues 17/21417/2
Damjan Marion [Tue, 20 Aug 2019 15:51:22 +0000 (17:51 +0200)]
avf: fix init when num_rx_queues > num_tx_queues

Type: fix
Fixes: ae91180

Change-Id: Id93b0f4d23ad7022e341e305bbd93ef2fff5787d
Signed-off-by: Damjan Marion <damarion@cisco.com>
4 years agotcp: default to debug disabled 14/21414/4
Florin Coras [Tue, 20 Aug 2019 14:14:00 +0000 (07:14 -0700)]
tcp: default to debug disabled

Type:fix

Change-Id: Ib5c33f0bdb3a8b1c2585135fcc8c07b151e47df3
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agomisc: missing ntohl for bond_slave's custom dump 22/21422/2
Steven Luong [Tue, 20 Aug 2019 18:39:00 +0000 (11:39 -0700)]
misc: missing ntohl for bond_slave's custom dump

sw_if_index argument is u32 and it needs to be converted to host order
for format in custom dump, a very highly sophisticated stuff.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ie6d49a17e4411df5d567dbb2a7c95993dceda31b

4 years agotls: Add C API for TLS openssl to set engine 71/21371/7
Ping Yu [Mon, 19 Aug 2019 11:01:17 +0000 (07:01 -0400)]
tls: Add C API for TLS openssl to set engine

Type: feature

Parameters of the engine can be set by C API.
After this patch, it is easier to integrate TLS into CSIT test.

Change-Id: I063cabf613aabbfad831727551579328705afb41
Signed-off-by: Ping Yu <ping.yu@intel.com>
4 years agovppapigen: remove support for legacy typedefs 07/21207/6
Paul Vinciguerra [Wed, 7 Aug 2019 04:05:59 +0000 (00:05 -0400)]
vppapigen: remove support for legacy typedefs

vppapigen has remapped legacy to typedefs behind the scenes
for some time now.

- update .api files to use new style typedefs.
- issue error on 'typeonly define' in .api files
- remove unneeded macros redefining vl_noop_handler

Type: refactor

Change-Id: I7a8c4a6dafacee6a131f95cd0e9b03a8c60dea8b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoip: reassembly: send packet out on correct worker 76/20976/5
Klement Sekera [Fri, 19 Jul 2019 09:14:19 +0000 (09:14 +0000)]
ip: reassembly: send packet out on correct worker

Note which worker received fragment with offset zero and use this worker
to send out the reassembled packet.

Type: fix
Change-Id: I1d3cee16788db3b230682525239c0100d51dc380
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agovlib: create unix runtime directory 91/21391/6
Ole Troan [Mon, 19 Aug 2019 12:51:45 +0000 (14:51 +0200)]
vlib: create unix runtime directory

Ensure the runtime directory is created at startup.
Default /run/vpp

Type: fix
Fixes: I53d70939c8125d04a365ac51a6cbf8926dc52adf
Change-Id: I6d70364ea756b86768c4dd1f6a9383238ed275c8
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agotests: support worker threads 75/20975/3
Klement Sekera [Wed, 31 Jul 2019 13:14:16 +0000 (13:14 +0000)]
tests: support worker threads

Add support for specifying the worker thread when adding packet stream.

Type: feature

Change-Id: I8a98b91c211e60cd53e1166f9f51365394ecacfd
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agofix pcap_write function 70/16770/8
Jack Xu [Wed, 27 Mar 2019 15:51:32 +0000 (11:51 -0400)]
fix pcap_write function

when use pcap cli to capture pcakets into two files rx01.pcap && rx02.pcap,
the first time:
1)pcap rx trace on max 100 intfc any file rx01.pcap
2)......the process of capture data to buffer......
3)pcap rx trace off

the second time:
4)pcap rx trace on max 100 intfc any file rx02.pcap
5)......the process of capture data to buffer......
6)pcap rx trace off

the pcap_write function bug in this two lines
pm->n_packets_captured = 0;
if (pm->n_packets_captured >= pm->n_packets_to_capture) referring to calling pcap_close()
will result in that the twice pcap cli both writes the packets
into rx01.pcap, but nothing into rx02.pcap. Beside, the rx02.pcap
file will not be created.

solution: separate the pcap_close() out of pcap_write()

Change-Id: Iedeb46f9cf0a4cb12449fd75a4014f95f3bb3fa8
Signed-off-by: Jack Xu <jack.c.xu@ericsson.com>
4 years agoapi: Cleanup APIs interface.api 61/18361/22
Jakub Grajciar [Mon, 18 Mar 2019 12:17:53 +0000 (13:17 +0100)]
api: Cleanup APIs interface.api

Use of consistent API types for interface.api

Type: fix

Change-Id: I88206d7d0907cffd564031f73c9a996df2e5e21a
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agotcp: forward conn resets through tcp-output 70/21370/6
Florin Coras [Mon, 19 Aug 2019 01:09:28 +0000 (18:09 -0700)]
tcp: forward conn resets through tcp-output

Type: refactor

Change-Id: I5718853d89ebeae9d66be975a803a3674bec5986
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agotests: Revert "Tests: Example duplicate code refactoring." 74/20974/3
Klement Sekera [Wed, 24 Jul 2019 12:40:37 +0000 (12:40 +0000)]
tests: Revert "Tests: Example duplicate code refactoring."

This reverts commit 6955595a577e1b7d316b5b69267bf1d1d951a4ab. The result
is that test filtering for reassembly tests works again.

Type: fix

Change-Id: I4acb094b5b4aa264745986afa0bb0528789807b3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agovppapigen: remove python2 support 06/21206/9
Paul Vinciguerra [Wed, 7 Aug 2019 02:02:45 +0000 (22:02 -0400)]
vppapigen: remove python2 support

vppapigen has been running under python3 for months.
Remove the python2 conditional code.

In case of an error, explicitly log and return non-0.

Type: refactor
Change-Id: I20a73e0f2cb875aab6441959a85a35e88c9f8250
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agodns: handle multiple replies for single requests 98/21398/1
Dave Barach [Mon, 19 Aug 2019 22:15:51 +0000 (18:15 -0400)]
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
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I3175a40eb1fea237048d16b852a430f5ab51eaef