aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Expand)AuthorFilesLines
2021-03-26vlib: split vlib_main_t into global and per-threadDamjan Marion24-456/+469
2021-03-26vlib: introduce vlib_get_elog_main()Damjan Marion15-85/+88
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion43-137/+166
2021-03-26tests: move ping tests to src/plugin/ping/testDave Wallace1-0/+176
2021-03-26avf: flow support enhancementChenmin Sun1-49/+219
2021-03-26avf: handle flow id in data pathChenmin Sun3-27/+122
2021-03-26avf: add avf flow frameworkChenmin Sun7-34/+2430
2021-03-25svm: add producer wait functionFlorin Coras3-14/+47
2021-03-25acl: fix the integer overflow bug in API message length validation logicAndrew Yourtchenko1-4/+4
2021-03-25svm: fix producer deadlock in svm_msg_q_wait()nandfan1-5/+9
2021-03-25nat: allocate enough space for full port usageKlement Sekera1-1/+1
2021-03-25rdma: fix buggy cqe parsing (truncated packets)Mohammed Hawari1-3/+2
2021-03-25nat: fix bihash kvp printKlement Sekera1-2/+3
2021-03-25avf: introduce program flow eventChenmin Sun3-37/+86
2021-03-25tests: move vppinfra tests to src/vppinfra/testDave Wallace1-0/+40
2021-03-25nat: prevent usage of ED nodes in EI codeKlement Sekera2-44/+118
2021-03-25nat: fix vnet_feature_next in source hairpinningKlement Sekera1-3/+11
2021-03-25stats: python vpp_stats rewrite to access stat segment directlyOle Troan5-313/+508
2021-03-24tls: fix cleanup on app close with dataFlorin Coras1-0/+3
2021-03-24interface: do subif or feature arc work in interface-output only if neededDamjan Marion1-42/+61
2021-03-24virtio: improve compilation timeDamjan Marion1-64/+57
2021-03-23interface: simplify and optimize interface-output nodeDamjan Marion1-204/+121
2021-03-23vlib: add node adaptive mode flagFlorin Coras4-8/+37
2021-03-23interface: reduce duplicate code in the interface-output nodeDamjan Marion1-42/+41
2021-03-22tls: fix tlsopenssl for remaining bufferSivaprasad Tummala1-3/+4
2021-03-22vcl: fix libc epoll pwait starvedwanghanlin2-1/+5
2021-03-22vlib: graphviz upgrade to allow filtersArthur de Kerhor5-34/+206
2021-03-21gre: Multipoint GRE fixesNeale Ranns4-7/+86
2021-03-20tests: add support for worker awarenessKlement Sekera5-5/+5
2021-03-19vxlan: add tunnel cache to graph nodeJunfeng Wang9-47/+49
2021-03-19api: Avoid the usage of the freed registration by the API callsAndrew Yourtchenko2-23/+52
2021-03-19policer: Add CLI for all equivalent API functionsNeale Ranns1-6/+162
2021-03-19interface: add capabilities flagsMohsin Kazmi21-88/+150
2021-03-18dpdk: don't mask interrupts for some driversMohammed Hawari4-9/+38
2021-03-17session: fix populating chained buffersIvan Shvedunov1-3/+5
2021-03-17dpdk: cryptodev session managementpibr1-108/+377
2021-03-16perfmon: fixes for cache hierarchyRay Kinsella1-8/+12
2021-03-16perfmon: add support for raw and timestampsRay Kinsella3-1/+24
2021-03-16fib: Allow the creation of new source on the APINeale Ranns10-32/+486
2021-03-16api: allow specifying no timeoutKlement Sekera1-1/+1
2021-03-15nat: get rid of worker selection callbacksKlement Sekera8-81/+77
2021-03-15ipsec: allow inbound non-tunnel SA through CLIMohammed Hawari1-6/+0
2021-03-15nat: pnat copy and clear byte instructionsAndrew Yourtchenko13-161/+658
2021-03-15dns: fix crash when printing unlikely msgDave Barach1-3/+4
2021-03-15ikev2: support responder hostnameFilip Tehlar11-64/+311
2021-03-15cnat: maglev fixesNathan Skrzypczak4-31/+47
2021-03-15misc: finish removing deprecated cop APIDave Barach1-22/+0
2021-03-15dpdk: implement interrupt modeMohammed Hawari4-12/+116
2021-03-15tests: use socket transport instead of shared memoryOle Troan8-33/+91
2021-03-15nat: remove unused parameterKlement Sekera1-9/+9
with the first SPAN packet (since they are in the same frame) thus making trace output of the original packet confusing */ mirror_frames[i]->flags |= VLIB_FRAME_TRACE; c0->flags |= VLIB_BUFFER_IS_TRACED; #endif } } } /* *INDENT-ON* */ } static_always_inline uword span_node_inline_fn (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame, vlib_rx_or_tx_t rxtx, span_feat_t sf) { span_main_t *sm = &span_main; vnet_main_t *vnm = vnet_get_main (); u32 n_left_from, *from, *to_next; u32 next_index; u32 sw_if_index; static __thread vlib_frame_t **mirror_frames = 0; from = vlib_frame_vector_args (frame); n_left_from = frame->n_vectors; next_index = node->cached_next_index; vec_validate_aligned (mirror_frames, sm->max_sw_if_index, CLIB_CACHE_LINE_BYTES); while (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; u32 bi1; vlib_buffer_t *b0; vlib_buffer_t *b1; u32 sw_if_index0; u32 next0 = 0; u32 sw_if_index1; u32 next1 = 0; /* speculatively enqueue b0, b1 to the current next frame */ to_next[0] = bi0 = from[0]; to_next[1] = bi1 = from[1]; to_next += 2; n_left_to_next -= 2; from += 2; n_left_from -= 2; b0 = vlib_get_buffer (vm, bi0); b1 = vlib_get_buffer (vm, bi1); sw_if_index0 = vnet_buffer (b0)->sw_if_index[rxtx]; sw_if_index1 = vnet_buffer (b1)->sw_if_index[rxtx]; span_mirror (vm, node, sw_if_index0, b0, mirror_frames, rxtx, sf); span_mirror (vm, node, sw_if_index1, b1, mirror_frames, rxtx, sf); switch (sf) { case SPAN_FEAT_L2: if (rxtx == VLIB_RX) { next0 = vnet_l2_feature_next (b0, sm->l2_input_next, L2INPUT_FEAT_SPAN); next1 = vnet_l2_feature_next (b1, sm->l2_input_next, L2INPUT_FEAT_SPAN); } else { next0 = vnet_l2_feature_next (b0, sm->l2_output_next, L2OUTPUT_FEAT_SPAN); next1 = vnet_l2_feature_next (b1, sm->l2_output_next, L2OUTPUT_FEAT_SPAN); } break; case SPAN_FEAT_DEVICE: default: vnet_feature_next (&next0, b0); vnet_feature_next (&next1, b1); break; } /* verify speculative enqueue, maybe switch current next frame */ vlib_validate_buffer_enqueue_x2 (vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1); } while (n_left_from > 0 && n_left_to_next > 0) { u32 bi0; vlib_buffer_t *b0; u32 sw_if_index0; u32 next0 = 0; /* speculatively enqueue b0 to the current next frame */ to_next[0] = bi0 = from[0]; to_next += 1; n_left_to_next -= 1; from += 1; n_left_from -= 1; b0 = vlib_get_buffer (vm, bi0); sw_if_index0 = vnet_buffer (b0)->sw_if_index[rxtx]; span_mirror (vm, node, sw_if_index0, b0, mirror_frames, rxtx, sf); switch (sf) { case SPAN_FEAT_L2: if (rxtx == VLIB_RX) next0 = vnet_l2_feature_next (b0, sm->l2_input_next, L2INPUT_FEAT_SPAN); else next0 = vnet_l2_feature_next (b0, sm->l2_output_next, L2OUTPUT_FEAT_SPAN); break; case SPAN_FEAT_DEVICE: default: vnet_feature_next (&next0, b0); break; } /* verify speculative enqueue, maybe switch current next frame */ vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next, n_left_to_next, bi0, next0); } vlib_put_next_frame (vm, node, next_index, n_left_to_next); } for (sw_if_index = 0; sw_if_index < vec_len (mirror_frames); sw_if_index++) { vlib_frame_t *f = mirror_frames[sw_if_index]; if (f == 0) continue; if (sf == SPAN_FEAT_L2) vlib_put_frame_to_node (vm, l2output_node.index, f); else vnet_put_frame_to_sw_interface (vnm, sw_if_index, f); mirror_frames[sw_if_index] = 0; } return frame->n_vectors; } VLIB_NODE_FN (span_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { return span_node_inline_fn (vm, node, frame, VLIB_RX, SPAN_FEAT_DEVICE); } VLIB_NODE_FN (span_output_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { return span_node_inline_fn (vm, node, frame, VLIB_TX, SPAN_FEAT_DEVICE); } VLIB_NODE_FN (span_l2_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { return span_node_inline_fn (vm, node, frame, VLIB_RX, SPAN_FEAT_L2); } VLIB_NODE_FN (span_l2_output_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { return span_node_inline_fn (vm, node, frame, VLIB_TX, SPAN_FEAT_L2); } #define span_node_defs \ .vector_size = sizeof (u32), \ .format_trace = format_span_trace, \ .type = VLIB_NODE_TYPE_INTERNAL, \ .n_errors = ARRAY_LEN(span_error_strings), \ .error_strings = span_error_strings, \ .n_next_nodes = 0, \ .next_nodes = { \ [0] = "error-drop" \ } /* *INDENT-OFF* */ VLIB_REGISTER_NODE (span_input_node) = { span_node_defs, .name = "span-input", }; VLIB_REGISTER_NODE (span_output_node) = { span_node_defs, .name = "span-output", }; VLIB_REGISTER_NODE (span_l2_input_node) = { span_node_defs, .name = "span-l2-input", }; VLIB_REGISTER_NODE (span_l2_output_node) = { span_node_defs, .name = "span-l2-output", }; #ifndef CLIB_MARCH_VARIANT clib_error_t *span_init (vlib_main_t * vm) { span_main_t *sm = &span_main; sm->vlib_main = vm; sm->vnet_main = vnet_get_main (); /* Initialize the feature next-node indexes */ feat_bitmap_init_next_nodes (vm, span_l2_input_node.index, L2INPUT_N_FEAT, l2input_get_feat_names (), sm->l2_input_next); feat_bitmap_init_next_nodes (vm, span_l2_output_node.index, L2OUTPUT_N_FEAT, l2output_get_feat_names (), sm->l2_output_next); return 0; } VLIB_INIT_FUNCTION (span_init); /* *INDENT-ON* */ #endif /* CLIB_MARCH_VARIANT */ #undef span_node_defs /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */