summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan
AgeCommit message (Expand)AuthorFilesLines
2020-03-30vxlan: leverage vlib_get_buffers in vxlan_encap_inlineZhiyong Yang1-12/+14
2020-03-16vxlan: vxlan/vxlan.api API cleanupJakub Grajciar2-38/+47
2020-03-03geneve gtpu vxlan vxlan-gpe: VRF-aware bypass nodeNick Zavaritsky3-93/+30
2020-02-17misc: fix coverity warningsDave Barach1-2/+2
2020-01-10docs: Edit FEATURE.yaml files so they can be publishedJohn DeNisco1-2/+2
2020-01-04vxlan: Add FEATURE.yamlJohn Lo2-1/+15
2019-12-20vxlan: reuse inner packet flow hash for tunnel outer header load balanceShawn Ji1-0/+7
2019-12-17vxlan geneve gtpu: fix short helpPaul Vinciguerra1-1/+1
2019-12-10api: multiple connections per processDave Barach1-1/+1
2019-12-05vxlan: fix vxlan hw offload issueChenmin Sun1-1/+3
2019-11-26fib: reduce save_rewrite_length to u8Klement Sekera1-1/+1
2019-08-05vxlan: fix VXLANoIP6 checksum offload setupJohn Lo1-4/+3
2019-07-19fib: FIB Entry trackingNeale Ranns1-7/+7
2019-06-18fib: fib api updatesNeale Ranns1-7/+5
2019-06-04features will register udp ports once configuredJakub Grajciar1-5/+11
2019-03-28Typos. A bunch of typos I've been collecting.Paul Vinciguerra1-1/+1
2019-03-26Simplify adjacency rewrite codeBenoƮt Ganne1-12/+2
2019-03-06vxlan*: migrate old MULTIARCH macros to VLIB_NODE_FNFilip Tehlar1-10/+4
2019-01-09VXLAN: Prevent duplicate bypass graph nodes.Jon Loeliger2-4/+37
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach1-3/+3
2018-11-05vxlan: prefetch extra one cacheline holding external headerZhiyong Yang1-2/+2
2018-10-23c11 safe string handling supportDave Barach3-5/+5
2018-10-17vxlan:decap caching error (VPP-1462)Eyal Bari1-1/+1
2018-10-14vxlan:fix ip6 tunnel deletionEyal Bari1-1/+2
2018-10-05vxlan:ip4 decap:remove access to tunnel objectEyal Bari3-183/+190
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra4-12/+12
2018-09-06vxlan: improve encap performanceZhiyong Yang1-2/+10
2018-08-28vxlan: decap use vlib_buffer_enqueue_to_nextEyal Bari2-255/+221
2018-08-01vxlan:optimize cached entry compareEyal Bari1-9/+5
2018-07-31vxlan:decap.c conform coding styleEyal Bari1-620/+690
2018-07-31fix 'sh vxlan tunnels'Neale Ranns1-15/+4
2018-07-23fix vector index range checksEyal Bari1-1/+1
2018-07-19Remove unused argument to vlib_feature_nextDamjan Marion1-3/+3
2018-07-09vxlan:use bihash_16_8 for ipv4 lookupEyal Bari3-66/+76
2018-07-05vxlan:use bihash_24_8 for ipv6 lookupEyal Bari3-116/+167
2018-06-14vxlan:use VLIB_NODE_FN for multiarch selectionEyal Bari1-17/+1
2018-06-13vxlan:offload RX floweyal bari5-1/+579
2018-05-07vxlan:vxlan.c conform coding styleEyal Bari1-354/+374
2018-05-04Harmonize vec/pool_get_aligned object sizes and alignment requestsDave Barach1-0/+3
2018-05-02Fix CentOS 7 build issue with vxlanMatthew Smith1-2/+4
2018-05-02vxlan:encap - use vnet rewriteeyal bari3-53/+50
2018-04-25Carry recorded QOS bits in the outer VXLAN IP headerIgor Mikhailov (imichail)1-0/+35
2018-04-25vxlan:remove single bucket load-balance dpo'sEyal Bari1-9/+23
2018-04-17vxlan:remove counters writeback cacheEyal Bari2-519/+242
2018-03-27vxlan:refactor add del command functionEyal Bari1-102/+43
2018-03-09MPLS Unifom modeNeale Ranns1-1/+0
2018-02-23VXLAN: Instance numbers now properly freed upon delete.Jon Loeliger1-1/+1
2018-02-16Minor VXLAN/GRE Tunnel Encap Optimization and CleanupJohn Lo2-22/+33
2018-02-15Optimize GRE Tunnel and add support for ERSPAN encapJohn Lo1-4/+0
2018-02-14vxlan:remove interface recycle mechanismEyal Bari2-69/+11
span class="n">result = 0; if (i < vec_len (ps.path)) result = (char *) format (0, "%s/%s%c", ps.path[i], file); path_search_free (&ps); return result; } static clib_error_t * clib_elf_parse_file (clib_elf_main_t * cem, char *file_name, void *link_address) { elf_main_t *em; elf_section_t *s; int fd; struct stat fd_stat; uword mmap_length = 0; void *data = 0; clib_error_t *error = 0; vec_add2 (cem->elf_mains, em, 1); fd = open (file_name, 0); if (fd < 0) { error = clib_error_return_unix (0, "open `%s'", file_name); goto done; } if (fstat (fd, &fd_stat) < 0) { error = clib_error_return_unix (0, "fstat `%s'", file_name); goto done; } mmap_length = fd_stat.st_size; data = mmap (0, mmap_length, PROT_READ, MAP_SHARED, fd, /* offset */ 0); if (~pointer_to_uword (data) == 0) { error = clib_error_return_unix (0, "mmap `%s'", file_name); goto done; } error = elf_parse (em, data, mmap_length); if (error) goto done; /* Look for CLIB special sections. */ { char *section_name_start = CLIB_ELF_SECTION_ADD_PREFIX (); uword section_name_start_len = strlen (section_name_start); vec_foreach (s, em->sections) { u8 *name = elf_section_name (em, s); uword *p; clib_elf_section_t *vs; clib_elf_section_bounds_t *b; /* Section name must begin with CLIB_ELF_SECTION key. */ if (memcmp (name, section_name_start, section_name_start_len)) continue; name += section_name_start_len; p = hash_get_mem (cem->section_by_name, name); if (p) vs = vec_elt_at_index (cem->sections, p[0]); else { name = format (0, "%s%c", name, 0); if (!cem->section_by_name) cem->section_by_name = hash_create_string (0, sizeof (uword)); hash_set_mem (cem->section_by_name, name, vec_len (cem->sections)); vec_add2 (cem->sections, vs, 1); vs->name = name; } vec_add2 (vs->bounds, b, 1); b->lo = link_address + s->header.exec_address; b->hi = b->lo + s->header.file_size; } } /* Parse symbols for this file. */ { elf_symbol_table_t *t; elf64_symbol_t *s; elf_parse_symbols (em); vec_foreach (t, em->symbol_tables) { vec_foreach (s, t->symbols) { s->value += pointer_to_uword (link_address); } } } /* No need to keep section contents around. */ { elf_section_t *s; vec_foreach (s, em->sections) { if (s->header.type != ELF_SECTION_STRING_TABLE) vec_free (s->contents); } } done: if (error) elf_main_free (em); if (fd >= 0) close (fd); if (data) munmap (data, mmap_length); return error; } #define __USE_GNU #include <link.h> static int add_section (struct dl_phdr_info *info, size_t size, void *opaque) { clib_elf_main_t *cem = opaque; clib_error_t *error; char *name = (char *) info->dlpi_name; void *addr = (void *) info->dlpi_addr; uword is_main; is_main = strlen (name) == 0; if (is_main) { static int done; /* Only do main program once. */ if (done++) return 0; name = path_search (cem->exec_path); if (!name) { clib_error ("failed to find %s on PATH", cem->exec_path); return 0; } addr = 0; } error = clib_elf_parse_file (cem, name, addr); if (error) clib_error_report (error); if (is_main && name != cem->exec_path) vec_free (name); return 0; } static clib_elf_main_t clib_elf_main; void clib_elf_main_init (char *exec_path) { clib_elf_main_t *cem = &clib_elf_main; cem->exec_path = exec_path; dl_iterate_phdr (add_section, cem); } clib_elf_section_bounds_t * clib_elf_get_section_bounds (char *name) { clib_elf_main_t *em = &clib_elf_main; uword *p = hash_get (em->section_by_name, name); return p ? vec_elt_at_index (em->sections, p[0])->bounds : 0; } static uword symbol_by_address_or_name (char *by_name, uword by_address, clib_elf_symbol_t * s) { clib_elf_main_t *cem = &clib_elf_main; elf_main_t *em; vec_foreach (em, cem->elf_mains) { elf_symbol_table_t *t; s->elf_main_index = em - cem->elf_mains; vec_foreach (t, em->symbol_tables) { s->symbol_table_index = t - em->symbol_tables; if (by_name) { uword *p = hash_get (t->symbol_by_name, by_name); if (p) { s->symbol = vec_elt (t->symbols, p[0]); return 1; } } else { elf64_symbol_t *x; /* FIXME linear search. */ vec_foreach (x, t->symbols) { if (by_address >= x->value && by_address < x->value + x->size) { s->symbol = x[0]; return 1; } } } } } return 0; } uword clib_elf_symbol_by_name (char *by_name, clib_elf_symbol_t * s) { return symbol_by_address_or_name (by_name, /* by_address */ 0, s); } uword clib_elf_symbol_by_address (uword by_address, clib_elf_symbol_t * s) { return symbol_by_address_or_name ( /* by_name */ 0, by_address, s); } u8 * format_clib_elf_symbol (u8 * s, va_list * args) { clib_elf_main_t *cem = &clib_elf_main; clib_elf_symbol_t *sym = va_arg (*args, clib_elf_symbol_t *); elf_main_t *em; elf_symbol_table_t *t; if (!sym) /* Just print table headings. */ return format (s, "%U", format_elf_symbol, 0, 0, 0); else { em = vec_elt_at_index (cem->elf_mains, sym->elf_main_index); t = vec_elt_at_index (em->symbol_tables, sym->symbol_table_index); return format (s, "%U", format_elf_symbol, em, t, &sym->symbol); } } u8 * format_clib_elf_symbol_with_address (u8 * s, va_list * args) { uword address = va_arg (*args, uword); clib_elf_main_t *cem = &clib_elf_main; clib_elf_symbol_t sym; elf_main_t *em; elf_symbol_table_t *t; if (clib_elf_symbol_by_address (address, &sym)) { em = vec_elt_at_index (cem->elf_mains, sym.elf_main_index); t = vec_elt_at_index (em->symbol_tables, sym.symbol_table_index); s = format (s, "%s + 0x%wx", elf_symbol_name (t, &sym.symbol), address - sym.symbol.value); } else s = format (s, "0x%wx", address); return s; } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */