summaryrefslogtreecommitdiffstats
path: root/build-root
AgeCommit message (Expand)AuthorFilesLines
2017-05-29Relocate Coverity scriptsChris Luke2-89/+0
2017-05-29Update CSIT tests 170518 -> 170529Jan Gelety1-1/+1
2017-05-24Simple script to 'git blame' on new Coverity issuesChris Luke1-0/+36
2017-05-18Update CSIT tests 170504 -> 170518Jan Gelety1-1/+1
2017-05-15move to CSIT 170504Neale Ranns1-1/+1
2017-04-26Move scripts to extras/Damjan Marion3-133/+0
2017-04-24Move emacs stuff to extras/Damjan Marion27-3251/+1
2017-04-20Move vagrant stuff to extras/Damjan Marion11-401/+1
2017-04-20Extend ebuild to specify "configure" subdir, enable verify for sample-pluginDamjan Marion1-2/+4
2017-04-19Fix "make dist" to include version number, docouple it from rpm packagingDamjan Marion3-343/+0
2017-04-03Update CSIT tests 170313 -> 170403Jan Gelety1-1/+1
2017-03-27Python API: Fixup of debian package after cFFI changes.Ole Troan4-15/+8
2017-03-17Python API: Fix RPM packaging (again).Ole Troan1-4/+6
2017-03-15Python API: Change from cPython to CFFI.Ole Troan1-9/+3
2017-03-14Update CSIT tests 170302 -> 170313Jan Gelety1-1/+1
2017-03-04Fix duplicate binary API registration messages / bugsDave Barach1-2/+2
2017-03-02Update CSIT tests 170220 -> 170302Jan Gelety1-1/+1
2017-02-24Fixed QAT device binding and device unbinding when vpp package is removedRadu Nicolau2-2/+2
2017-02-22VPP-635: CLI Memory leak with invalid parameterBilly McFall1-4/+15
2017-02-20Update CSIT tests 170213 -> 170220Jan Gelety1-1/+1
2017-02-14Update CSIT tests 170129 -> 170213Jan Gelety1-1/+1
2017-02-10Update plugin templatesDave Barach3-118/+106
2017-02-04dpdk: move to uio_pci_genericDamjan Marion3-5/+5
2017-02-02Refactor fragile msg macro W and W2 to not burry return control flow.Jon Loeliger1-1/+3
2017-02-02Localize the timeout variable within the W message macro.Jon Loeliger1-2/+1
2017-02-02Convert message macro S to accept a message pointer parameter;Jon Loeliger1-2/+2
2017-02-02Convert M() and M2() macros to honor their second, mp, parameter.Jon Loeliger1-2/+2
2017-02-02Ensure all M() and M2() second parameters are the message pointer.Jon Loeliger1-1/+1
2017-02-02Update default Vagrant box to Ubuntu 16.04, VPP-616Dave Wallace3-12/+22
2017-01-31Prep work for Coverity upload processing via JenkinsDave Barach1-0/+53
2017-01-31Update CSIT tests 170122 -> 170129Jan Gelety1-1/+1
2017-01-27package only the vpp binaries (rpm)Gabriel Ganne1-1/+1
2017-01-25Update CSIT tests 170108 -> 170122Jan Gelety1-1/+1
2017-01-20Add dpdk development packagingDamjan Marion6-54/+2
2017-01-17vagrant: stop rsync from wiping changes from /vppPadraig Connolly1-15/+18
2017-01-17fix rpm warnings for defattr directory of lua/*Gabriel Ganne1-1/+1
2017-01-13Fix remove-rpath script, take 2Damjan Marion1-1/+1
2017-01-13Fix remove-rpath scriptDamjan Marion1-1/+1
2017-01-13vppctl: new bash completion for vppctl commandsPadraig Connolly1-0/+6
2017-01-11Remove unnecessary build macro to fix slow builds.Thomas F Herbert1-4/+0
2017-01-11Makefile.am cleanupDamjan Marion2-41/+1
2017-01-10Revert "vppctl: bash completion for vppctl commands"Damjan Marion2-8/+1
2017-01-09vppctl: bash completion for vppctl commandsPadraig Connolly2-1/+8
2017-01-09Update CSIT tests 170101 -> 170108Jan Gelety1-1/+1
2017-01-04rename vpp python's api debian scriptsGabriel Ganne2-0/+0
2017-01-03fix version.h generation for out-of-tree buildsDamjan Marion1-54/+1
2017-01-03Do not require external vppapigen when not cross-compilingDamjan Marion1-1/+0
2017-01-03deb: fix issues in debian/control, silence some warningsDamjan Marion2-7/+12
2017-01-03vpp-python-api deb packaging - use easy_install to install the python apiroot2-0/+13
2017-01-02Update CSIT tests 161218 -> 170101Jan Gelety1-1/+1
ass="o">== face_id) return 0; /* Add the next hop in the vrf 0 which will add it to the entry in the hICN vrf */ hicn_dpo_ctx_t * strategy_ctx = (hicn_dpo_ctx_t *)tfib; const fib_prefix_t * prefix = fib_entry_get_prefix(strategy_ctx->fib_entry_index); hicn_face_t * face = hicn_dpoi_get_from_idx(face_id); ip_nh_add_helper(face->dpo.dpoi_proto, prefix, &face->nat_addr, face->sw_if); return 0; } /** * Add a 'previous' hop to the TFIB * * XXX we should have the for look in the reverse order for simpler code. */ static_always_inline int hicn_mapme_tfib_add (hicn_mapme_tfib_t * tfib, hicn_face_id_t face_id) { u8 pos = HICN_PARAM_FIB_ENTRY_NHOPS_MAX - tfib->tfib_entry_count; //XXX don 't add if it already exist // eg.an old IU received on a face on which we are retransmitting for (u8 pos2 = pos; pos2 < HICN_PARAM_FIB_ENTRY_NHOPS_MAX; pos2++) if (tfib->next_hops[pos2] == face_id) return 0; //Make sure we have enough room if (pos <= tfib->entry_count) return -1; tfib->next_hops[pos - 1] = face_id; tfib->tfib_entry_count++; /* * Take a lock on the face as if it will be removed from the next_hops a * lock will be removed. */ hicn_face_lock_with_id(face_id); return 0; } static_always_inline int hicn_mapme_tfib_clear (hicn_mapme_tfib_t * tfib) { hicn_face_id_t invalid = NEXT_HOP_INVALID; /* * We need to do a linear scan of TFIB entries to find the one to * remove */ u8 start_pos = HICN_PARAM_FIB_ENTRY_NHOPS_MAX - tfib->tfib_entry_count; u8 pos = ~0; for (pos = start_pos; pos < HICN_PARAM_FIB_ENTRY_NHOPS_MAX; pos++) { hicn_face_unlock_with_id (tfib->next_hops[pos]); tfib->next_hops[pos] = invalid; break; } tfib->tfib_entry_count = 0; return 0; } static_always_inline int hicn_mapme_tfib_del (hicn_mapme_tfib_t * tfib, hicn_face_id_t face_id) { hicn_face_id_t invalid = NEXT_HOP_INVALID; /* * We need to do a linear scan of TFIB entries to find the one to * remove */ u8 start_pos = HICN_PARAM_FIB_ENTRY_NHOPS_MAX - tfib->tfib_entry_count; u8 pos = ~0; for (pos = start_pos; pos < HICN_PARAM_FIB_ENTRY_NHOPS_MAX; pos++) if (tfib->next_hops[pos] == face_id) { hicn_face_unlock_with_id (tfib->next_hops[pos]); tfib->next_hops[pos] = invalid; break; } if (pos == HICN_PARAM_FIB_ENTRY_NHOPS_MAX) /* Not found */ return -1; tfib->tfib_entry_count--; /* Likely we won't receive a new IU twice from the same face */ if (PREDICT_TRUE (pos > start_pos)) memmove (tfib->next_hops + start_pos +1 , tfib->next_hops + start_pos, (pos - start_pos) * sizeof (hicn_face_id_t)); return 0; } /** * @brief Performs an Exact Prefix Match lookup on the FIB * @returns the corresponding DPO (hICN or IP LB), or NULL */ static_always_inline dpo_id_t * fib_epm_lookup (ip46_address_t * addr, u8 plen) { fib_prefix_t fib_pfx; fib_node_index_t fib_entry_index; u32 fib_index; dpo_id_t *dpo_id; load_balance_t *lb; const dpo_id_t *load_balance_dpo_id; /* At this point the face exists in the face table */ fib_prefix_from_ip46_addr (addr, &fib_pfx); fib_pfx.fp_len = plen; /* Check if the route already exist in the fib : EPM */ fib_index = fib_table_find (fib_pfx.fp_proto, HICN_FIB_TABLE); fib_entry_index = fib_table_lookup_exact_match (fib_index, &fib_pfx); if (fib_entry_index == FIB_NODE_INDEX_INVALID) return NULL; load_balance_dpo_id = fib_entry_contribute_ip_forwarding (fib_entry_index); /* The dpo is not a load balance dpo as expected */ if (load_balance_dpo_id->dpoi_type != DPO_LOAD_BALANCE) return NULL; /* former_dpo_id is a load_balance dpo */ lb = load_balance_get (load_balance_dpo_id->dpoi_index); /* Check if there is only one bucket */ /* * We now distinguish the case where we have an hICN route (the * regular case), and the case where we have an IP route, to be able * to apply MAP-Me mechanisms even to a locator IP address. */ for (int i = 0; i < lb->lb_n_buckets; i++) { /* un-const */ dpo_id = (dpo_id_t *) load_balance_get_bucket_i (lb, i); if (dpo_is_hicn (dpo_id)) return dpo_id; } /* un-const */ return (dpo_id_t *) load_balance_dpo_id; } /* DPO types */ extern dpo_type_t hicn_face_udp_type; extern dpo_type_t hicn_face_ip_type; /* VLIB EDGE IDs */ /* in faces/ip/face_ip.c */ extern u32 strategy_face_ip4_vlib_edge; extern u32 strategy_face_ip6_vlib_edge; /* in faces/udp/face_udp.c */ extern u32 strategy_face_udp4_vlib_edge; extern u32 strategy_face_udp6_vlib_edge; /** * @brief Returns the next hop vlib edge on which we can send an Interest packet. * * This is both used to preprocess a dpo that will be stored as a next hop in the FIB, and to determine on which node to send an Interest Update. */ always_inline u32 hicn_mapme_get_dpo_vlib_edge (dpo_id_t * dpo) { if (dpo->dpoi_type == hicn_face_ip_type) { switch (dpo->dpoi_proto) { case DPO_PROTO_IP4: return strategy_face_ip4_vlib_edge; case DPO_PROTO_IP6: return strategy_face_ip6_vlib_edge; default: return ~0; } } else if (dpo->dpoi_type == hicn_face_udp_type) { switch (dpo->dpoi_proto) { case DPO_PROTO_IP4: return strategy_face_udp4_vlib_edge; case DPO_PROTO_IP6: return strategy_face_udp6_vlib_edge; default: return ~0; } } else { return ~0; } } /** * @brief Returns the next hop node on which we can send an Update packet */ always_inline char * hicn_mapme_get_dpo_face_node (hicn_face_id_t face_id) { hicn_face_t * face = hicn_dpoi_get_from_idx(face_id); switch (face->dpo.dpoi_proto) { case DPO_PROTO_IP4: return "hicn4-face-output"; case DPO_PROTO_IP6: return "hicn6-face-output"; default: return NULL; } } #define DEBUG(...) //vlib_log_debug(mapme_main.log_class, __VA_ARGS__) #define WARN(...) //vlib_log_warn(mapme_main.log_class, __VA_ARGS__) #define ERROR(...) //vlib_log_err(mapme_main.log_class, __VA_ARGS__) #endif /* __HICN_MAPME__ */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: eval: (c-set-style "gnu") End: */