summaryrefslogtreecommitdiffstats
path: root/src/vnet/buffer.h
AgeCommit message (Expand)AuthorFilesLines
2019-09-26ip: add shallow virtual reassembly functionalityKlement Sekera1-7/+32
2019-07-22gso: Fix the l3 packet gso segment sizeMohsin Kazmi1-1/+4
2019-07-05sctp: move to plugins, disabled by defaultFlorin Coras1-14/+0
2019-06-21tcp: add option to pass opaque to next nodeFlorin Coras1-1/+5
2019-06-18ipsec: ipsec-tun protectNeale Ranns1-0/+1
2019-06-18ip: reassembly-separate feature and custom codeKlement Sekera1-2/+2
2019-06-06DVR: Control the reinject as L2 or L3 based on the output interface typeNeale Ranns1-1/+1
2019-06-06reassembly: support more custom options for appsKlement Sekera1-0/+1
2019-03-29IPSEC-GRE: fixes and API update to common types.Neale Ranns1-1/+0
2019-03-06GBP: use sclass in the DP for policyNeale Ranns1-5/+1
2019-03-04Hash and handoff reassembly fragmentsVijayabhaskar Katamreddy1-0/+2
2019-02-19tap gso: experimental supportAndrew Yourtchenko1-9/+26
2019-01-22GBP: Sclass to src-epg conversionsNeale Ranns1-1/+5
2019-01-02Revert "add ipsecmb plugin"Florin Coras1-4/+0
2019-01-02add ipsecmb pluginKlement Sekera1-0/+4
2018-12-04Add VNET_BUFFER_F_AVAIL definitionsDave Barach1-1/+25
2018-11-30Metadata / opaque formatting belongs in vppDave Barach1-22/+22
2018-09-27IPIP and IPv6 fragmentationOle Troan1-1/+0
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-4/+4
2018-09-10vxlan-gbp: Add support for vxlan gbpMohsin Kazmi1-1/+3
2018-08-03loop counter to prevent infiinte number of look ups per-packetNeale Ranns1-1/+3
2018-07-19Cleanup of handoff codeDamjan Marion1-15/+0
2018-07-02Fixing ip4-reassembly ip6-reassembly non feature node, next_node_index settingVijayabhaskar Katamreddy1-1/+0
2018-06-25MAP: Move MAP-E/T to a plugin.Ole Troan1-8/+0
2018-06-08Adding pad for reasm vnet_buffer reasm struct sothat adj_index is retainedVijayabhaskar Katamreddy1-0/+1
2018-06-04Remove unused GRE buffer meta-dataNeale Ranns1-6/+0
2018-05-17Packet generator: preserve pcap file timestampsDave Barach1-0/+5
2018-04-27A bit of buffer metadata reshuffling to accommodate flow_idDamjan Marion1-1/+2
2018-04-13GBP V2Neale Ranns1-1/+7
2018-03-21reassembly: feature/concurrencyKlement Sekera1-8/+17
2018-03-16QoS recording and markingNeale Ranns1-5/+21
2018-03-09MPLS Unifom modeNeale Ranns1-0/+2
2018-02-21SCTP: minor refactorMarco Varlese1-1/+1
2018-02-17SCTP: 'multi-home' supportMarco Varlese1-0/+1
2018-02-07Refactor vlib_buffer flagsDamjan Marion1-26/+7
2018-02-01IPv4/6 reassemblyKlement Sekera1-0/+12
2018-01-31Fix VNET_BUFFER_F_SPAN_CLONE flagDamjan Marion1-1/+1
2018-01-29DRAFT ip4/6_frag to support DPO Style based Next NodeVijayabhaskar Katamreddy1-0/+1
2018-01-24SCTP stack (RFC4960)Marco Varlese1-0/+13
2018-01-09DVR: run L3 output featuresNeale Ranns1-0/+24
2017-12-09BIER in non-MPLS netowrksNeale Ranns1-11/+9
2017-11-21dpdk: add l2_hdr_offset and l3_hdr_offset in vlib_buffer_tDamjan Marion1-15/+19
2017-11-09BIERNeale Ranns1-0/+12
2017-10-19VPP-1024: rewrite buffer trajectory tracerDave Barach1-0/+17
2017-10-10session: add support for application namespacingFlorin Coras1-2/+8
2017-10-09NAT: hairpinning rework (VPP-1003)Matus Fabian1-1/+2
2017-10-03Update L2FIB entry timestamp only if BD aging enabled (VPP-1002)John Lo1-0/+1
2017-07-21SNAT: in2out translation as an output feature hairpinning (VPP-913)Matus Fabian1-0/+6
2017-07-18TCP/UDP checksum offload APIDave Barach1-1/+6
2017-07-14vnet_buffer_t flags cleanupDamjan Marion1-25/+24
_keys); tm->n_hash_keys = clib_max (tm->n_keys, tm->n_hash_keys); qhash_resize (tm->qhash, tm->n_hash_keys); { qhash_t *h = qhash_header (tm->qhash); int i; for (i = 0; i < ARRAY_LEN (h->hash_seeds); i++) h->hash_seeds[i] = random_uword (&tm->seed); } vec_resize (tm->lookup_keys, tm->max_vector); vec_resize (tm->lookup_key_indices, tm->max_vector); vec_resize (tm->lookup_results, tm->max_vector); for (iter = 0; iter < tm->n_iter; iter++) { uword *p, j, n, is_set; n = tm->max_vector; is_set = random_u32 (&tm->seed) & 1; is_set |= hash_elts (tm->hash) < (tm->n_keys / 4); if (hash_elts (tm->hash) > (3 * tm->n_keys) / 4) is_set = 0; _vec_len (tm->lookup_keys) = n; _vec_len (tm->lookup_key_indices) = n; j = 0; while (j < n) { i = random_u32 (&tm->seed) % vec_len (tm->keys); if (clib_bitmap_get (tm->keys_in_hash_bitmap, i) != is_set) { f64 t[2]; tm->lookup_key_indices[j] = i; tm->lookup_keys[j] = tm->keys[i]; t[0] = clib_time_now (&tm->time); if (is_set) hash_set (tm->hash, tm->keys[i], i); else hash_unset (tm->hash, tm->keys[i]); t[1] = clib_time_now (&tm->time); if (is_set) tm->hash_set_time += t[1] - t[0]; else tm->hash_unset_time += t[1] - t[0]; tm->keys_in_hash_bitmap = clib_bitmap_set (tm->keys_in_hash_bitmap, i, is_set); j++; } } { f64 t[2]; if (is_set) { t[0] = clib_time_now (&tm->time); qhash_set_multiple (tm->qhash, tm->lookup_keys, vec_len (tm->lookup_keys), tm->lookup_results); t[1] = clib_time_now (&tm->time); tm->set_time += t[1] - t[0]; tm->set_count += vec_len (tm->lookup_keys); for (i = 0; i < vec_len (tm->lookup_keys); i++) { uword r = tm->lookup_results[i]; *vec_elt_at_index (tm->qhash, r) = tm->lookup_key_indices[i]; } } else { t[0] = clib_time_now (&tm->time); qhash_unset_multiple (tm->qhash, tm->lookup_keys, vec_len (tm->lookup_keys), tm->lookup_results); t[1] = clib_time_now (&tm->time); tm->unset_time += t[1] - t[0]; tm->unset_count += vec_len (tm->lookup_keys); for (i = 0; i < vec_len (tm->lookup_keys); i++) { uword r = tm->lookup_results[i]; *vec_elt_at_index (tm->qhash, r) = ~0; } } } if (qhash_elts (tm->qhash) != hash_elts (tm->hash)) os_panic (); { qhash_t *h; uword i, k, l, count; h = qhash_header (tm->qhash); for (i = k = 0; k < vec_len (h->hash_key_valid_bitmap); k++) i += count_set_bits (h->hash_key_valid_bitmap[k]); k = hash_elts (h->overflow_hash); l = qhash_elts (tm->qhash); if (i + k != l) os_panic (); count = hash_elts (h->overflow_hash); for (i = 0; i < (1 << h->log2_hash_size); i++) count += tm->qhash[i] != ~0; if (count != qhash_elts (tm->qhash)) os_panic (); { u32 *tmp = 0; /* *INDENT-OFF* */ hash_foreach (k, l, h->overflow_hash, ({ j = qhash_hash_mix (h, k) / QHASH_KEYS_PER_BUCKET; vec_validate (tmp, j); tmp[j] += 1; })); /* *INDENT-ON* */ for (k = 0; k < vec_len (tmp); k++) { if (k >= vec_len (h->overflow_counts)) os_panic (); if (h->overflow_counts[k] != tmp[k]) os_panic (); } for (; k < vec_len (h->overflow_counts); k++) if (h->overflow_counts[k] != 0) os_panic (); vec_free (tmp); } } { f64 t[2]; t[0] = clib_time_now (&tm->time); qhash_get_multiple (tm->qhash, tm->keys, vec_len (tm->keys), tm->get_multiple_results); t[1] = clib_time_now (&tm->time); tm->get_time += t[1] - t[0]; for (i = 0; i < vec_len (tm->keys); i++) { u32 r; t[0] = clib_time_now (&tm->time); p = hash_get (tm->hash, tm->keys[i]); t[1] = clib_time_now (&tm->time); tm->hash_get_time += t[1] - t[0]; r = qhash_get (tm->qhash, tm->keys[i]); if (p) { if (p[0] != i) os_panic (); if (*vec_elt_at_index (tm->qhash, r) != i) os_panic (); } else { if (r != ~0) os_panic (); } if (r != tm->get_multiple_results[i]) os_panic (); } } tm->overflow_fraction += ((f64) qhash_n_overflow (tm->qhash) / qhash_elts (tm->qhash)); tm->ave_elts += qhash_elts (tm->qhash); } fformat (stderr, "%d iter %.6e overflow, %.4f ave. elts\n", tm->n_iter, tm->overflow_fraction / tm->n_iter, tm->ave_elts / tm->n_iter); tm->get_time /= tm->n_iter * vec_len (tm->keys); tm->hash_get_time /= tm->n_iter * vec_len (tm->keys); tm->set_time /= tm->set_count; tm->unset_time /= tm->unset_count; tm->hash_set_time /= tm->set_count; tm->hash_unset_time /= tm->unset_count; fformat (stderr, "get/set/unset clocks %.2e %.2e %.2e clib %.2e %.2e %.2e ratio %.2f %.2f %.2f\n", tm->get_time * tm->time.clocks_per_second, tm->set_time * tm->time.clocks_per_second, tm->unset_time * tm->time.clocks_per_second, tm->hash_get_time * tm->time.clocks_per_second, tm->hash_set_time * tm->time.clocks_per_second, tm->hash_unset_time * tm->time.clocks_per_second, tm->hash_get_time / tm->get_time, tm->hash_set_time / tm->set_time, tm->hash_unset_time / tm->unset_time); done: return error; } #ifdef CLIB_UNIX int main (int argc, char *argv[]) { unformat_input_t i; clib_error_t *error; unformat_init_command_line (&i, argv); error = test_qhash_main (&i); unformat_free (&i); if (error) { clib_error_report (error); return 1; } else return 0; } #endif /* CLIB_UNIX */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */