aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl
AgeCommit message (Expand)AuthorFilesLines
2018-09-22vcl: remove vcl_eventFlorin Coras8-1062/+0
2018-09-20session/svm: add want_tx_event flag to fifoFlorin Coras4-30/+22
2018-09-14vcl: keep track of unexpected eventsFlorin Coras4-252/+299
2018-09-12vcl: add apis that expos fifo as bufferFlorin Coras6-53/+263
2018-09-12vcl: improve read and fifo event handlingFlorin Coras3-16/+19
2018-09-11remove libvlib from libvlibmemoryclient libsMatthew Smith1-1/+1
2018-09-10session: lock app worker mq for io eventsFlorin Coras3-72/+104
2018-09-08vcl: set worker pthread stop keyFlorin Coras3-1/+11
2018-09-08vcl: register workers in orderFlorin Coras4-5/+19
2018-09-07vcl: refactor test client to support workersFlorin Coras7-639/+588
2018-09-06vcl/session/svm: fix coverity warningsFlorin Coras1-1/+8
2018-09-06session: support multiple worker bindsFlorin Coras5-33/+59
2018-09-04vcl: refactor test apps to use multiple workersFlorin Coras3-324/+344
2018-09-02Switch to cmakeDamjan Marion1-0/+9
2018-08-30vcl: add support for multi-worker appsFlorin Coras8-594/+905
2018-08-28cmake: don't install some test executableDamjan Marion1-1/+2
2018-08-28vcl: remove session locksFlorin Coras3-318/+143
2018-08-28vcl/session: use mq for bind repliesFlorin Coras2-57/+63
2018-08-26cmake: add add_vpp_library and add_vpp_executable macrosDamjan Marion1-11/+8
2018-08-25cmake: add more headers to the install listDamjan Marion1-0/+6
2018-08-25vcl: remove unused binary api handlersFlorin Coras2-296/+73
2018-08-24session: add support for multiple app workersFlorin Coras1-1/+1
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+53
2018-08-17vcl: unset fifo events only in read/writeFlorin Coras1-57/+21
2018-08-10vcl: support for eventfd mq signalingFlorin Coras8-599/+1063
2018-08-02vcl: fix debug messages output before heap cfgFlorin Coras1-5/+7
2018-07-31vcl: add read/write udp supportFlorin Coras5-72/+111
2018-07-27vcl: use events for epoll/select/read/writeFlorin Coras10-695/+1023
2018-07-18Add config option to use dlmalloc instead of mheapDave Barach4-8/+8
2018-07-17session: use msg queue for eventsFlorin Coras3-20/+19
2018-06-28vcl: move binary api and cfg to separate filesFlorin Coras5-1951/+2077
2018-06-28vcl: refactor vcl sessionFlorin Coras1-189/+185
2018-06-27vcl: refactor debuggingFlorin Coras2-1800/+755
2018-06-25VCL: Refactor VCL test (part 1)Dave Wallace5-322/+2161
2018-06-19VCL: Fix session peer and local addressesDave Wallace1-6/+20
2018-06-19VCL: refactor async & spinlocksDave Wallace5-544/+577
2018-05-31fix socket send() return size checkqchang1-1/+1
2018-04-12VCL IOEvent external API callbackKeith Burns (alagalah)6-90/+367
2018-04-12Fixes for 'make UNATTENDED=yes CC=clang CXX=clang verify'Neale Ranns1-4/+8
2018-03-26VCL: add IPv6 to socket_test.sh and make testDave Wallace4-41/+188
2018-03-19VCL: Fix Coverity CID183003Dave Wallace1-1/+1
2018-03-19VCL: Fix Coverity CID183009Dave Wallace1-1/+1
2018-03-14VCL: Handle epoll HUP events in sock_test_serverDave Wallace1-1/+10
2018-03-13VCL: Fix race condition in event thread functionDave Wallace1-11/+17
2018-03-09VCL API for external callback for listener/connect eventKeith Burns (alagalah)6-22/+312
2018-03-09VCL: add event registration to listen session in select()Dave Wallace1-5/+27
2018-03-08VCL event handling changesKeith Burns (alagalah)3-1/+27
2018-03-08VCL refactoringKeith Burns (alagalah)3-48/+55
2018-03-08VCL: cleanup namespace_secret env-var cfg code.Dave Wallace1-20/+1
2018-03-06VCL registration handler added to session for polling sessionsKeith Burns (alagalah)1-6/+9
">(ctx->ofp, fmt, &va); va_end (va); } static u8 is_num_only (vat_json_node_t * p) { vat_json_node_t *elem; vec_foreach (elem, p) { if (VAT_JSON_INT != elem->type && VAT_JSON_UINT != elem->type) { return 0; } } return 1; } static void vat_json_print_internal (vat_print_ctx_t * ctx, vat_json_node_t * node) { #define P(fmt,...) fformat(ctx->ofp, fmt, ##__VA_ARGS__) #define PL(fmt,...) fformat(ctx->ofp, fmt"\n", ##__VA_ARGS__) #define PPL(fmt,...) vat_json_indent_line(ctx, fmt"\n", ##__VA_ARGS__) #define PP(fmt,...) vat_json_indent_line(ctx, fmt, ##__VA_ARGS__) #define INCR (ctx->indent++) #define DECR (ctx->indent--) vat_json_pair_t *pair; u32 i, count; vat_json_node_t *elem; u8 num_only = 0; if (!node) { return; } switch (node->type) { case VAT_JSON_OBJECT: count = vec_len (node->pairs); if (count >= 1) { PL ("{"); INCR; for (i = 0; i < count; i++) { pair = &node->pairs[i]; PP ("\"%s\": ", pair->name); vat_json_print_internal (ctx, &pair->value); if (i < count - 1) { P (","); } PL (); } DECR; PP ("}"); } else { P ("{}"); } break; case VAT_JSON_ARRAY: num_only = is_num_only (node->array); count = vec_len (node->array); if (count >= 1) { if (num_only) P ("["); else PL ("[ "); INCR; for (i = 0; i < count; i++) { elem = &node->array[i]; if (!num_only) { vat_json_indent_print (ctx); } vat_json_print_internal (ctx, elem); if (i < count - 1) { if (num_only) { P (", "); } else { P (","); } } if (!num_only) PL (); } DECR; if (!num_only) PP ("]"); else P ("]"); } else { P ("[]"); } break; case VAT_JSON_INT: P ("%d", node->sint); break; case VAT_JSON_UINT: P ("%" PRIu64, node->uint); break; case VAT_JSON_REAL: P ("%f", node->real); break; case VAT_JSON_STRING: P ("\"%s\"", node->string); break; case VAT_JSON_IPV4: P ("\"%U\"", vat_json_format_ip4_address, &node->ip4); break; case VAT_JSON_IPV6: P ("\"%U\"", vat_json_format_ip6_address, &node->ip6); break; default: break; } #undef PPL #undef PP #undef PL #undef P } void vat_json_print (FILE * ofp, vat_json_node_t * node) { vat_print_ctx_t ctx; memset (&ctx, 0, sizeof ctx); ctx.indent = 0; ctx.ofp = ofp; fformat (ofp, "\n"); vat_json_print_internal (&ctx, node); fformat (ofp, "\n"); } void vat_json_free (vat_json_node_t * node) { int i = 0; if (NULL == node) { return; } switch (node->type) { case VAT_JSON_OBJECT: for (i = 0; i < vec_len (node->pairs); i++) { vat_json_free (&node->pairs[i].value); } if (NULL != node->pairs) { vec_free (node->pairs); } break; case VAT_JSON_ARRAY: for (i = 0; i < vec_len (node->array); i++) { vat_json_free (&node->array[i]); } if (NULL != node->array) { vec_free (node->array); } break; case VAT_JSON_STRING: if (NULL != node->string) { vec_free (node->string); } break; default: break; } } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */