summaryrefslogtreecommitdiffstats
path: root/src/plugins/lb/lb.c
AgeCommit message (Collapse)AuthorFilesLines
2019-07-31lb: vip and as dump/detail api'sHongjun Ni1-1/+1
- 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>
2019-07-31vppinfra: refactor test_and_set spinlocks to use clib_spinlock_tjaszha031-8/+10
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>
2019-06-06lb: crashed with some specific commit under heavy trafficHongjun Ni1-3/+10
- 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>
2019-05-03plugins: clean up plugin descriptionsDave Wallace1-1/+1
- 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>
2019-01-21Fix LB lookup table failed issueHongjun Ni1-5/+11
Change-Id: Icd21f456089c72c91a8328f963bf47a8c7725195 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-10-23c11 safe string handling supportDave Barach1-1/+1
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-19vppinfra: add atomic macros for __sync builtinsSirshak Das1-2/+2
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>
2018-09-24LB: fix flush flow table issueHongjun Ni1-15/+22
Change-Id: Ib0a06ab71aed42eb5bb2ab2edf4844b2167e0610 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-09-12Fix LB memory leak and remove useless codePierre Pfister1-11/+1
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>
2018-09-07Add flush flag on del as commandHongjun Ni1-7/+43
This patch depends on https://gerrit.fd.io/r/#/c/13260 Change-Id: If94968342935ebd24cf4ebed238e6a27d94959b7 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-09-04Fixed showing negative count in stats show CLINaoyuki Mori1-2/+2
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>
2018-08-31Support lb on both vip and per-port-vip caseHongjun Ni1-97/+357
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>
2018-05-28add missing lb_put_writer_lock() to lb_vip_add() invalid args casesAndrey "Zed" Zaikin1-2/+7
Change-Id: I9343672c5765a5a4cb56c99fa5de176ddcac62c7 Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
2018-05-18Rework kube-proxy into LB pluginHongjun Ni1-55/+305
Add support of NAT66 Change-Id: Ie6aa79078a3835f989829b9a597c448dfd2f9ea3 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-04-12Fixes for 'make UNATTENDED=yes CC=clang CXX=clang verify'Neale Ranns1-2/+2
Change-Id: I994649761fe2e66e12ae0e49a84fb1d0a966ddfb Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-02-02Add L3DSR feature in LB pluginHongjun Ni1-7/+53
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>
2017-10-16lb plugin - fix format() type mismatchesGabriel Ganne1-2/+3
* (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>
2017-10-04[aarch64] Fixes CLI crashes on dpaa2 platform.Christophe Fontaine1-1/+1
- 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>
2017-04-13Remove unsed parameter from fib_table_entry_special_add() (only used in FIB ↵Neale Ranns1-2/+1
tests). The DPO was incorrectly initialised with FIB_PROTO_MAX Change-Id: I962df9e162e4dfb6837a5ce79ea795d5ff2d7315 Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-04-06Use thread local storage for thread indexDamjan Marion1-4/+4
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>
2017-03-22vlib: add description field in plugin registrationDamjan Marion1-0/+1
Change-Id: I88b322a5d602f3d6d3310e971479180a89430e0e Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-02-03Plugin infrastructure improvementsDamjan Marion1-9/+6
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>
2017-01-01Move java,lua api and remaining plugins to src/Damjan Marion1-0/+844
Change-Id: I1c3b87e886603678368428ae56a6bd3327cbc90d Signed-off-by: Damjan Marion <damarion@cisco.com>