75 Commits

Author SHA1 Message Date
Benoît Ganne
09da69951b pci: fix non NULL-terminated vector used as C string overflow
Type: fix

Change-Id: Iab512ba8c72c9e20aeba2d4265276bcabf095d46
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit e3a24300d08f04146935ec0d3b02e03276d6cc68)
2020-08-18 19:47:21 +00:00
Benoît Ganne
16845adf79 ioam: do not reuse existing vnet symbol
vxlan_gpe_init() is already defined in libvnet. When loading ioam plugin
we end up having 2 different objects using the same symbol.
ASan in GCC-10 started to enforce the One-Definition-Rule and it seems
like good hygiene anyway.

Type: fix

Change-Id: I2ea9af1821bca6482a290742e9a109fc25692f37
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 83ceffcd980494c6146ca67a0fa709b2c37ef13e)
2020-08-18 08:49:56 +00:00
Steven Luong
df76172d8a unittest: Skip string test case for sizeof (src) > sizeof (dst)
coverity complains that the subject test may cause dst buffer overrun
problem and it is right. The problem is when __builtin_constant_p (n)
returns true, memcpy_s_inline skips all the errors checking and does the
copy blindly. Please see the code in memcpy_s_inline.

The fix is to skip the subject test when the aformentioned builtin function
returns true.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I50de91cc0c853a134b3bcf3b0cd8d45d7668b092
(cherry picked from commit 2da39718f560478678caacccd198ee4c0c9673c3)
2020-08-13 08:12:25 +00:00
Neale Ranns
251c1e73e1 ct6: dst,src copy typo
Type: fix

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I266fa5dc637383fd8dac6592c9c266a1b70a73e9
(cherry picked from commit 629e268aa171a8bc03fb93fc995725b78ae64063)
2020-08-12 15:28:04 +00:00
Paul Vinciguerra
e144c1b9d2 vxlan geneve gtpu: fix short help
Type: fix

Change-Id: Id53eb6ed15f270d747b9831a7b585cbafe515dd2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 5fb2278cb8badbbfe727acbdcaeda008a7fd2833)
2020-08-12 11:16:19 +00:00
Chenmin Sun
cb3edd53e8 flow: fix several crash issues
Type: fix

This patch fixes crash issues(marked in brackets) in the below test cases

test flow enable index 0 1/1 -> [crash]
test flow disable index 0 1/1 -> [crash]

test flow add src-ip 192.168.8.8 proto udp redirect-to-queue 8
test flow enable index 0 1/1
test flow disable index 0 1/1 - [crash]

test flow add src-ip 192.168.8.8 proto udp redirect-to-queue 8
test flow enable index 0 1/1
test flow enable index 0 1/2
test flow del index 0 -> [crash]

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I84bc6faa3d93a2cab4c82e8a876a8b1067257b62
(cherry picked from commit be2ad0b4743ed8a3875a5b6039c10c66eb07614c)
2020-08-12 07:43:03 +00:00
Jon Loeliger
fab234754c build: Separate ip and ip6 maintainers
Boldly assign IPv6 to Neale and to me.
Ole said so.  Really!

Change-Id: Iaa30a57230558dcf3ee016a94479cac95bb2d50d
Type: make
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit a6460e46f379315e872819af139ae2c87e8e06f3)
2020-08-11 23:27:20 +00:00
Vratko Polak
7e8a3ece6f papi: harden socket handling
In the previous implementation of socket transport for PAPI,
socket methods .send and .recv_into were used.
But they are not guaranteed to send/receive all the data
for the full message. The receive part contained a loop,
but it handled only the main message, not the header.

This patch replaces .send with .sendall
and uses newly defined _read_fixed method.

Also, removed Paul from maintainers,
as he is not active much, lately.

Type: fix

Change-Id: Iae1a68bf8f9e666856b7c7d62ebfe22defc5dfe1
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 6df2c7954126a316f86908526c3bb4d649f06597)
2020-02-18 13:29:06 +00:00
Damjan Marion
5b2eea6e07 pmalloc: always lock pages
Type: feature

Change-Id: I5bbf37969c9c51e40a013d1fc3ab966838eeb80d
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 801c7016ad90e5f5618f523b3f9284daee0b696c)
2020-02-06 12:29:37 +00:00
Damjan Marion
2e05c214a5 virtio: feature arc have higher priority than redirect
Type: fix
Fixes: 8389fb9

Change-Id: Ie159eb444b28b36a7af86049b80fba4e49be93cb
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 06c194d91b6d2d888ed2b0c5cf0df1cdbc7c53a4)
2020-02-06 12:19:28 +00:00
Mohsin Kazmi
f872cb0dad ping: Move to plugin
Type: refactor

Change-Id: I51d5bf54dfd408aa0c406cbdf0f4be10ef19d10d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 26c7a4b0b6488423688f4a7f3c8aacf0d1b9c742)
2019-10-27 10:06:30 +00:00
Damjan Marion
d3d71352cb classify: remove includes from classifier header file
Type: refactor

Change-Id: I6f0af1c3078edce1c1b29a8b99c4a232d7084d33
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 864d857c6c223be8ec11c588d65e8c5c2e211814)
2019-10-03 08:39:00 +00:00
Dave Barach
b4a243723d dns: update the MAINTAINERS file
This complements the cherrypick done within
commit 46441cb9cde2044c4e3e743d69418cecc897a63a to sync up the file state
with the corresponding commits in master branch.

Type: fix
Ticket: VPP-1752

Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Idc82b1ad59adb0f7c185d27ced57e9a4c25ce62f
(cherry picked from commit 84a563ae4050cc0389dcd438fbe9ea882f2b8404)
2019-09-27 09:32:03 +00:00
Dave Barach
46441cb9cd dns: cherry-pick 21444, 21468 from master
Type: refactor
Ticket: VPP-1752

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ieaec721056531ba0c70538c9bf97769a0e80aefd
2019-08-23 10:54:24 -04:00
Dave Barach
14c7756ad8 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
Ticket: VPP-1749
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I3175a40eb1fea237048d16b852a430f5ab51eaef
(cherry picked from commit e8d2dcb6a619f0884ece2284a286f21b3aa77e5a)
2019-08-20 12:48:52 +00:00
Dave Barach
78cc42d608 http_static: tls support
Type: refactor
Ticket: VPP-1736

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I45745e568cd943293d0015a61f67ec799b6804d8
(cherry picked from commit 6b53fd5163de7d1f452b472ec3ad945f4dbd694c)
2019-08-12 17:34:15 +00:00
Ole Troan
af8075529f api: vppapitrace JSON/API trace converter
Usage: vppapitrace.py [-h] [--debug] [--apidir APIDIR] {convert,replay} ...

optional arguments:
  -h, --help        show this help message and exit
  --debug           enable debug mode
  --apidir APIDIR   Location of JSON API definitions

subcommands:
  valid subcommands

  {convert,replay}  additional help
    convert         Convert API trace to JSON or Python and back
    replay          Replay messages to running VPP instance

To convert an API trace file to JSON:
vppapitrace convert /tmp/api.trace trace.json

To convert an (edited) JSON file back to API trace for replay:
vppapitrace convert trace.json api-edited.trace

To generate a Python file that can be replayed:
vppapitrace convert /tmp/api.trace trace.py
vppapitrace convert trace.json trace.py

Replay it to a running VPP instance:
vppapitrace replay --socket /tmp/api.trace

In VPP that file can be replayed with:
vpp# api trace replay api-edited.trace

This patch also modifies the API binary trace format, to include the
message id to message name table.

Ticket: VPP-1733
Change-Id: Ie6441efb53c1c93c9f778f6ae9c1758bccc8dd87
Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit edfe2c0079a756f5fb1108037c39450e3521c8bd)
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-08-12 12:37:37 +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
Neale Ranns
5281a9029e qos: QoS dump APIs
Type: feature

Change-Id: I514b40026986f3828c8727453456b20a0a45f3af
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-24 14:55:59 +00:00
Vratko Polak
7f37a94bab vapi: add python scripts to vpp-dev package
As requested in https://lists.fd.io/g/vpp-api-dev/message/18
three vapi scrips are packaged, destination to share/vpp/.

Also:
+ Add "vapi" as a separate component to maintainers file.
+ Add also vppapigen/generate_json.py to share/vpp/.
+ Improve CMakeLists.txt indentation.

Type: feature

Change-Id: Ia06715621aa344e8ee759410b293509a54f81fdd
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-24 13:59:16 +00:00
Mohsin Kazmi
1acdbc2fac misc: Add maintainer entry for native virtio driver
Type: feature

Change-Id: Ieda0d8fbd2c1524ddf9fc776bc5c315629e893bf
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-07-24 12:03:13 +00:00
Mohsin Kazmi
0f09a47f10 gso: Fix the l3 packet gso segment size
Type: fix
Ticket: VPP-1721

Change-Id: I7a5d4f1440048ddc9f599ac11d06e5a7df20440e
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-07-22 13:02:28 +00:00
John Lo
b966b96aa4 nsim: cross-connect mode crash at interface output node
Type: fix

Change-Id: If99c1d8a7ec97a726430a927eab0d3b57222af1f
Signed-off-by: John Lo <loj@cisco.com>
2019-07-12 18:04:20 +00:00
Benoît Ganne
bbe6d110a1 syslog: fix syslog structured data formatting
syslog structured data are stored as vectors not null-terminated
C-strings. Use '%v' instead of '%s'.

Type: fix
Fixes: b4515b4be4

Change-Id: Iba224f271c832daca90d4bbccfef45d0f563fe60
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-07-12 01:50:55 +00:00
Dave Barach
e5a7d59778 emacs: update the vat plugin generator
Use the VAT_PLUGIN_REGISTER macro.

Type: refactor

Change-Id: I5ab9f311028c07a37a40cc1328d9724f852783ee
Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-10 18:00:59 +00:00
Nathan Skrzypczak
50f4a41714 udp: UDPC handle open fail
Type: fix

Change-Id: Ib8fb4957f4da9e464e2575c45c8ff3828db89872
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-07-09 16:52:29 +00:00
Neale Ranns
81cfa9cf38 vxlan-gbp: Decap ignores reserved bits
Type: fix

from the draft:
3.  Backward Compatibility

   VXLAN [RFC7348] requires reserved fields to be set to zero on
   transmit and ignored on receive.

Change-Id: I98544907894f1a6eba9595a37c3c88322905630e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-05 17:57:33 +00:00
Neale Ranns
fe2fff37bb ethernet: ARP disabled node
Type: feature

improve the tracing from:

00:00:01:259665: pg-input
  stream pcap3, 42 bytes, 3 sw_if_index
  current data 0, length 42, buffer-pool 0, ref-count 1, trace handle 0x0
  ARP: 02:03:00:00:ff:02 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  02:03:00:00:ff:02/172.16.3.5 -> 00:00:00:00:00:00/172.16.2.1
00:00:01:259690: ethernet-input
  frame: flags 0x1, hw-if-index 3, sw-if-index 3
  ARP: 02:03:00:00:ff:02 -> ff:ff:ff:ff:ff:ff
00:00:01:259702: arp-input
  request, type ethernet/IP4, address size 6/4
  02:03:00:00:ff:02/172.16.3.5 -> 00:00:00:00:00:00/172.16.2.1
00:00:01:259710: error-drop
  rx:pg2
00:00:01:259717: drop
  null-node: blackholed packets

to

00:00:01:283323: pg-input
  stream pcap3, 42 bytes, 3 sw_if_index
  current data 0, length 42, buffer-pool 0, ref-count 1, trace handle 0x0
  ARP: 02:03:00:00:ff:02 -> ff:ff:ff:ff:ff:ff
  request, type ethernet/IP4, address size 6/4
  02:03:00:00:ff:02/172.16.3.5 -> 00:00:00:00:00:00/172.16.2.1
00:00:01:283348: ethernet-input
  frame: flags 0x1, hw-if-index 3, sw-if-index 3
  ARP: 02:03:00:00:ff:02 -> ff:ff:ff:ff:ff:ff
00:00:01:283360: arp-input
  request, type ethernet/IP4, address size 6/4
  02:03:00:00:ff:02/172.16.3.5 -> 00:00:00:00:00:00/172.16.2.1
00:00:01:283369: arp-disabled
  request, type ethernet/IP4, address size 6/4
  02:03:00:00:ff:02/172.16.3.5 -> 00:00:00:00:00:00/172.16.2.1
00:00:01:283374: error-drop
  rx:pg2
00:00:01:283380: drop
  arp-disabled: ARP Disabled on this interface

Change-Id: I49b915b84cf56d6c138dedd8a596c045c150c4fb
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-07-05 17:55:24 +00:00
Florin Coras
3ffe6cadf0 sctp: move to plugins, disabled by default
Removed sctp buffer metadata from vnet/buffer.h, added it to the
plugin. Add registration APIs for plugin-based vlib_buffer_opaque /
opaque2 decoders, used by "pcap dispatch trace ..." for display in the
wireshark dissector.

Type:refactor

Not actively maintained.

Change-Id: Ie4cb6ba66f68b3b3a7d7d2c63c917fdccf994371
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2019-07-05 17:49:39 +00:00
Paul Vinciguerra
1671d3be38 pg: format_pg_input_trace - reorder fields
00:00:00:814640: pg-input
  stream pcap0-sw_if_index-1, 42 bytes, 1 sw_if_index

is changed to:

00:00:00:814640: pg-input
  stream pcap0-sw_if_index-1, 42 bytes, sw_if_index 1

Type: style

Change-Id: I9bb32494c9c1d08bc7588f088ed67a60ed3236dd
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-29 09:12:53 +00:00
Florin Coras
b4ca8b11e4 sctp: add option to enable/disable
Type: feature

By default sctp is disabled to avoid wasting cycles.

Change-Id: I1e2f764c7168b5c15062efbe5895de93dcc2614e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-27 21:30:36 +00:00
Vratko Polak
a37810dcf4 papi: prevent message_table inconsistencies
Socket transport is maintaining message_table to map
message name to index. After disconnect and re-connect,
the VPP may have been restarted with different set of plugins,
so message_table has to be wiped.

+ Edited MAINTAINERS to recognize "papi" as a separate component.

Type: fix
Change-Id: I1f16ad7ee0886e03bbc6a17bcddbfcaa322354e5
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-06-26 19:45:43 +00:00
Neale Ranns
023d23ad89 fib: default flow hash config for each DPO protocol type
Type: fix
Fixes: 59fa121f

Change-Id: I9eb4fe1612734e54932228527c37bf33b705dbdb
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-26 11:46:18 +00:00
Chore
b1edf37bd5 misc: nat is added to MAINTAINERS file.
Type: fix

Change-Id: I3c6a0abad22c86c7125dc10e6d9be3d5af6d4ee3
Signed-off-by: Chore <s3m2e1.6star@gmail.com>
2019-06-26 08:55:25 +00:00
Florin Coras
00dd74cee7 hsa: move vcl test apps to hsa
Type: refactor

Change-Id: I352975585c1091bfc5b85d7f8fe985f9059820a7
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-26 02:15:20 +00:00
Florin Coras
e3b8682d3f hsa: move session-apps to host-stack apps plugin
Type:refactor

Change-Id: I114fea3a54258797e961d8627a99ba2098674d20
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-25 14:25:54 +00:00
Andrew Yourtchenko
9d97d01411 tests: fix the MAINTAINERS file
Undo the change from I8488ab318a596c9b737308829cedfb7e96e57302 to the MAINTAINERS file

Change-Id: Ieea4a59dad127c2f2dcd86a6a0c699c23fb9158d
Type: fix
Fixes: d84661c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-06-24 17:52:25 +00:00
Paul Vinciguerra
496b0dee7f tests: refactor VppDiedError.
- Move Exception into same module as TestCase.
- Move the error reporting logic inside the error.
- Allows testing of the returncode and signal_name for tests to consume.
- Fix the signal reporting code:
	VppDiedError: VPP subprocess died unexpectedly with returncode -6 [unknown].
    displays as:
	VppDiedError: VPP subprocess died unexpectedly with return code: -6 [SIGABRT].

Type: test

Change-Id: I8488ab318a596c9b737308829cedfb7e96e57302
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-24 16:03:09 +00:00
Neale Ranns
dd7736b515 misc: update maintainers to include VOM
Type: feature

Change-Id: I324127934f1a129c23f232940b991fd1455891c8
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-21 08:03:30 -07:00
Mohsin Kazmi
97d54ed43e tap: add support to configure tap interface host MTU size
This patch adds support to configure host mtu size using
api, cli or startup.conf.

Type: feature

Change-Id: I8ab087d82dbe7dedc498825c1a3ea3fcb2cce030
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-20 03:39:31 +00:00
Steven Luong
13d3354880 misc: add bonding, lacp and vmxnet3 to MAINTAINERS
Type: make

Change-Id: I8a28707a14ca6bcaf44b2a26dfc30ef2f2dbe749
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-06-19 08:01:08 +00:00
Paul Vinciguerra
03624bbd6b build: update MAINTAINERS
Type: make

Change-Id: If82324f27163ab4ea270aac909c48a95dd1621ec
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-18 18:49:55 +00:00
Nathan Skrzypczak
376efe5df2 quic: fix handling of stream reset & close
Type: refactor

Change-Id: I4981704e3c886d90d482a1deba42633e92626743
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-18 10:10:03 +00:00
Ole Troan
b63dbc537c stats: add version field to stat segment base header
Add a version in the base header of the stat segment
To make support for multiple reader implementations safer.

Change-Id: I6816e2a51a98c2df1e621e80d4ef0b4ba4e9f47b
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-14 11:52:50 +00:00
Neale Ranns
ff34b916a9 misc: Update MAINTAINERS to include interface common
Type: feature

Change-Id: I72f35444c73c6a7099d34f7d5031cbe82cbdd383
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-14 09:28:29 +00:00
Florin Coras
33035c7830 maintainers: add vcl
Change-Id: I29545cadcf0b764b931d14b0c3ec51d728d29504
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-12 08:57:40 -07:00
Damjan Marion
ee09f2de68 misc: update MAINTAINERS file
Type: make
Change-Id: I082ae7af9a8d10d6caddf401d3fa843844503b26
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-12 16:17:14 +02:00
Dave Barach
11965c7b47 Break out the broom for some cleanup work
Maintain the MAINTAINERS file. Removed src/plugins/*.am listings. Added
a couple of plugins.

Add vlib_process_create (vlib_main_t *vm, char *name,
                         vlib_node_function_t *f, u32 log2_n_stack_bytes);
/** @brief Create a vlib process
 *  @param vm &vlib_global_main
 *  @param f the process node function
 *  @param log2_n_stack_bytes size of the process stack, defaults to 16K
 *  @return newly-create node index
 *  @warning call only on the main thread. Barrier sync required.
 */

This function makes it easy to spin up periodic processes when features
are enabled for the first time. That coding pattern is highly recommended.

Update the emacs-lisp plugin generator to use vlib_process_create,
instead of generating static periodic process nodes.

Change-Id: Icda33e93b9034779d3a3e228cd1110af14b058a5
Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-29 07:51:19 +00:00
Benoît Ganne
a77521290a rdma: update MAINTAINERS and add doc
Change-Id: Ida681d299fd57eba66338444b99d2476bdb3c695
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-05-14 14:13:49 +00:00
Dave Barach
efd0d29353 Update MAINTAINERS
Change-Id: I1b041edb6f20a9f9c867fb243922985398485054
Signed-off-by: Dave Barach <dave@barachs.net>
2019-03-29 08:17:49 -04:00