History log of /vpp/src/plugins/lb/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
b5a575b0 01-Nov-2019 Paul Vinciguerra <pvinci@vinciconsulting.com>

docs: clean up make docs job

Type: docs

Change-Id: I9b5e5137eb4c1e89f6e8d7a278cd11a0fd496471
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>

c0e9441e 28-Apr-2020 Paul Vinciguerra <pvinci@vinciconsulting.com>

tests: move defaults from defaultmapping to .api files

facilitates use of papi beyond the tests.

Type: improvement

Change-Id: I3d502d9130b81a7fb65ee69bb06fe55802b28a27
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>

a5306890 10-Mar-2020 Dave Barach <dave@barachs.net>

lb: fix coverity warning

Type: fix
Ticket: VPP-1837
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I357eb72d478d8175ab9c7cf502d312ab3112213e

551775ea 17-Feb-2020 Yasuhiro Nakamura <yanakamu@yahoo-corp.jp>

lb: Fix generating illegal key in per-port vip

VIP prefix index becomes always 0 when adding a VIP which is already registered different port, causing LB config crash.
This change assigns the same VIP prefix index to the same VIP.

Ticket: https://jira.fd.io/browse/VPP-1834
Type: fix

Signed-off-by: Yasuhiro Nakamura <yanakamu@yahoo-corp.jp>
Change-Id: Ib63b3e58db9bd85714d68cd1292aadd0c8580da8

db43bb6a 08-Jan-2020 Yulong Pei <yulong.pei@intel.com>

lb: fix that lb_add_del_vip and lb_add_del_as api doesn't work correctly

Currently if user want to set ip4 address to the api, it must convert to ip6
format, e.g. user want to ip4 "90.1.2.1" but must convert to "::5A01:0201",
it is not acceptable, this fix solved the issue.

Ticket: FDIO-753
Type: fix

Change-Id: I2ffa5a3d38400ee176cf601421074f71fc395f03
Signed-off-by: Yulong Pei <yulong.pei@intel.com>

7c9fe920 10-Jan-2020 John DeNisco <jdenisco@cisco.com>

docs: Edit FEATURE.yaml files so they can be published

Type: docs
Signed-off-by: John DeNisco <jdenisco@cisco.com>
Change-Id: I7280e5c5ad10a66c0787a5282291a2ef000bff5f

94501c49 03-Jan-2020 Hongjun Ni <hongjun.ni@intel.com>

lb: add FEATURE file for lb/pppoe/gtpu/vxlan-gpe/pppoe

Type: docs

Change-Id: Ia3949954423eb7691c02e99444767a9f01a14adf
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

3bab8f9c 04-Dec-2019 Neale Ranns <nranns@cisco.com>

fib: Decouple source from priority and behaviour

Type: feature

the fib_source_t enum alone no longer defines the priority and
behaviour, instead each source must be allocated these attributes.
This allows the creation of other sources by the plugins (and
soon over the API).

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I890ee820fbc16079ee417ea1fbc163192806e853

e69f4714 26-Nov-2019 Hongjun Ni <hongjun.ni@intel.com>

lb: lb_add_del_vip and lb_add_del_as doesn't work.

Ticket: FDIO-753
Type: fix

Change-Id: I4a8cf06970b658dfa15768459a3ff76571d6dfff
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

40680c66 20-Sep-2019 Vratko Polak <vrpolak@cisco.com>

lb: refactor ntohl in lb_conf handler

Type: refactor

Change-Id: Ibe8f3c1ed5c04d1800fea9b9a90772816aa38d65
Signed-off-by: Vratko Polak <vrpolak@cisco.com>

ec44e263 16-Oct-2019 snaramre <snaramre@cisco.com>

tests: python3 changes for load balancer test

Type: fix
Change-Id: Id9a328158e7c4106a95928bf8ddceb7b9e73aa25
Signed-off-by: snaramre <snaramre@cisco.com>

ae072403 30-Sep-2019 Ole Troan <ot@cisco.com>

lb: remove api boilerplate

Type: refactor
Change-Id: I5555037386d6f6593ac3328385603a382be1fc2a
Signed-off-by: Ole Troan <ot@cisco.com>

33538a15 09-Sep-2019 Hongjun Ni <hongjun.ni@intel.com>

lb: add APIs for set interface nat4 and nat6

Type: feature

Change-Id: I5656cd798b108dd780381b87f574554442ed7b23
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

6eb009ac 20-Sep-2019 Vratko Polak <vrpolak@cisco.com>

lb: vl_api_lb_conf_t_handler has to ntohl

As requested in review, this is a minimal edit.
Refactor comes as a separate Change.

Type: fix

Change-Id: Ie3bdfc3cfde4bfee56848217133ca5f6bbccaeef
Signed-off-by: Vratko Polak <vrpolak@cisco.com>

75761b93 11-Sep-2019 Ole Troan <ot@cisco.com>

api: split vl_api_prefix into two

One type for address with prefix and one type for prefix.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Icfec51d9b7d5cde1d69fbecdd97498688ab7b295
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>

33a58171 04-Sep-2019 Ole Troan <ot@cisco.com>

api: autogenerate api trace print/endian

In addition to the external vppapitrace tool, VPP itself supports dumping of API trace files.
In two formats, "custom-dump" and "dump". "dump" gives a human friendly list,
and "custom-dump" is meant to give a list of commands that can be fed to VAT.
This patch only deals with "dump".
Prior to this fix, auto-generation was only done for the basic types.
This fix adds support for any type, including lists, and supports pretty-printing
of enums, strings, IP addresses, MAC addresses and so on.

Usage: api trace dump <api-trace-file>

For example

Change-Id: I4e485680e6dcfce7489299ae6cf31d835071ac40

---------- trace 48 -----------
vl_api_sw_interface_set_flags_t:
_vl_msg_id: 75
client_index: 0
context: 10
sw_if_index: 1
flags: IF_STATUS_API_FLAG_ADMIN_UP
---------- trace 49 -----------
vl_api_sw_interface_add_del_address_t:
_vl_msg_id: 88
client_index: 0
context: 11
sw_if_index: 1
is_add: 1
del_all: 0
prefix: 172.16.1.1/24
---------- trace 51 -----------
vl_api_cli_inband_t:
_vl_msg_id: 819
client_index: 0
context: 13
cmd: packet-generator capture pg0 pcap /tmp/vpp-unittest-TestMAP-YhcmDX/pg0_out.pcap disable
---------- trace 58 -----------
vl_api_ip_neighbor_add_del_t:
_vl_msg_id: 199
client_index: 0
context: 20
is_add: 1
neighbor:
sw_if_index: 2
flags: IP_API_NEIGHBOR_FLAG_NONE
mac_address: 0202.0000.ff02
ip_address: fd01:2::2

Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I5556d06008de2762e7c2d35a8b0963ae670b3db1
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>

71f36067 23-Aug-2019 Yulong Pei <yulong.pei@intel.com>

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>

a43c93f8 22-Aug-2019 Dave Wallace <dwallacelf@gmail.com>

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>

e7174829 07-Aug-2019 Paul Vinciguerra <pvinci@vinciconsulting.com>

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>

23b26e71 01-Aug-2019 Florin Coras <fcoras@cisco.com>

lb: fix usage of lb_main in test

Type: fix

Change-Id: I9f8a8da31624637c060a9757256589c8f372f192
Signed-off-by: Florin Coras <fcoras@cisco.com>

3efcd0d7 10-Jun-2019 Hongjun Ni <hongjun.ni@intel.com>

lb: vip and as dump/detail api's

- lb_vip_dump/lb_vip_details - get all vip.
- lb_as_dump/lb_as_details - get all as list per vip.
- adds api unit test.
- adds vpp_lb to test framework.

Ticket:
Type: feature

Change-Id: I24be50d62c5234f3535cc840603ddd9df7eb3f07
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

5cdde5c2 11-Jul-2019 jaszha03 <jason.zhang2@arm.com>

vppinfra: refactor test_and_set spinlocks to use clib_spinlock_t

Spinlock performance improved when implemented with compare_and_exchange
instead of test_and_set. All instances of test_and_set locks were refactored
to use clib_spinlock_t when possible. Some locks e.g. ssvm synchronize
between processes rather than threads, so they cannot directly use
clib_spinlock_t.

Type: refactor

Change-Id: Ia16b5d4cd49209b2b57b8df6c94615c28b11bb60
Signed-off-by: Jason Zhang <jason.zhang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>

a0cb32cb 14-Jul-2019 Paul Vinciguerra <pvinci@vinciconsulting.com>

lb: update api.c to use scaffolding from latest skel

Type: refactor

Change-Id: I01329385684f4a4f477cb046079b554ae3024ded
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>

21a43846 09-Jul-2019 Dave Barach <dave@barachs.net>

vat: unload unused vat plugins

If the corresponding vpp plugin is absent, return a non-zero
clib_error_t * from vat_plugin_register ("xxx plugin not loaded"). The
vat plugin calls dlclose on the vat plugin, and it disappears.

Depending on the plugin configuration, this can reduce the vpp virtual
size by several gigabytes.

Added a VAT_PLUGIN(<plugin-name>) macro to vat_helper_macros, clean up
boilerplate vat_plugin_register() implementations. Fixed a number of
non-standard vat_plugin_register methods.

Type: refactor

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

49ee6844 30-Apr-2019 Benoît Ganne <bganne@cisco.com>

build: add -Wall and -fno-common, fix reported issues

Type: refactor
Change-Id: I8489ccd54411c2aa9355439c5641dc31012c64a2
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>

e56a786b 04-Jun-2019 Hongjun Ni <hongjun.ni@intel.com>

lb: crashed with some specific commit under heavy traffic

- When deleting VIP member with flush, VPP will crash.
- When deleting VIP member without flush, vpp won't crash.
- This crash is almost 100% reproductive.

Ticket: VPP-1680
Type: fix
Change-Id: Ia4e8f9e0f987176c7f6ec52c92e66563f313b0c3
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

1d1985de 23-Apr-2019 Dave Wallace <dwallacelf@gmail.com>

plugins: clean up plugin descriptions

- Make plugin descriptions more consistent
so the output of "show plugin" can be
used in the wiki.

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

f7f13347 19-Mar-2019 Paul Vinciguerra <pvinci@vinciconsulting.com>

tests: update test_lb.py to use api call lb_conf.

Change-Id: I96a1d4b2b3ae22cf164c0acd6db9b323cd70f51a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>

313f1b9e 18-Feb-2019 Hongjun Ni <hongjun.ni@intel.com>

Add VAT support for LB

Change-Id: I61d8c35f48a059968909fc8523bd313fc4799389
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

628aad38 21-Jan-2019 Hongjun Ni <hongjun.ni@intel.com>

Fix LB lookup table failed issue

Change-Id: Icd21f456089c72c91a8328f963bf47a8c7725195
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

d9818dd6 14-Dec-2018 David Johnson <davijoh3@cisco.com>

Fixes for buliding for 32bit targets:
* u32/u64/uword mismatches
* pointer-to-int fixes
* printf formatting issues
* issues with incorrect "ULL" and related suffixes
* structure alignment and padding issues

Change-Id: I70b989007758755fe8211c074f651150680f60b4
Signed-off-by: David Johnson <davijoh3@cisco.com>

b7b92993 17-Oct-2018 Dave Barach <dave@barachs.net>

c11 safe string handling support

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

2f6d7bb9 03-Oct-2018 Sirshak Das <sirshak.das@arm.com>

vppinfra: add atomic macros for __sync builtins

This is first part of addition of atomic macros with only macros for
__sync builtins.

- Based on earlier patch by Damjan (https://gerrit.fd.io/r/#/c/10729/)
Additionally
- clib_atomic_release macro added and used in the absence
of any memory barrier.
- clib_atomic_bool_cmp_and_swap added

Change-Id: Ie4e48c1e184a652018d1d0d87c4be80ddd180a3b
Original-patch-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>

819d5fdb 02-Oct-2018 Dave Barach <dave@barachs.net>

VPP-1440: clean up coverity warnings

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

6a4375e0 18-Sep-2018 Hongjun Ni <hongjun.ni@intel.com>

LB: fix flush flow table issue

Change-Id: Ib0a06ab71aed42eb5bb2ab2edf4844b2167e0610
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

35015532 12-Sep-2018 Pierre Pfister <ppfister@cisco.com>

Fix LB memory leak and remove useless code

Vector sort_arr was actually never freed.

This change also removes some nearby code which
happens to be totally useless.

Change-Id: I2f265c1b4770cbcd75a2fb69ea54e46e1b54245a
Signed-off-by: Pierre Pfister <ppfister@cisco.com>

49ca2601 22-Aug-2018 Hongjun Ni <hongjun.ni@intel.com>

Add flush flag on del as command

This patch depends on https://gerrit.fd.io/r/#/c/13260

Change-Id: If94968342935ebd24cf4ebed238e6a27d94959b7
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

004869d0 04-Sep-2018 Naoyuki Mori <naoyuki.mori@intel.com>

Fixed showing negative count in stats show CLI

Some counters (bytes, pkts) are formatted as signed instead of unsigned
in "show hardware-interfaces" and "show lb".
These stats counters are declared as u64.

Change-Id: Id1b588188bff4e36402beb8d07f779e9a5193956
Signed-off-by: Naoyuki Mori <naoyuki.mori@intel.com>

219cc90c 28-Jun-2018 Hongjun Ni <hongjun.ni@intel.com>

Support lb on both vip and per-port-vip case

Previously, a service is specified by vip.
This patch extend that a service is specified
by both vip and per-port-vip cases.

Change-Id: Icbfd1f972c6bafde7d85c6abb498576bd9ba250d
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

f8520159 27-Aug-2018 Mohsin Kazmi <sykazmi@cisco.com>

cmake: Fix plugins .h includes

Change-Id: I90600d000afb02e8969f3c01bcf9e4b5c10a7d39
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>

c0ccefdd 25-Aug-2018 Damjan Marion <damarion@cisco.com>

cmake: handle api_test_plugins in add_vpp_plugin macro

Change-Id: I76a1711af0a920cce66e6dfb07d019ba505d55b7
Signed-off-by: Damjan Marion <damarion@cisco.com>

74449b8b 25-Aug-2018 Damjan Marion <damarion@cisco.com>

cmake: improve add_vpp_plugin macro

Change-Id: Iffd5c45ab242a919592a1f686f7f880936b68a1a
Signed-off-by: Damjan Marion <damarion@cisco.com>

612dd6a9 29-Jul-2018 Damjan Marion <damarion@cisco.com>

CMake as an alternative to autotools (experimental)

Change-Id: Ibc59323e849810531dd0963e85493efad3b86857
Signed-off-by: Damjan Marion <damarion@cisco.com>

54d0ac39 17-Jul-2018 Hongjun Ni <hongjun.ni@intel.com>

VPP crash when run "lb set interface nat4 in <intc>" VPP-1343

Change-Id: I23be9c29227e7dd1bb11b5b7fa910bb61c2be6c9
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
(cherry picked from commit b4b2488202ff4282cc4a7bd779cc33934286c5cd)

067cd622 10-Jul-2018 Damjan Marion <damarion@cisco.com>

avoid using thread local storage for thread index

It is cheaper to get thread index from vlib_main_t if available...

Change-Id: I4582e160d06d9d7fccdc54271912f0635da79b50
Signed-off-by: Damjan Marion <damarion@cisco.com>

6fb0d9b2 07-Jun-2018 Hongjun Ni <hongjun.ni@intel.com>

L3DSR fix ip checksum issue and add test

Change-Id: Iedebbac71d3e694b915d6a126c80ecc3b5473a4a
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

8a4a8c45 11-Jun-2018 Sirshak Das <sirshak.das@arm.com>

Fix clang compilation on aarch64: extraneous parentheses

Fixes clang error: equality comparison with extraneous parentheses
Changing all the #defines to inlines.

Change-Id: I30a931679ac3325b23b249b1ae28c7c8cf54b012
Signed-off-by: Sirshak Das<sirshak.das@arm.com>

bedc1ca8 07-Jun-2018 Hongjun Ni <hongjun.ni@intel.com>

LB: reply message id and table length are wrong.

Change-Id: Iea2c661cb3e0728bb2d10b06791ed84fed00f6a7
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

439a122f 01-Jun-2018 Andrey "Zed" Zaikin <zed.0xff@gmail.com>

lb api: correct byte order of new_flows_table_length argument

Change-Id: I3ac348a8cb1a515dfe1839eaa084c87719d282e1
Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>

ff5aad76 25-May-2018 Andrey "Zed" Zaikin <zed.0xff@gmail.com>

add missing lb_put_writer_lock() to lb_vip_add() invalid args cases

Change-Id: I9343672c5765a5a4cb56c99fa5de176ddcac62c7
Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>

0d88301a 11-May-2018 Steven <sluong@cisco.com>

bond: performance harvesting

- hash is great. But it is a bit too slow for the DP. Use direct array indexing
to quickly retrieve the slave interface.
- the algorithm used by flow hash is great. But it is a bit too slow for the DP.
Use l2_hash_hash() extracted from lb_hash.h which ECMP is using. It makes use
of intrinsic crc32 instruction set.
- shortcut modulo arithmetic when the operand is 2**x (where x up to 4) to
avoid division instruction.
- special case for link count == 1 in bond_tx_fn()
- use clib_mem_unaligned to access data for the packet to avoid alignment error
- Fix some typos for packet tracing.

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

d92a0b55 06-Feb-2018 Hongjun Ni <hongjun.ni@intel.com>

Rework kube-proxy into LB plugin

Add support of NAT66

Change-Id: Ie6aa79078a3835f989829b9a597c448dfd2f9ea3
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

756cd944 06-Apr-2018 Neale Ranns <nranns@cisco.com>

Fixes for 'make UNATTENDED=yes CC=clang CXX=clang verify'

Change-Id: I994649761fe2e66e12ae0e49a84fb1d0a966ddfb
Signed-off-by: Neale Ranns <nranns@cisco.com>

4707f225 05-Mar-2018 Yusuke Tatsumi <ytatsumi@yahoo-corp.jp>

LB plugin: Fix Layer-4 checksum error in L3DSR.

Though dst-IP address would be change in LB plugin with L3DSR method,
layer-4 checksum would not be recomputed after this change.

Related changes:
- L3DSR: https://gerrit.fd.io/r/#/c/10203/

Change-Id: I98de7b8d80186ac77608a68050208c08d90b7c3b
Signed-off-by: Yusuke Tatsumi <ytatsumi@yahoo-corp.jp>

647f609a 23-Jan-2018 Hongjun Ni <hongjun.ni@intel.com>

Add L3DSR feature in LB plugin

L3DSR is used to overcome Layer 2 limitations
of Direct Server Return Load Balancing.
It maps VIP to DSCP bits, and reuse TOS bits to transfer it
to server, and then server will get VIP from DSCP-to-VIP mapping.
Please refer to https://www.nanog.org/meetings/nanog51/presentations/Monday/NANOG51.Talk45.nanog51-Schaumann.pdf

Change-Id: I403ffeadfb04ed0265086eb2dc41f2e17f8f34cb
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

9d420871 12-Oct-2017 Ole Troan <ot@cisco.com>

VPPAPIGEN: vppapigen replacement in Python PLY.

This is a version of the VPP API generator in Python PLY. It supports
the existing language, and has a plugin architecture for generators.
Currently C and JSON are supported.

Changes:
- vl_api_version to option version = "major.minor.patch"
- enum support
- Added error checking and reporting
- import support (removed the C pre-processor)
- services (tying request/reply together)

Version:
option version = "1.0.0";

Enum:
enum colours {
RED,
BLUE = 50,
};
define foo {
vl_api_colours_t colours;
};

Services:
service {
rpc foo returns foo_reply;
rpc foo_dump returns stream foo_details;
rpc want_stats returns want_stats_reply
events ip4_counters, ip6_counters;
};

Future planned features:
- unions
- bool, text
- array support (including length)
- proto3 output plugin
- Refactor C/C++ generator as a plugin
- Refactor Java generator as a plugin

Change-Id: Ifa289966c790e1b1a8e2938a91e69331e3a58bdf
Signed-off-by: Ole Troan <ot@cisco.com>

8e66b9bf 14-Dec-2017 Gabriel Ganne <gabriel.ganne@enea.com>

Use crc32 wrapper (VPP-1086)

This allows arm platforms to also take advantage of crc32 hardware
acceleration.

* add a wrapper for crc32_u64. It's the only one really used. Using it
instead of a call to clib_crc32c() eases building symmetrical hash
functions.
* replace #ifdef on SSE4 by a test on clib_crc32c_uses_intrinsics.
Note: keep the test on i386
* fix typo in lb test log

Change-Id: I03a0897b70f6c1717e6901d93cf0fe024d5facb5
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

bf4be573 13-Nov-2017 Hongjun Ni <hongjun.ni@intel.com>

Restructure some files in LB to src/vnet to reuse

Change-Id: Ic8b193e93ce18ca82b294816aa7ee0ef31d64bc2
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

b3d1b203 30-Oct-2017 Gabriel Ganne <gabriel.ganne@enea.com>

lb plugin tests - wipe flowtable after each unit test

Add new cli api: "test lb flowtable flush" which flushes everything.
Call this new cli function after the end of each lb unit test.

Change-Id: I71d04a7bfba398f7d4dd9cc3ed24bba786943663
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

f90813d6 11-Oct-2017 Gabriel Ganne <gabriel.ganne@enea.com>

lb plugin - fix format() type mismatches

* (vip - lbm->vips) is u64; change format from [%u] to [%lu]
* vip->plen is u8, but format looks for u32; add exlicit cast
(this cast was done implicitely)

On ARM platforms, these prevent a loop in the second call to
format_white_space() which would get an invalid (huge) indent value;
the result *looked like* an infinite loop.

Change-Id: I675ef2f98e4ba3d9e8aef12022d38b1d22981da8
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>

0d056e5e 28-Sep-2017 Dave Barach <dave@barachs.net>

vppapigen: support per-file (major,minor,patch) version stamps

Add one of these statements to foo.api:

vl_api_version 1.2.3

to generate a version tuple stanza in foo.api.h:

/****** Version tuple *****/

vl_api_version_tuple(foo, 1, 2, 3)

Change-Id: Ic514439e4677999daa8463a94f948f76b132ff15
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>

d3c008d1 02-Oct-2017 Christophe Fontaine <christophe.fontaine@enea.com>

[aarch64] Fixes CLI crashes on dpaa2 platform.

- always use 'va_args' as pointer in all format_* functions
- u32 for all 'indent' params as it's declaration was inconsistent

Change-Id: Ic5799309a6b104c9b50fec309cba789c8da99e79
Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>

59b2565c 10-Sep-2017 Dave Barach <dave@barachs.net>

Repair vlib API socket server

- Teach vpp_api_test to send/receive API messages over sockets
- Add memfd-based shared memory
- Add api messages to create memfd-based shared memory segments
- vpp_api_test supports both socket and shared memory segment connections
- vpp_api_test pivot from socket to shared memory API messaging
- add socket client support to libvlibclient.so
- dead client reaper sends ping messages, container-friendly
- dead client reaper falls back to kill (<pid>, 0) live checking
if e.g. a python app goes silent for tens of seconds
- handle ping messages in python client support code
- teach show api ring about pairwise shared-memory segments
- fix ip probing of already resolved destinations (VPP-998)

We'll need this work to implement proper host-stack client isolation

Change-Id: Ic23b65f75c854d0393d9a2e9d6b122a9551be769
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>

c4a51546 08-Sep-2017 flyingeagle23 <wang.hui56@zte.com.cn>

lb_vip_command_fn param redundancy when unformat ip address(VPP-977)

Change-Id: I92de5b9ed42cda6c0438b8dc71892d322b642a70
Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>

755e41e4 25-Jul-2017 Hongjun Ni <hongjun.ni@intel.com>

Fix IP fragment-id and offset issue in LB-GRE4

Change-Id: Ic1c440b2594c3ec4cdc75730069f16432cdb9587
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>

0f68c79a 26-Apr-2017 Damjan Marion <damarion@cisco.com>

Add crc32c inline function, allows compilation on 32-bit systems

32-bit code still can use crc32c instructions, but it operates
on 32 registers

Change-Id: I9bb6b0b59635d6ea6a753584676ebcf59c8f6584
Signed-off-by: Damjan Marion <damarion@cisco.com>

11b8dbf7 24-Apr-2017 Dave Barach <dave@barachs.net>

"autoreply" flag: autogenerate standard xxx_reply_t messages

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

a0558307 13-Apr-2017 Neale Ranns <nranns@cisco.com>

Remove unsed parameter from fib_table_entry_special_add() (only used in FIB tests). The DPO was incorrectly initialised with FIB_PROTO_MAX

Change-Id: I962df9e162e4dfb6837a5ce79ea795d5ff2d7315
Signed-off-by: Neale Ranns <nranns@cisco.com>

586afd76 05-Apr-2017 Damjan Marion <damarion@cisco.com>

Use thread local storage for thread index

This patch deprecates stack-based thread identification,
Also removes requirement that thread stacks are adjacent.

Finally, possibly annoying for some folks, it renames
all occurences of cpu_index and cpu_number with thread
index. Using word "cpu" is misleading here as thread can
be migrated ti different CPU, and also it is not related
to linux cpu index.

Change-Id: I68cdaf661e701d2336fc953dcb9978d10a70f7c1
Signed-off-by: Damjan Marion <damarion@cisco.com>

1bfb0dda 22-Mar-2017 Damjan Marion <damarion@cisco.com>

vlib: add description field in plugin registration

Change-Id: I88b322a5d602f3d6d3310e971479180a89430e0e
Signed-off-by: Damjan Marion <damarion@cisco.com>

b614d083 16-Mar-2017 Eyal Bari <ebari@cisco.com>

API:replaced all REPLY_MACRO's with api_helper_macros.h

Change-Id: I08ab1fd0abdd1db4aff11a38c9c0134b01368e11
Signed-off-by: Eyal Bari <ebari@cisco.com>

a9a20e7f 15-Feb-2017 Billy McFall <bmcfall@redhat.com>

VPP-635: CLI Memory leak with invalid parameter

In the CLI parsing, below is a common pattern:
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;

while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "x"))
x = 1;
:
else
return clib_error_return (0, "unknown input `%U'",
format_unformat_error, line_input);
}
unformat_free (line_input);

The 'else' returns if an unknown string is encountered. There a memory
leak because the 'unformat_free(line_input)' is not called. There is a
large number of instances of this pattern.

Replaced the previous pattern with:
/* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
return 0;

while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "x"))
x = 1;
:
else
{
error = clib_error_return (0, "unknown input `%U'",
format_unformat_error, line_input);
goto done:
}
}

/* ...Remaining code... */

done:
unformat_free (line_input);
return error;
}

In multiple files, 'unformat_free (line_input);' was never called, so
there was a memory leak whether an invalid string was entered or not.

Also, there were multiple instance where:
error = clib_error_return (0, "unknown input `%U'",
format_unformat_error, line_input);
used 'input' as the last parameter instead of 'line_input'. The result
is that output did not contain the substring in error, instead just an
empty string. Fixed all of those as well.

There are a lot of file, and very mind numbing work, so tried to keep
it to a pattern to avoid mistakes.

Change-Id: I8902f0c32a47dd7fb3bb3471a89818571702f1d2
Signed-off-by: Billy McFall <bmcfall@redhat.com>
Signed-off-by: Dave Barach <dave@barachs.net>

3b46cba8 23-Jan-2017 Damjan Marion <damarion@cisco.com>

Plugin infrastructure improvements

This patch replaces requirement for vlib_plugin_register function
in the plugin so file and introduces new macro:

VLIB_PLUGIN_REGISTER () = {
.version = "version string",
.version_required = "requred version",
.default_disabled = 1,
.early_init = "early_init_function_name",
};

Plugin will nor be loaded if .default_disabled is set to 1
unless explicitely enabled in startup.conf.

If .verstion_required is set, plugin will not be loaded if there
is version mismatch between plugin and vpp. This can be bypassed
by setting "skip-version-check" for specific plugin.

If .early-init string is present, plugin loader will try to resolve
this specific symbol in the plugin namespace and make a function call.

Following startup.conf configuration is added:

plugins {
path /path/to/plugin/directory
plugin ila_plugin.so { enable skip-version-check }
plugin acl_plugin.so { disable }
}

Change-Id: I706c691dd34d94ffe9e02b59831af8859a95f061
Signed-off-by: Damjan Marion <damarion@cisco.com>

56c7b01e 01-Feb-2017 Jon Loeliger <jdl@netgate.com>

Refactor fragile msg macro W and W2 to not burry return control flow.

Instead, have them accept and assign a return paramter leaving
the return control flow up to the caller. Clean up otherwise
misleading returns present even after "NOT REACHED" comments.

Change-Id: I0861921f73ab65d55b95eabd27514f0129152723
Signed-off-by: Jon Loeliger <jdl@netgate.com>

1f9191f6 31-Jan-2017 Jon Loeliger <jdl@netgate.com>

Localize the timeout variable within the W message macro.

Rather than rely on an unbound variable, explicitly introduce
the timeout variable within the 'do { ... } while (0)' construct
as a block-local variable.

Change-Id: I6e78635290f9b5ab3f56b7f116c5fa762c88c9e9
Signed-off-by: Jon Loeliger <jdl@netgate.com>

7bc770ce 31-Jan-2017 Jon Loeliger <jdl@netgate.com>

Convert message macro S to accept a message pointer parameter;

Rather than blindly assume an unbound, fixed message parameter
explicilty pass it as a paramter to the S() macro.

Change-Id: Ieea1f1815cadd2eec7d9240408d69acdc3caa49a
Signed-off-by: Jon Loeliger <jdl@netgate.com>

8a2aea3f 31-Jan-2017 Jon Loeliger <jdl@netgate.com>

Ensure all M() and M2() second parameters are the message pointer.

Rather than maintain (?) an unused second parameter, t, and pull
an unbound message pointer, mp, out of context, explicitly list
the message pointer as the second parameter.

Change-Id: I92143efda6211cdf6b935470f8c71579742a6b64
Signed-off-by: Jon Loeliger <jdl@netgate.com>

2d6b2d6d 25-Jan-2017 Dave Barach <dave@barachs.net>

Repair plugin binary API message numbering

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

fe6bdfd8 21-Jan-2017 Dave Barach <dave@barachs.net>

binary-api debug CLI works with plugins

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

cb034b9b 28-Dec-2016 Damjan Marion <damarion@cisco.com>

Move java,lua api and remaining plugins to src/

Change-Id: I1c3b87e886603678368428ae56a6bd3327cbc90d
Signed-off-by: Damjan Marion <damarion@cisco.com>