Commit Graph

7290 Commits

Author SHA1 Message Date
Mohsin Kazmi
3f1964d2d2 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>
2019-08-26 19:13:47 +00:00
Andrew Yourtchenko
61b28ba69d misc: 19.08 new features
The full RELEASE.md diff is b610f2022c

Change-Id: Ide6d85d41bdc836a03390a50ab94f6ebbaae0b28
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 1c586de48c)
2019-08-26 17:08:23 +00:00
Andrew Yourtchenko
7cd982d007 misc: VPP 19.08 Release Notes
Change-Id: I81c7ad50c66b4b8d690e87aad1f3c16af065fc85
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit b610f2022c)
2019-08-26 15:17:39 +00:00
Andrew Yourtchenko
59ac9c23c4 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>
2019-08-26 14:26:07 +00:00
Benoît Ganne
e7e8bf37f1 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>
2019-08-26 14:10:36 +00:00
Florin Coras
92f190a802 tcp: fix byte tracker samples flush
Type: fix

Change-Id: I3b4cb8fc17387693d6ad6cdef004ca99cd56bc23
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-23 17:33:09 +00:00
Ole Troan
a2ac36c917 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
2019-08-23 15:10:04 +00:00
Dave Barach
84a563ae40 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
2019-08-22 19:33:34 -04:00
Dave Wallace
a43c93f855 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>
2019-08-22 15:33:59 +00:00
Dave Barach
34af0ccf5c dns: make the dns name resolver a plugin
Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I823c2cd307a4613653a2d20f564dda062d4da31b
2019-08-22 15:05:49 +00:00
Damjan Marion
2ca9a84bd0 avf: properly set irq queue masks
Type: fix
Fixes: ae91180

Change-Id: I9c55c3fdf41089d337b998e2e28abb23d81525ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-08-22 14:33:39 +00:00
Filip Varga
22bb417e91 nat: handoff traffic matching for dynamic NAT
Type: feature

Change-Id: I5c5af6f9acb340cc674323305104b8ce23e6d21d
Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-08-22 14:13:42 +00:00
Klement Sekera
95e091b268 ip: fix merge issue
Signed-off-by: Klement Sekera <ksekera@cisco.com>

Change-Id: Idd64b0b3eedb7179f6d316b66cea8160ad577990
Type: fix
Fixes: 630ab5846b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-08-22 11:35:34 +00:00
Steven Luong
ab4899257a 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
2019-08-22 10:27:34 +00:00
Benoît Ganne
b6834750c0 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>
2019-08-22 10:26:20 +00:00
Vratko Polak
1096b46d9b 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>
2019-08-22 10:24:53 +00:00
Benoît Ganne
747b3d8b0e 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>
2019-08-21 18:30:57 +02:00
Florin Coras
a436a42221 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>
2019-08-21 16:07:12 +00:00
Damjan Marion
c33eddebe8 avf: print queue id in packet trace
Type: feature

Change-Id: If3deb26b9ee3b9e677c9dc50789bf81fe6c11dee
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-08-21 15:45:54 +00:00
Dave Barach
4bf8888019 dns: add basic functional "make test" case
Type: test
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I88e93b510d8d4f7b59f3e630539dc7e0264afa47
2019-08-21 14:51:38 +00:00
Jakub Grajciar
17f2a7bbf2 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>
2019-08-21 14:45:43 +00:00
Damjan Marion
b6103105f9 dpdk: bump DPDK version to 19.08
Type: feature

Change-Id: I16b8cdf0b6af6715a5f01ad84365a8c8a1b76237
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-08-21 14:32:29 +00:00
Damjan Marion
017002ae35 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>
2019-08-21 14:22:40 +00:00
Florin Coras
2d9520eb85 tcp: default to debug disabled
Type:fix

Change-Id: Ib5c33f0bdb3a8b1c2585135fcc8c07b151e47df3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-21 08:25:05 +00:00
Steven Luong
58caa37dca 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
2019-08-21 08:24:40 +00:00
Ping Yu
be4d1aa2c5 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>
2019-08-20 13:36:17 +00:00
Paul Vinciguerra
e717482911 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>
2019-08-20 13:35:21 +00:00
Klement Sekera
630ab5846b 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>
2019-08-20 13:33:30 +00:00
Ole Troan
d991a798ff 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>
2019-08-20 12:31:06 +00:00
Klement Sekera
4ecbf105a4 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>
2019-08-20 12:25:42 +00:00
Jack Xu
9af7e2e87e 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>
2019-08-20 11:07:49 +00:00
Jakub Grajciar
053204ab03 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>
2019-08-20 09:57:10 +00:00
Florin Coras
df36f4963f tcp: forward conn resets through tcp-output
Type: refactor

Change-Id: I5718853d89ebeae9d66be975a803a3674bec5986
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-20 09:36:55 +00:00
Klement Sekera
947a85c779 tests: Revert "Tests: Example duplicate code refactoring."
This reverts commit 6955595a57. The result
is that test filtering for reassembly tests works again.

Type: fix

Change-Id: I4acb094b5b4aa264745986afa0bb0528789807b3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-08-20 09:32:27 +00:00
Paul Vinciguerra
2cd3cc8a60 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>
2019-08-20 09:12:48 +00:00
Dave Barach
e8d2dcb6a6 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
2019-08-19 18:23:35 -04:00
Nathan Skrzypczak
dee4c2e403 hsa: move udp_echo to vpp_echo
Type: refactor

Change-Id: I9b8bc4e54bfae9fa3ed367d4a9676fb09c27fb2a
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-19 20:50:37 +00:00
Nathan Skrzypczak
a8462fbca3 hsa: move tcp_echo to vpp_echo
Type: refactor

Change-Id: Ic23859a1686eff2ae4d08a86b69ff4813498459e
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-19 20:50:24 +00:00
Nathan Skrzypczak
1682b51c41 quic: fix rx_callback refactoring
* check_quic_client_connected might allocate ctx
and invalidate our pointer

Type: fix

Change-Id: I885ca5a1a6db9a7765c9047a7df9cdf66c94f1cb
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-19 17:03:38 +00:00
Paul Vinciguerra
ff47fb6456 vppapigen map: raise ValueError when fieldname is python keyword
When working on the lb api, one of the field names was chosen as 'as'
(application server). Since 'as' is a python keyword, the field was
renamed to _1 in vpp_papi.

This changeset instead fails early with a descriptive message,
hopefully saving others time troubleshooting the issue.

    ValueError: Fieldname 'as' is a python keyword and
    is not accessible via the python API.

Type: feature
Change-Id: Ib048d97de0e392645540092e356cf8989848c947
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-08-19 14:38:12 +00:00
Matthew Smith
c458f5c09a dpdk: fix ipsec coverity warning
Type: fix
Fixes: 5025d40a11

Update the expression for a conditional block which should be executed
when an encrypted packet will be sent via IPv6. Coverity was
complaining that a NULL pointer could be dereferenced. It is unclear
whether that ever would have actually happened, but the updated
expression should quell the warning and should more accurately detect
whether the block for IPv6 should be executed.

Change-Id: I731cad1f982e8f55bd44e6e05e98eff96f1957bb
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-08-19 14:31:21 +00:00
Guanghua Zhang
785daf4f84 vlib: fix vlib_buffer_main_init_numa_node memory leak.
Type: fix

Signed-off-by: Guanghua Zhang <ghzhang@fiberhome.com>
Change-Id: I8252ed2555f5af6db2f12dc7c30e41cc1ec7dde0
2019-08-19 13:41:23 +00:00
Jianlin Lv
416e32cf92 build: fix vpp compilation failure on ThunderX2 and Amp
fix compile issue that caused by enabling "-mtune=thunderx2t99"
flag during compilation, such as
"/opt/vpp-agent/dev/vpp/src/vnet/interface_stats.c:164:1:
internal compiler error: Segmentation fault"

Type: fix

Change-Id: Iaf9f80a6c203a7e5b6a40523f14a62bb37091c92
Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
2019-08-19 10:38:35 +00:00
Nitin Saxena
c9122f9739 vppinfra: Update "show cpu" output for AArch64 chips
- Allow "Microarch model(family)" row to show PASS
revison as either string (like A0, B0) or number (like
1.0, 2.0).
- Fix part number for Marvell CN96XX

Change-Id: Ie01a3960c4e5e481be354dc8bb60f744e5c65737
Signed-off-by: Nitin Saxena <nsaxena@marvell.com>
2019-08-19 10:37:25 +00:00
Zhiyong Yang
a6659214aa ip: leverage existing vlib_buffer_advance
The function ip4_rewrite_inline_with_gso can leverage
the existing vlib_buffer_advance to simplify code.

Type: fix

Change-Id: I25d943dc78aba2f67654385cf3f693eb01e0210e
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-08-19 10:35:31 +00:00
Zhiyong Yang
e16f6a77eb nsh: rewrite nsh_output_inline
Type: style

Change-Id: I0c870eddb427efa26cd5b52daf12b13c3927976a
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-08-19 09:45:33 +00:00
Benoît Ganne
0dcafcc505 rdma: add support for MAC changes
Type: feature

Change-Id: I5803b52d12e56f2ccc1316e89ece6f1c5898810a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-08-19 09:42:32 +00:00
Chenmin Sun
de5ed58fdb dpdk: add TSO support in dpdk plugin.
Type: feature

You can enable tso in starup.conf like this:
dev 0000:86:00.0{
	tso on
}

TSO is disabled by default.

Change-Id: Ifdbaf5322f768c384aa54e532d7bf45e810ca01c
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
2019-08-19 09:41:08 +00:00
Jim Thompson
4d843b9940 dpdk: QAT devices update, add c4xxx and xeon d15xx
Type: feature

Change-Id: I21f8f4563f5545a684b2666f7410847e0f7bc403
Signed-off-by: Jim Thompson <jim@netgate.com>
2019-08-19 09:39:07 +00:00
Steven Luong
a75ad87640 devices: skip checksum calculation if guest supports checksum offload
Set VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD for the interface
to skip checksum calculation if guest supports checksum offload.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ie933c3462394f07580ef7f2bec1d2eb3b075bd0c
2019-08-19 09:38:41 +00:00