summaryrefslogtreecommitdiffstats
path: root/src/plugins/unittest/tcp_test.c
AgeCommit message (Expand)AuthorFilesLines
2021-04-05tcp: time infra improvementsFlorin Coras1-12/+19
2020-10-26tcp: byte tracker fixRyujiro Shibuya1-0/+215
2020-10-23tcp: remove snd_una_maxFlorin Coras1-8/+2
2020-09-09tcp: fix the tcp unittest to workRyujiro Shibuya1-0/+2
2020-08-20tcp: track reorder with sacksFlorin Coras1-1/+5
2020-05-25tcp: fix sack block validation on wrapFlorin Coras1-0/+26
2020-04-02tcp: move features to separate filesFlorin Coras1-0/+1
2020-02-12tcp: move connections to wrk ctxFlorin Coras1-11/+3
2020-01-14tcp: handle ack advancement with no holes and renegingFlorin Coras1-1/+35
2020-01-08tcp: fix last sacked with no holesFlorin Coras1-0/+44
2020-01-07tcp: fix duplicate sack whith renegingFlorin Coras1-11/+99
2019-11-20session tcp: support pacer idle timeoutsFlorin Coras1-1/+1
2019-10-23tcp: improve rate samples for retansmitted segmentsFlorin Coras1-14/+18
2019-10-03tcp: unittest: do not access non-existent samplesBenoƮt Ganne1-1/+0
2019-09-18tcp: compute snd time for rate sampleFlorin Coras1-23/+17
2019-09-11tcp: handle sack renegingFlorin Coras1-43/+77
2019-08-23tcp: fix byte tracker samples flushFlorin Coras1-0/+13
2019-08-21tcp: add option for always on event loggingFlorin Coras1-1/+1
2019-07-10tcp: improve rate estimateFlorin Coras1-10/+13
2019-06-26tcp session: improvement to testsFlorin Coras1-8/+21
2019-06-25tcp: delivery rate estimatorFlorin Coras1-0/+312
2019-06-17session: use listener_handle instead of listener_indexNathan Skrzypczak1-1/+1
2019-04-19svm: move fifo tests to a separate fileFlorin Coras1-1160/+1
2019-04-19svm: support addition of chunks to fifosFlorin Coras1-2/+135
2019-04-18svm: allow indirect fifo data chunksFlorin Coras1-3/+3
2019-04-16svm_fifo rework to avoid contention on cursizeSirshak Das1-2/+1
2019-03-22tcp: improve handling of snd_nxtFlorin Coras1-2/+2
2019-03-02session: cleanup/rename functionsFlorin Coras1-1/+1
2019-02-18session: move fifo allocation logic to app workerFlorin Coras1-1/+1
2019-02-09session: refactor listen logicFlorin Coras1-1/+1
2019-02-04session: cleanup part 1Florin Coras1-1/+1
2018-12-28session: free session after transport and app confirmFlorin Coras1-1/+1
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-2/+2
2018-10-31session: add wrk contextFlorin Coras1-5/+5
2018-10-23c11 safe string handling supportDave Barach1-8/+8
2018-10-21tcp: count first lost hole (VPP-1465)Florin Coras1-3/+29
2018-10-18tcp: fix sacks lost bytes counting (VPP-1465)Florin Coras1-34/+90
2018-10-18tls: fix connection failures/interrupts at scale (VPP-1464)Florin Coras1-2/+3
2018-10-17tcp: avoid sack processing when not needed (VPP-1460)Florin Coras1-1/+1
2018-07-24Create a unit-test pluginDave Barach1-0/+1779
>, *h1; bi0 = to_next[0] = from[0]; bi1 = to_next[1] = from[1]; from += 2; n_left_from -= 2; to_next += 2; n_left_to_next -= 2; b0 = vlib_get_buffer (vm, bi0); b1 = vlib_get_buffer (vm, bi1); l2_len0 = vnet_buffer (b0)->l2.l2_len; l2_len1 = vnet_buffer (b1)->l2.l2_len; h0 = vlib_buffer_get_current (b0); h1 = vlib_buffer_get_current (b1); ether_type0 = clib_net_to_host_u16 (*(u16 *) (h0 + l2_len0 - 2)); ether_type1 = clib_net_to_host_u16 (*(u16 *) (h1 + l2_len1 - 2)); sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX]; sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_RX]; /* * only extract unicast */ if (PREDICT_TRUE (!(h0[0] & 0x1))) { switch (ether_type0) { case ETHERNET_TYPE_IP4: ASSERT (em->l2_emulations[sw_if_index0].enabled); ++ip4_hits; next0 = L2_EMULATION_NEXT_IP4; vlib_buffer_advance (b0, l2_len0); break; case ETHERNET_TYPE_IP6: ASSERT (em->l2_emulations[sw_if_index0].enabled); ++ip6_hits; next0 = L2_EMULATION_NEXT_IP6; vlib_buffer_advance (b0, l2_len0); default: break; } } if (PREDICT_TRUE (!(h1[0] & 0x1))) { switch (ether_type1) { case ETHERNET_TYPE_IP4: ASSERT (em->l2_emulations[sw_if_index1].enabled); ++ip4_hits; next1 = L2_EMULATION_NEXT_IP4; vlib_buffer_advance (b1, l2_len1); break; case ETHERNET_TYPE_IP6: ASSERT (em->l2_emulations[sw_if_index1].enabled); ++ip6_hits; next1 = L2_EMULATION_NEXT_IP6; vlib_buffer_advance (b1, l2_len1); default: break; } } if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE) && (b0->flags & VLIB_BUFFER_IS_TRACED))) { l2_emulation_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t)); t->extracted = (next0 != ~0); } if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE) && (b1->flags & VLIB_BUFFER_IS_TRACED))) { l2_emulation_trace_t *t = vlib_add_trace (vm, node, b1, sizeof (*t)); t->extracted = (next1 != ~0); } /* Determine the next node and remove ourself from bitmap */ if (PREDICT_TRUE (next0 == ~0)) next0 = vnet_l2_feature_next (b0, em->l2_input_feat_next, L2INPUT_FEAT_L2_EMULATION); /* Determine the next node and remove ourself from bitmap */ if (PREDICT_TRUE (next1 == ~0)) next1 = vnet_l2_feature_next (b1, em->l2_input_feat_next, L2INPUT_FEAT_L2_EMULATION); 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) { vlib_buffer_t *b0; u32 sw_if_index0; u16 ether_type0; u32 next0 = ~0; u8 l2_len0; u32 bi0; u8 *h0; 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); l2_len0 = vnet_buffer (b0)->l2.l2_len; h0 = vlib_buffer_get_current (b0); ether_type0 = clib_net_to_host_u16 (*(u16 *) (h0 + l2_len0 - 2)); sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX]; /* * only extract unicast */ if (PREDICT_TRUE (!(h0[0] & 0x1))) { switch (ether_type0) { case ETHERNET_TYPE_IP4: ASSERT (em->l2_emulations[sw_if_index0].enabled); ++ip4_hits; next0 = L2_EMULATION_NEXT_IP4; vlib_buffer_advance (b0, l2_len0); break; case ETHERNET_TYPE_IP6: ASSERT (em->l2_emulations[sw_if_index0].enabled); ++ip6_hits; next0 = L2_EMULATION_NEXT_IP6; vlib_buffer_advance (b0, l2_len0); default: break; } } if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE) && (b0->flags & VLIB_BUFFER_IS_TRACED))) { l2_emulation_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t)); t->extracted = (next0 != ~0); } /* Determine the next node and remove ourself from bitmap */ if (PREDICT_TRUE (next0 == ~0)) next0 = vnet_l2_feature_next (b0, em->l2_input_feat_next, L2INPUT_FEAT_L2_EMULATION); /* 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); } vlib_node_increment_counter (vm, node->node_index, L2_EMULATION_ERROR_IP4, ip4_hits); vlib_node_increment_counter (vm, node->node_index, L2_EMULATION_ERROR_IP6, ip6_hits); return frame->n_vectors; } /* *INDENT-OFF* */ VLIB_REGISTER_NODE (l2_emulation_node) = { .name = "l2-emulation", .vector_size = sizeof (u32), .format_trace = format_l2_emulation_trace, .type = VLIB_NODE_TYPE_INTERNAL, .n_errors = ARRAY_LEN(l2_emulation_error_strings), .error_strings = l2_emulation_error_strings, .n_next_nodes = L2_EMULATION_N_NEXT, /* edit / add dispositions here */ .next_nodes = { [L2_EMULATION_NEXT_IP4] = "ip4-input", [L2_EMULATION_NEXT_IP6] = "ip6-input", }, }; /* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */