summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/memclnt_api.c
AgeCommit message (Collapse)AuthorFilesLines
2023-09-06api: fix mp-safe mark for some messages and add moreVladislav Grishenko1-0/+3
Several api messages were not mp-safe although marked as such because non-zero base id was not taken into account, and therefore some other (from zero base id) were falsely mp-safe instead. Keep messages as mp-safe, as they falsely were before: 10 get_first_msg_id 0 1 12 api_versions 0 1 Messages that are no longer mp-safe as they weren't marked: 15 sockclnt_create 0 1 33 proxy_arp_intfc_dump 0 1 Fix messages to be really mp-safe: 809 bridge_domain_dump 0 1 920 ip_route_add_del 0 1 921 ip_route_add_del_v2 0 1 1362 get_node_graph 0 1 1671 create_vhost_user_if 0 1 1675 create_vhost_user_if_v2 0 1 Additionally mark messages as mp-safe, seems they need no barrier: 1360 show_threads 0 1 1370 show_version 0 1 1372 show_vpe_system_time 0 1 Type: fix Change-Id: Ie6c1e3aa89f26bf51bfbcb7e7c4d9fee885487b7 Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
2023-04-20api: fix trace_plugin_msg_ids segv in trace dumpMatthew Smith1-0/+1
With 'api-trace { on }' in startup.conf, running 'api trace dump' in vppctl was causing VPP to seg fault. vl_msg_print_trace() was calling m->endian_handler() without checking whether its null. Checking if its non-null prevents a crash, but the trace dump prints the message IDs for trace_plugin_msg_ids in network byte order. There is an auto-generated endian function for that message. Set it on the call to vl_msg_api_config() for trace_plugin_msg_ids so the IDs will be printed in host byte order in trace dump output. Type: fix Fixes: fe45f8f5 Signed-off-by: Matthew Smith <mgsmith@netgate.com> Change-Id: I0ab463985e9a983155feba13ac4eb99ab883ace6
2022-09-29api: deprecate vl_msg_api_set_handlersDamjan Marion1-10/+24
Type: refactor Change-Id: I7b7ca9ec62cb70243c5b7e87968eab1338d67ec8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-09-26api: replace print functions wth formatDamjan Marion1-10/+5
Type: improvement Change-Id: I7f7050c19453a69a7fb6c5e62f8f57db847d9144 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-05-19api: refactor api data storageDamjan Marion1-4/+4
single struct to hold all api handler, flags, etc. Provide functions to toggle flags instead of writing directly to internal data. Type: refactor Change-Id: I4730d7290e57489de8eda34a72211527e015b721 Signed-off-by: Damjan Marion <damarion@cisco.com>
2022-04-04vppinfra: make _vec_len() read-onlyDamjan Marion1-1/+1
Use of _vec_len() to set vector length breaks address sanitizer. Users should use vec_set_len(), vec_inc_len(), vec_dec_len () instead. Type: improvement Change-Id: I441ae948771eb21c23a61f3ff9163bdad74a2cb8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-14api: verify message size on receiptKlement Sekera1-11/+17
When a message is received, verify that it's sufficiently large to accomodate any VLAs within message. To do that, we need a way to calculate message size including any VLAs. This patch adds such funcionality to vppapigen and necessary C code to use those to validate message size on receipt. Drop messages which are malformed. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I2903aa21dee84be6822b064795ba314de46c18f4
2021-10-18interface: add api test fileFilip Tehlar1-1/+17
Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Ib07029204ecf12bf2adb5a39afa54bc98fb81f34
2021-10-11api: set missing handlersFilip Tehlar1-0/+3
Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I1fdefeaa4661c03e819b2f2f25762c633f9ab42c
2021-09-28api: API trace improvementsFilip Tehlar1-16/+18
Type: improvement * add support for JSON format in API trace * add ability to replay JSON API trace in both VPP and VAT2 * use CRC for backward compatibility check during JSON API replay * fix API trace CLI (and remove duplicits) * remove custom dump * remove vppapitrace.py * update docs accordingly Change-Id: I5294f68bebe6cbe738630f457f3a87720e06486b Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2021-09-27misc: move part of vpe apis to vlibmemoryFlorin Coras1-0/+719
VPE apis are actually vlib apis. This moves those that are not tightly coupled with vapi to vlib_api Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I456a64ce49a0cdeff4a0931c6ea513cb639f683e Signed-off-by: Ole Troan <ot@cisco.com>