summaryrefslogtreecommitdiffstats
path: root/extras
AgeCommit message (Expand)AuthorFilesLines
2019-10-10http_static: add .json contentDave Barach1-0/+2
2019-10-09docs: Add macos build documentationNathan Skrzypczak2-0/+91
2019-10-03emacs: track improvements in vppapigenDave Barach7-270/+17
2019-10-03dhcp: API cleanupJakub Grajciar2-6/+8
2019-09-18builtinurl: initial working attemptDave Barach2-1/+84
2019-09-11bonding: API cleanupJakub Grajciar1-2/+2
2019-09-10misc: clean up "pcap [rx|tx] trace" debug CLIDave Barach1-0/+34
2019-09-09libmemif: prevent crash in case of invalid connection handleJakub Grajciar1-9/+31
2019-09-07ip: fix udp/tcp checksum corner casesDave Barach1-0/+276
2019-09-03api: enforce vla is last and fixed string typeOle Troan3-7/+7
2019-08-21libmemif: introduce 'memif_per_thread_' namespaceJakub Grajciar9-113/+1314
2019-08-20api: Cleanup APIs interface.apiJakub Grajciar4-15/+19
2019-08-12papi: Revert vpp-api-python to py2, add py3 pkgIan Wells1-2/+29
2019-08-10http_static: tls supportDave Barach2-0/+13
2019-08-07vom: export/install cmake filesNeale Ranns6-1/+169
2019-07-31qos: Store functionNeale Ranns7-1/+653
2019-07-26libmemif: fix autoconnectJakub Grajciar1-4/+4
2019-07-26dhcp ip: DSCP settings for transmitted DHCP packetsNeale Ranns8-17/+174
2019-07-25vom: QoS supportNeale Ranns17-0/+2132
2019-07-25libmemif: fix chained buffer flagJakub Grajciar1-0/+1
2019-07-12docs: how to enable coredump with systemdBenoît Ganne1-0/+5
2019-07-11vom: Fix reference to flags in GBP bridge-domainNeale Ranns1-1/+1
2019-07-10emacs: update the vat plugin generatorDave Barach1-17/+1
2019-07-09misc: extras update list_api_changes.py to PY3Paul Vinciguerra1-11/+14
2019-07-05misc: allow second ':' in commit messageDamjan Marion1-1/+1
2019-07-03fib: allow route delete with no paths and multipath=0 to remove theNeale Ranns1-1/+2
2019-07-02gbp: add anonymous l3-out subnetsBenoît Ganne2-6/+20
2019-07-02libmemif: version 3.0Jakub Grajciar12-339/+423
2019-07-02vom: Fix [m]route dumpNeale Ranns1-36/+2
2019-07-01libmemif: icmp-responder example buffer management fixJakub Grajciar1-5/+8
2019-07-01gbp: VRF scoped contractsNeale Ranns16-53/+152
2019-06-26api: refactor format_vl_api_prefix_t return keysPaul Vinciguerra1-2/+2
2019-06-26vom: Add getter for interface admin stateMohsin Kazmi2-0/+11
2019-06-25build: fix error messages in check_commit_msg.shDave Barach1-4/+3
2019-06-19l2: BD ARP termination entry API updateNeale Ranns2-10/+11
2019-06-18fib: fib api updatesNeale Ranns21-474/+593
2019-06-14misc: Update MAINTAINERS to include interface commonNeale Ranns1-1/+1
2019-06-12misc: add check_commit_msg.sh scriptDamjan Marion1-0/+50
2019-06-07build: add -Wall and -fno-common, fix reported issuesBenoît Ganne8-45/+14
2019-06-04vom: Add bridge domain unknown unicast flooding flagMohsin Kazmi4-5/+54
2019-06-03vom: Add bridge domain arp unicast forwarding flagMohsin Kazmi4-3/+48
2019-05-31VPP-1640 - Missing rules in vpp-selinux-policyBilly McFall1-1/+2
2019-05-31VPP-1679 - SElinux rules are not set accordinglyBilly McFall1-2/+4
2019-05-31VPP-1640 - Missing rules in vpp-selinux-policyBilly McFall1-0/+212
2019-05-29emacs-skeleton: improve generated .api filesDave Barach3-29/+58
2019-05-29Break out the broom for some cleanup workDave Barach3-17/+27
2019-05-23rpm: VPP-1674: exclude external headers from rpmBenoît Ganne2-2/+2
2019-05-22stats: support multiple works for error countersOle Troan2-5/+5
2019-05-18emacs-lisp: add missing '\' in templateDave Barach1-8/+7
2019-05-02Add the packages for 19.04jdenisco2-6/+6
ass="p">(n_left_from > 0) { u32 n_left_to_next; vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next); while (n_left_from >= 4 && n_left_to_next >= 2) { u32 bi0, bi1; vlib_buffer_t *b0, *b1; ppp_header_t *h0, *h1; u32 i0, i1, protocol0, protocol1, enqueue_code; /* Prefetch next iteration. */ { vlib_buffer_t *p2, *p3; p2 = vlib_get_buffer (vm, from[2]); p3 = vlib_get_buffer (vm, from[3]); vlib_prefetch_buffer_header (p2, LOAD); vlib_prefetch_buffer_header (p3, LOAD); CLIB_PREFETCH (p2->data, sizeof (h0[0]), LOAD); CLIB_PREFETCH (p3->data, sizeof (h1[0]), LOAD); } bi0 = from[0]; bi1 = from[1]; to_next[0] = bi0; to_next[1] = bi1; from += 2; to_next += 2; n_left_to_next -= 2; n_left_from -= 2; b0 = vlib_get_buffer (vm, bi0); b1 = vlib_get_buffer (vm, bi1); h0 = (void *) (b0->data + b0->current_data); h1 = (void *) (b1->data + b1->current_data); b0->current_data += sizeof (h0[0]); b1->current_data += sizeof (h1[0]); b0->current_length -= sizeof (h0[0]); b1->current_length -= sizeof (h1[0]); /* Index sparse array with network byte order. */ protocol0 = h0->protocol; protocol1 = h1->protocol; sparse_vec_index2 (rt->next_by_protocol, protocol0, protocol1, &i0, &i1); b0->error = node->errors[i0 == SPARSE_VEC_INVALID_INDEX ? PPP_ERROR_UNKNOWN_PROTOCOL : PPP_ERROR_NONE]; b1->error = node->errors[i1 == SPARSE_VEC_INVALID_INDEX ? PPP_ERROR_UNKNOWN_PROTOCOL : PPP_ERROR_NONE]; enqueue_code = (i0 != i_next) + 2 * (i1 != i_next); if (PREDICT_FALSE (enqueue_code != 0)) { switch (enqueue_code) { case 1: /* A B A */ to_next[-2] = bi1; to_next -= 1; n_left_to_next += 1; vlib_set_next_frame_buffer (vm, node, vec_elt (rt->next_by_protocol, i0), bi0); break; case 2: /* A A B */ to_next -= 1; n_left_to_next += 1; vlib_set_next_frame_buffer (vm, node, vec_elt (rt->next_by_protocol, i1), bi1); break; case 3: /* A B B or A B C */ to_next -= 2; n_left_to_next += 2; vlib_set_next_frame_buffer (vm, node, vec_elt (rt->next_by_protocol, i0), bi0); vlib_set_next_frame_buffer (vm, node, vec_elt (rt->next_by_protocol, i1), bi1); if (i0 == i1) { vlib_put_next_frame (vm, node, next_index, n_left_to_next); i_next = i1; next_index = vec_elt (rt->next_by_protocol, i_next); vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next); } } } } while (n_left_from > 0 && n_left_to_next > 0) { u32 bi0; vlib_buffer_t *b0; ppp_header_t *h0; u32 i0, protocol0; bi0 = from[0]; to_next[0] = bi0; from += 1; to_next += 1; n_left_from -= 1; n_left_to_next -= 1; b0 = vlib_get_buffer (vm, bi0); h0 = (void *) (b0->data + b0->current_data); b0->current_data += sizeof (h0[0]); b0->current_length -= sizeof (h0[0]); protocol0 = h0->protocol; i0 = sparse_vec_index (rt->next_by_protocol, protocol0); b0->error = node->errors[i0 == SPARSE_VEC_INVALID_INDEX ? PPP_ERROR_UNKNOWN_PROTOCOL : PPP_ERROR_NONE]; /* Sent packet to wrong next? */ if (PREDICT_FALSE (i0 != i_next)) { /* Return old frame; remove incorrectly enqueued packet. */ vlib_put_next_frame (vm, node, next_index, n_left_to_next + 1); /* Send to correct next. */ i_next = i0; next_index = vec_elt (rt->next_by_protocol, i_next); vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next); to_next[0] = bi0; to_next += 1; n_left_to_next -= 1; } } vlib_put_next_frame (vm, node, next_index, n_left_to_next); } return from_frame->n_vectors; } static char *ppp_error_strings[] = { #define ppp_error(n,s) s, #include "error.def" #undef ppp_error }; /* *INDENT-OFF* */ VLIB_REGISTER_NODE (ppp_input_node) = { .function = ppp_input, .name = "ppp-input", /* Takes a vector of packets. */ .vector_size = sizeof (u32), .runtime_data_bytes = sizeof (ppp_input_runtime_t), .n_errors = PPP_N_ERROR, .error_strings = ppp_error_strings, .n_next_nodes = PPP_INPUT_N_NEXT, .next_nodes = { #define _(s,n) [PPP_INPUT_NEXT_##s] = n, foreach_ppp_input_next #undef _ }, .format_buffer = format_ppp_header_with_length, .format_trace = format_ppp_input_trace, .unformat_buffer = unformat_ppp_header, }; /* *INDENT-ON* */ static clib_error_t * ppp_input_runtime_init (vlib_main_t * vm) { ppp_input_runtime_t *rt; rt = vlib_node_get_runtime_data (vm, ppp_input_node.index); rt->next_by_protocol = sparse_vec_new ( /* elt bytes */ sizeof (rt->next_by_protocol[0]), /* bits in index */ BITS (((ppp_header_t *) 0)->protocol)); vec_validate (rt->sparse_index_by_next_index, PPP_INPUT_NEXT_DROP); vec_validate (rt->sparse_index_by_next_index, PPP_INPUT_NEXT_PUNT); rt->sparse_index_by_next_index[PPP_INPUT_NEXT_DROP] = SPARSE_VEC_INVALID_INDEX; rt->sparse_index_by_next_index[PPP_INPUT_NEXT_PUNT] = SPARSE_VEC_INVALID_INDEX; return 0; } static clib_error_t * ppp_input_init (vlib_main_t * vm) { { clib_error_t *error = vlib_call_init_function (vm, ppp_init); if (error) clib_error_report (error); } ppp_setup_node (vm, ppp_input_node.index); ppp_input_runtime_init (vm); return 0; } VLIB_INIT_FUNCTION (ppp_input_init); VLIB_WORKER_INIT_FUNCTION (ppp_input_runtime_init); void ppp_register_input_protocol (vlib_main_t * vm, ppp_protocol_t protocol, u32 node_index) { ppp_main_t *em = &ppp_main; ppp_protocol_info_t *pi; ppp_input_runtime_t *rt; u16 *n; u32 i; { clib_error_t *error = vlib_call_init_function (vm, ppp_input_init); if (error) clib_error_report (error); } pi = ppp_get_protocol_info (em, protocol); pi->node_index = node_index; pi->next_index = vlib_node_add_next (vm, ppp_input_node.index, node_index); /* Setup ppp protocol -> next index sparse vector mapping. */ rt = vlib_node_get_runtime_data (vm, ppp_input_node.index); n = sparse_vec_validate (rt->next_by_protocol, clib_host_to_net_u16 (protocol)); n[0] = pi->next_index; /* Rebuild next index -> sparse index inverse mapping when sparse vector is updated. */ vec_validate (rt->sparse_index_by_next_index, pi->next_index); for (i = 1; i < vec_len (rt->next_by_protocol); i++) rt->sparse_index_by_next_index[rt->next_by_protocol[i]] = i; } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */