Commit Graph

7290 Commits

Author SHA1 Message Date
Florin Coras
8b4114e52f tcp: cc algos handle cwnd on congestion signal
Type: refactor

Change-Id: I15b10a22d0d0b83075a0eef5ef8c09cf76989866
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-04 16:18:01 +00:00
Matthew Smith
fa20d4c537 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>
2019-09-04 15:46:57 +00:00
Damjan Marion
87f0dc7377 avf: reduce default ITR interval
Type: fix
Fixes: b4ff07a

Change-Id: I361ec71944048734b73eec700e32531fb070194e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-09-04 15:27:40 +02:00
Ole Troan
daa4bff164 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>
2019-09-04 13:02:26 +00:00
Florin Coras
27eeb87f43 session: avoid bihash list for session tables
Type: fix

Change-Id: I1dbc822061f43fcc25dfa5d1728f5c7575139f45
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-04 09:57:35 +00:00
Matthew Smith
a6d4e3135b 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: 8d6f34e2b1

Change-Id: Ib673f45917a0dea461987fdc8f0ca318b749fb1a
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-09-03 16:45:33 -05:00
Ole Troan
e5ff5a36dd 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>
2019-09-03 20:04:13 +00:00
Ole Troan
b6fde4a8ba 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
2019-09-03 20:02:36 +00:00
Benoît Ganne
a03d25d327 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>
2019-09-03 19:52:40 +00:00
Dave Barach
bdf9b97774 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
2019-09-03 16:00:08 +00:00
Lijian.Zhang
ba0da570f2 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>
2019-09-03 15:55:40 +00:00
Florin Coras
017dc45243 tcp: send rwnd update only if wnd is large enough
Type: feature

Change-Id: I3e97e05a31806afb6b2e84ecf05fb96d285db92e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-03 15:40:26 +00:00
Aloys Augustin
baf1c7ccc1 quic: disable quic plugin by default
Change-Id: I8eb243e80ff043a23cb3efae186164dad6c11ca8
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-09-02 22:13:58 +00:00
Steven Luong
efa119db39 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
2019-09-02 18:31:07 +00:00
Damjan Marion
d770cfc962 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>
2019-09-02 18:26:43 +00:00
Ping Yu
dd0cc9ec3d tls: some rework based on TLS openssl C API
Type: fix

Change-Id: I5d0ac1fe6a6770ab8b3a9c366d10387718391199
Signed-off-by: Ping Yu <ping.yu@intel.com>
2019-09-02 18:24:41 +00:00
Klement Sekera
be2c2a82d8 tests: run vapi tests by default
Type: fix

Change-Id: I7b190507446fca745fc4bc6abbdeed48f55abdb9
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-09-02 16:23:19 +00:00
Klement Sekera
3a350702ec tests: fix centos detection
Type: fix
Fixes: defde0f870

Change-Id: Ib81e3610bd0fc22901a902dc76692f1951ead2b8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-09-02 15:42:36 +00:00
Steven Luong
ddf625d603 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
2019-09-02 07:27:34 +00:00
Florin Coras
4e1fcf4905 tcp: fix rx min/max fifo size parsing
Type: fix

Change-Id: Iff4a13da654dbdf7f08bb6d0743b466a1e6be01b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-31 09:46:24 -07:00
Vladimir Kropylev
5c89fbf286 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>
2019-08-30 14:23:22 +00:00
Steven Luong
2985e0af6b 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
2019-08-30 13:19:20 +00:00
Michael Yu
90b34ed67a 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>
2019-08-30 13:18:24 +00:00
Florin Coras
182d219833 tcp: force zero window on full rx fifo
Type: feature

Change-Id: I7c5684a9f88e56fd62d83a59c14c4e4a6f096b89
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-30 13:17:43 +00:00
John Lo
03598c4bcc dpdk: enable checksum offload for Intel SRIOV NIC drivers
Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I3ee59106ba45164a4ee3788bf4dcf5bf4c2dc1c2
2019-08-30 13:17:31 +00:00
Florin Coras
cedcf608fe 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>
2019-08-30 13:16:33 +00:00
Florin Coras
22ba3303d8 vcl: initialize ctrl_mq in workers
Type: fix

Change-Id: I1b9c8b0f9292f039b941e18d8aca5d734d5f1e77
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-30 13:16:08 +00:00
Florin Coras
57c88938f8 vcl: allow non-blocking connects
Type: feature

Change-Id: I55349f482ce6781337f747b2f0d2c0a027c3a675
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-30 13:15:42 +00:00
Florin Coras
a495a3ea14 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>
2019-08-30 02:16:19 +00:00
Guanghua Zhang
fcd5e12b1c 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
2019-08-30 00:20:32 +00:00
Benoît Ganne
18fff7477b stats: null-terminate default socket name
Type: fix
Fixes: d991a798ff

Change-Id: I1920a40d7bbb01593676d9d8564158fdba9452bb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-29 18:02:24 +00:00
Steven Luong
977c1dec69 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
2019-08-29 09:54:31 -07:00
Simon Zhang
e7eba48937 ip: remove unused function parameter
Type: refactor

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: I8674ff5f6f6336b256b7df8187afbb36ddef71fb
2019-08-29 12:35:14 +00:00
Yulong Pei
71f36067ca 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>
2019-08-29 12:34:16 +00:00
Florin Coras
73cad33b56 svm: fix fifo hdr freelist allocation
Type: fix

Change-Id: Ia362ad821db1fd506e973e1844cc3ec74703cc17
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-29 00:39:12 +00:00
Jakub Grajciar
f1f5a8a1a5 bier: API cleanup
Use consistent API types.

Type: fix

Change-Id: I416171c729193e64a68e85a3f1f25d03a9a559d1
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-08-28 21:19:59 +00:00
Dave Wallace
374f706bff hsa: clean up vpp_echo json output
Type: style

Change-Id: I8dbf2197b78690b94a346d6ff564648ab42f8235
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-08-28 21:19:39 +00:00
Dave Wallace
f3a8c08033 quic: enable stable quic tests
Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I041c011ee955acba656b774049b530efe1d50f22
2019-08-28 18:10:52 +00:00
Steven Luong
cda35b38d7 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
2019-08-28 15:06:31 +00:00
Andrew Yourtchenko
29ab3446c6 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>
2019-08-28 15:05:06 +00:00
Florin Coras
eef61bb81a session: fix unbind coverity warning
Type:fix

Change-Id: If4fce6bd9b06ed545d72df847afd6a74cdefe042
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-28 15:04:19 +00:00
Nathan Skrzypczak
50059cca89 quic: Fix listener vpp_session_handle
Type: fix

Change-Id: I19f70403e15cd180e9d337fbdad47191de333b34
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-28 15:19:17 +02:00
Benoît Ganne
1ec093fe7a 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: e7e8bf37f1

Change-Id: Ibbf8c82defb12d6d532345eea657d5f300e6a514
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-27 22:04:46 +00:00
Neale Ranns
670027a506 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>
2019-08-27 19:40:40 +00:00
Steven Luong
5ad541eeaa 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
2019-08-27 19:19:23 +00:00
Florin Coras
458089bbad 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>
2019-08-27 18:21:39 +00:00
Ole Troan
7adaa226ea api: revert use string type for strings in memclnt.api
This reverts commit 2959d42feb.
Lacks client side fixes.

Type: fix
Change-Id: Ib94b18e74325cede41ed1733e57896f17a952526
Signed-off-by: Ole Troan <ot@cisco.com>
2019-08-27 18:04:00 +00:00
Neale Ranns
2cdcd0cf40 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>
2019-08-27 13:49:55 +00:00
Klement Sekera
8e9e0eccb2 ip: reassembly: remove unnecessary code
Type: refactor

Change-Id: I30cb324006c3c6ab88d01c044cf80fab3a34f13a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-08-27 13:23:31 +00:00
Ole Troan
2959d42feb 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>
2019-08-27 07:51:55 +00:00