aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/node.h
AgeCommit message (Collapse)AuthorFilesLines
2019-10-30vlib: convert frame_index into real pointersAndreas Schultz1-6/+5
The fast path almost always has to deal with the real pointers. Deriving the frame pointer from a frame_index requires a load of the 32bit frame_index from memory, another 64bit load of the heap base pointer and some calculations. Lets store the full pointer instead and do a single 64bit load only. This helps avoiding problems when the heap is grown and frames are allocated below vm->heap_aligned_base. Type: refactor Change-Id: Ifa6e6e984aafe1e2755bff80f0a4dfcddee3623c Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 58b2eb1af562c292feb6d3cdce4656746e61da75)
2019-10-25vlib: address vlib_error_t scaling issueDave Barach1-0/+19
Encoding the vpp node index into the vlib_error_t as a 10-bit quantity limits us to 1K graph nodes. Unfortunately, a few nodes need 6 bit per-node error codes. Only a very few nodes have so many counters. It turns out that there are about 2K total error counters in the system, which is (approximately) the maximum error heap index. The current (index,code) encoding limits the number of interfaces to around 250, since each interface has two associated graph nodes and we have about 500 "normal, interior" graph node This patch adds an error-index to node-index map, so we can store error heap indices directly in the vlib_buffer_t. Type: refactor Change-Id: I28101cad3d8750819e27b8785fc0cf71ff54f79a Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit 687c9021fda009caa2b7eb17bea2eaa51d275bde)
2019-03-13deprecate VLIB_NODE_FUNCTION_MULTIARCHFilip Tehlar1-4/+0
Change-Id: I403173846bc5b1bbbe2a2c41225b0f666f851cb9 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-02-22Add no-append flag to vlib_frame_tDamjan Marion1-0/+3
Change-Id: I01c4f5755d579282773ac227b0bc24f8ddbb2bd1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-02Deprecate old mutliarch code, phase 1Damjan Marion1-24/+2
It is causing compilation sloness with gcc-7 so removing it before it was originally planned. So far macros are left in the tree so we can know which nodes to convert to new multiarch code. Change-Id: Idb14622ca61fdce1eba59723b20d98715b7971e6 Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-24perfmon plugin: 2-way parallel stat collectionDave Barach1-2/+4
As a FUD reduction measure, this patch implements 2-way parallel counter collection. Synthetic stat component counter pairs run at the same time. Running two counters (of any kind) at the same time naturally reduces the aggregate time required by an approximate factor-of-2, depending on whether an even or odd number of stats have been requested. I don't completely buy the argument that computing synthetic stats such as instructions-per-clock will be inaccurate if component counter values are collected sequentially. Given uniform traffic pattern, it must make no difference. As the collection interval increases, the difference between serial and parallel component counter collection will approach zero, see also the Central Limit theorem. Change-Id: I36ebdcf125e8882cca8a1929ec58f17fba1ad8f1 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-30Metadata / opaque formatting belongs in vppDave Barach1-0/+17
VPP graph dispatch trace record description: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Major Version | Minor Version | NStrings | ProtoHint | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Buffer index (big endian) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + VPP graph node name ... ... | NULL octet | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Buffer Metadata ... ... | NULL octet | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Buffer Opaque ... ... | NULL octet | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Buffer Opaque 2 ... ... | NULL octet | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VPP ASCII packet trace (if NStrings > 4) | NULL octet | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Packet data (up to 16K) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Graph dispatch records comprise a version stamp, an indication of how many NULL-terminated strings will follow the record header, and a protocol hint. The buffer index allows downstream consumers of these data to easily filter/track single packets as they traverse the forwarding graph. FWIW, the 32-bit buffer index is stored in big endian format. As of this writing, major version = 1, minor version = 0. Nstrings will be either 4 or 5. Here is the current set of protocol hints: typedef enum { VLIB_NODE_PROTO_HINT_NONE = 0, VLIB_NODE_PROTO_HINT_ETHERNET, VLIB_NODE_PROTO_HINT_IP4, VLIB_NODE_PROTO_HINT_IP6, VLIB_NODE_PROTO_HINT_TCP, VLIB_NODE_PROTO_HINT_UDP, VLIB_NODE_N_PROTO_HINTS, } vlib_node_proto_hint_t; Example: VLIB_NODE_PROTO_HINT_IP6 means that the first octet of packet data SHOULD be 0x60, and should begin an ipv6 packet header. Change-Id: Idf310bad80cc0e4207394c80f18db5f77c378741 Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-23c11 safe string handling supportDave Barach1-1/+1
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-22X86_64 perf counter pluginDave Barach1-0/+5
Change-Id: Ie5a00c15ee9536cc61afab57f6cadc1aa1972f3c Signed-off-by: Dave Barach <dave@barachs.net>
2018-09-14vlib: introduce user flags in vlib_frame_tDamjan Marion1-0/+3
Those flags have local significance and they can be used for sending hints to the next node. Change-Id: Ic2596ee81c64cd16f96344365370e8fcdc465354 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-28vlib: add 'show node' and 'set node function' CLIDamjan Marion1-0/+13
Change-Id: I084d7c9e34329f10b5fe45e0b157c4defe0f2811 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-08-13Multiarch handling in different constructor macrosDamjan Marion1-0/+5
This significantly reduces need for ... in multiarch code. Simply constructor macros will jost create static unused entry if CLIB_MARCH_VARIANT is defined and that will be optimized out by compiler. Change-Id: I17d1c4ac0c903adcfadaa4a07de1b854c7ab14ac Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-29Add VLIB_NODE_FN() macro to simplify multiversioning of node functionsDamjan Marion1-0/+28
Change-Id: Ibab5e27277f618ceb2d543b9d6a1a5f191e7d1db Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-09plugins: unload plugin if early init failsDamjan Marion1-0/+8
Change-Id: I32f68e2ee8f5d32962acdefb0193583f71d342b3 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-08-25TCP horizontal scalingDave Barach1-4/+1
- Remove frame handoff support machinery. We haven't used it in a long time. - Configuration support for the local endpoints bihash table - Drop lookup failure packets in tcp46_syn_sent Change-Id: Icd51e6785f74661c741e76fac23d21c4cc998d17 Signed-off-by: Dave Barach <dave@barachs.net>
2017-06-28switch vlib process model to tw_timer_template timer implDave Barach1-5/+10
Change-Id: I36bb47faea55a6fea7af7ee58d87d8f6dd28f93d Signed-off-by: Dave Barach <dave@barachs.net>
2017-04-25Fix structure alignment with 32-bit pointersDamjan Marion1-0/+4
Change-Id: I740de6c0f12dab452b4349e3bf89ff976a6268c0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-06Use thread local storage for thread indexDamjan Marion1-3/+3
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-04-04vlib: make vlib_node_interrupt_pending(...) thread safeDamjan Marion1-0/+2
Change-Id: I24577bd32ae23fbe8515cc8d960eab5448ce3b5c Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-16vlib: make runtime_data thread-localDamjan Marion1-39/+42
Change-Id: I4aa3e7e42fb81211de1aed07dc7befee87a1e18b Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+725
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
an>`test_environment_versioning`. - **TCP TPUT profiles** had to be changed, as newer TRex versions are not deterministic enough when deciding when to send an ACK. - **CSIT PAPI support**: Due to issues with PAPI performance, and deprecation of VAT, VPP CLI is used in CSIT for many VPP scale tests. See :ref:`vpp_known_issues`. - **General Code Housekeeping**: Ongoing code optimizations and bug fixes. #. PRESENTATION AND ANALYTICS LAYER - **C-Dash** `performance dashboard <http://csit.fd.io/>`_ got updated UI and updated backend increasing its performance and robustness. .. raw:: latex \clearpage .. _vpp_known_issues: Known Issues ------------ New ___ +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | # | JiraID | Issue Description | +====+=========================================+===========================================================================================================+ | 1 | `CSIT-1850 | 2n-dnv: sporadic 1518B tput tests failing to establish required sessions. | | | <https://jira.fd.io/browse/CSIT-1850>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 2 | `CSIT-1864 | 2n-clx: half of the packets lost on PDR tests. | | | <https://jira.fd.io/browse/CSIT-1864>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 3 | `CSIT-1868 | 2n-clx: ALL ldpreload-nginx tests fails when trying to start nginx. | | | <https://jira.fd.io/browse/CSIT-1868>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 4 | `CSIT-1871 | 3n-snr: 25GE interface between SUT and TG/TRex goes down randomly. | | | <https://jira.fd.io/browse/CSIT-1871>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 5 | `CSIT-1877 | 3n-alt, 3n-tsh: VM tests failing to boot VM. | | | <https://jira.fd.io/browse/CSIT-1877>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 6 | `CSIT-1883 | 3n-snr: All hwasync wireguard tests failing when trying to verify device. | | | <https://jira.fd.io/browse/CSIT-1883>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 7 | `CSIT-1884 | 2n-clx, 2n-icx: All NAT44DET NDR PDR IMIX over 1M sessions BIDIR tests failing to create enough sessions. | | | <https://jira.fd.io/browse/CSIT-1884>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 8 | `CSIT-1885 | 3n-icx: 9000b ip4 ip6 l2 NDRPDR AVF tests are failing to forward traffic. | | | <https://jira.fd.io/browse/CSIT-1885>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 9 | `CSIT-1886 | 3n-icx: Wireguard tests with 100 and more tunnels are failing PDR criteria. | | | <https://jira.fd.io/browse/CSIT-1886>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ Previous ________ Issues reported in previous releases which still affect the current results. +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | # | JiraID | Issue Description | +====+=========================================+===========================================================================================================+ | 1 | `CSIT-1671 | All CSIT scale tests can not use PAPI due to much slower performance compared to VAT/CLI (it takes much | | | <https://jira.fd.io/browse/CSIT-1671>`_ | longer to program VPP). This needs to be addressed on the PAPI side. | | +-----------------------------------------+ Currently, the time critical code uses VAT running large files with exec statements and CLI commands. | | | `VPP-1763 | Still, we needed to reduce the number of scale tests run to keep overall duration reasonable. | | | <https://jira.fd.io/browse/VPP-1763>`_ | More improvements needed to achieve sufficient configuration speed. | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 2 | `CSIT-1782 | Multicore AVF tests are failing when trying to create interface. | | | <https://jira.fd.io/browse/CSIT-1782>`_ | Frequency is reduced by CSIT workaround, but occasional failures do still happen. | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 3 | `CSIT-1785 | NAT44ED tests failing to establish all TCP sessions. | | | <https://jira.fd.io/browse/CSIT-1785>`_ | At least for max scale, in allotted time (limited by session 500s timeout) due to worse | | +-----------------------------------------+ slow path performance than previously measured and calibrated for. | | | `VPP-1972 | CSIT removed the max scale NAT tests to avoid this issue. | | | <https://jira.fd.io/browse/VPP-1972>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 4 | `CSIT-1799 | All NAT44-ED 16M sessions CPS scale tests fail while setting NAT44 address range. | | | <https://jira.fd.io/browse/CSIT-1799>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 5 | `CSIT-1800 | All Geneve L3 mode scale tests (1024 tunnels) are failing. | | | <https://jira.fd.io/browse/CSIT-1800>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 6 | `CSIT-1801 | 9000B payload frames not forwarded over tunnels due to violating supported Max Frame Size (VxLAN, LISP, | | | <https://jira.fd.io/browse/CSIT-1801>`_ | SRv6). | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 7 | `CSIT-1802 | AF-XDP - NDR tests failing from time to time. | | | <https://jira.fd.io/browse/CSIT-1802>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 8 | `CSIT-1804 | All testbeds: NDR tests failing from time to time. | | | <https://jira.fd.io/browse/CSIT-1804>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 9 | `CSIT-1808 | All tests with 9000B payload frames not forwarded over memif interfaces. | | | <https://jira.fd.io/browse/CSIT-1808>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 10 | `CSIT-1827 | 3n-icx, 3n-skx: all AVF crypto tests sporadically fail. 1518B with no traffic, IMIX with excessive | | | <https://jira.fd.io/browse/CSIT-1827>`_ | packet loss. | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 11 | `CSIT-1835 | 3n-icx: QUIC vppecho BPS tests failing on timeout when checking hoststack finished. | | | <https://jira.fd.io/browse/CSIT-1835>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 12 | `CSIT-1849 | 2n-skx, 2n-clx, 2n-icx: UDP 16m TPUT tests fail to create all sessions. | | | <https://jira.fd.io/browse/CSIT-1849>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ Fixed _____ Issues reported in previous releases which were fixed in this release: +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | # | JiraID | Issue Description | +====+=========================================+===========================================================================================================+ | 1 | `CSIT-1834 | 2n-icx, 2n-skx: sporadic AVF soak tests failing to find critical load with PLRsearch. | | | <https://jira.fd.io/browse/CSIT-1834>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 2 | `CSIT-1846 | 2n-skx, 2n-clx, 2n-icx: ALL 1518B TCP tput tests failing with big packet loss. | | | <https://jira.fd.io/browse/CSIT-1846>`_ | | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ | 3 | `CSIT-1851 | trending regression: various icelake tests around 2202-04-15 | | | <https://jira.fd.io/browse/CSIT-1851>`_ | Somewhat expected consequence of a VPP usability fix, | | | | the previous VPP compiler version was too new for the OS used. | +----+-----------------------------------------+-----------------------------------------------------------------------------------------------------------+ .. _vpp_rca: Root Cause Analysis for Performance Changes ------------------------------------------- List of RCAs in |csit-release| for VPP performance changes: +----+-----------------------------------------+--------------------------------------------------------------------+ | # | JiraID | Issue Description | +====+=========================================+====================================================================+ | 1 | `CSIT-1887 | rls2210 RCA: ASTF tests | | | <https://jira.fd.io/browse/CSIT-1887>`_ | TRex upgrade decreased TRex performance. NAT results not affected, | | | | except on Denverton due to interference from VPP-2010. | +----+-----------------------------------------+--------------------------------------------------------------------+ | 2 | `CSIT-1888 | rls2210 RCA: testbed differences, especially for ipsec | | | <https://jira.fd.io/browse/CSIT-1888>`_ | Not caused by VPP code nor CSIT code. | | | | Most probable cause is clang-14 behavior. | +----+-----------------------------------------+--------------------------------------------------------------------+ | 3 | `CSIT-1889 | rls2210 RCA: policy-outbound-nocrypto | | | <https://jira.fd.io/browse/CSIT-1889>`_ | When VPP added spd fast path matching (Gerrit 36097), | | | | it decreased MRR of the corresponding tests, at least on 3-alt. | +----+-----------------------------------------+--------------------------------------------------------------------+