summaryrefslogtreecommitdiffstats
AgeCommit message (Expand)AuthorFilesLines
2018-10-05NAT: convert remaining clib_warning to nat_log_*Juraj Sloboda4-30/+30
2018-10-05node_cli: Give the user a hint as to the problem.Paul Vinciguerra1-5/+15
2018-10-05session: fix local session tagging and cleanupFlorin Coras6-9/+11
2018-10-05vhost_user: Add test for interface states and eventsJuraj Sloboda3-3/+71
2018-10-05On interface deletion - make sure any vlan qinq table is clearedJohn Lo1-0/+2
2018-10-05Improve ip_mroute_add_del documentationIan Wells1-4/+24
2018-10-05vxlan:ip4 decap:remove access to tunnel objectEyal Bari3-183/+190
2018-10-04vcl: fix test throughput computationFlorin Coras1-2/+2
2018-10-04Support reassembly for fragments coming to ip4-local nodeJuraj Sloboda4-1/+127
2018-10-04acl-plugin: tuplemerge: avoid batch-resize of the applied entries vector - VP...Andrew Yourtchenko1-2/+6
2018-10-04udp_echo: fix cut-through server modeFlorin Coras3-225/+243
2018-10-04MFIB-API: when programming an (S,G) fix the grp-lenNeale Ranns2-2/+6
2018-10-04clib_count_equal_*: don't read of the end of a small array and init data only...Neale Ranns1-8/+28
2018-10-04VPP-1430: remove unnecessary paddingMarco Varlese2-3/+1
2018-10-04Fix handling of mpls_tunnel_add_del APIJohn Lo3-23/+79
2018-10-03vmxnet3: coverity woeSteven2-12/+12
2018-10-03LISP ONLY: maintain the make-plugin.sh scriptDave Barach1-3/+14
2018-10-03LISP ONLY: maintain the emacs lisp plugin generatorDave Barach8-98/+70
2018-10-03test framework: add shell-style wildcard matching to filenamesAndrew Yourtchenko1-2/+5
2018-10-03ipsec: add missing ipv6 ah code & ipv6 testsKlement Sekera13-321/+629
2018-10-03session: fix first segment manager cleanupFlorin Coras2-4/+5
2018-10-03memif: include interface name in logsJuraj Sloboda3-29/+57
2018-10-03VPP-1440: clean up coverity warningsDave Barach1-2/+2
2018-10-03VPP-1426: CLI crash on 'set int feature'Paul Vinciguerra1-1/+1
2018-10-03sock api: fix registrations and client readsFlorin Coras5-28/+69
2018-10-03stat_client.c coverity error.Ole Troan1-2/+0
2018-10-03vmxnet3: error handlingSteven4-60/+84
2018-10-03fix format error in show logging config outputJerome Tollet1-3/+6
2018-10-03jvppgen: update headersBernhard M. Wiedemann1-2/+2
2018-10-02Enabled untagged vs default functionalityMike Bly2-6/+5
2018-10-02VPP-1440: clean up coverity warningsDave Barach5-8/+23
2018-10-02Stats: vpp_prometheus_export fixes.Ole Troan3-1/+16
2018-10-02PAPI: Use UNIX domain sockets instead of shared memoryOle Troan11-151/+427
2018-10-02vcl: fix coverity warningFlorin Coras1-1/+1
2018-10-02ip4-local: classify protos that skip csum and src checkFlorin Coras1-13/+38
2018-10-02vhost-user: add support for vlib_log APIJerome Tollet4-177/+129
2018-10-02Fix JVPP enum _host_to_net_ translation (VPP-1438)Michal Cmarada1-2/+2
2018-10-02BFD: add get echo source API (VPP-1367)Matus Fabian4-1/+135
2018-10-02IPsec: add API for SPDs dump (VPP-1363)Matus Fabian2-1/+60
2018-10-02vhost-user: Interface state updatesJuraj Sloboda4-16/+29
2018-10-02vhost_user: Fix setting MTU using uninitialized variableJuraj Sloboda1-2/+1
2018-10-02Update code to compute checksum for buffer chainsJuraj Sloboda3-7/+11
2018-10-02tls: fix disconnects for sessions with pending dataFlorin Coras8-37/+93
2018-10-02tcp: fix close wait timeout with no finFlorin Coras1-0/+4
2018-10-02tcp: accept fins if in recoveryFlorin Coras1-1/+3
2018-10-01Fix documentation about sw_interface_set_l2_bridgeYichen Wang1-1/+1
2018-10-01Source VRF SelectNeale Ranns10-0/+1204
2018-10-01Rename device class from PPPPOE to PPPoEPaul Vinciguerra2-10/+10
2018-10-01dpdk: updated makefile to enable QAT cryptodevRadu Nicolau1-0/+1
2018-10-01Add adjacency counters to the stats segmentNeale Ranns7-9/+155
ss="p">} fib_node_back_walk_reason_t; #define FIB_NODE_BW_REASONS { \ [FIB_NODE_BW_REASON_RESOLVE] = "resolve", \ [FIB_NODE_BW_REASON_EVALUATE] = "evaluate", \ [FIB_NODE_BW_REASON_INTERFACE_UP] = "if-up", \ [FIB_NODE_BW_REASON_INTERFACE_DOWN] = "if-down", \ [FIB_NODE_BW_REASON_INTERFACE_DELETE] = "if-delete", \ [FIB_NODE_BW_REASON_ADJ_UPDATE] = "adj-update", \ [FIB_NODE_BW_REASON_ADJ_DOWN] = "adj-down", \ } #define FOR_EACH_FIB_NODE_BW_REASON(_item) \ for (_item = FIB_NODE_BW_REASON_FIRST; \ _item <= FIB_NODE_BW_REASON_LAST; \ _item++) /** * Flags enum constructed from the reaons */ typedef enum fib_node_bw_reason_flag_t_ { FIB_NODE_BW_REASON_FLAG_NONE = 0, FIB_NODE_BW_REASON_FLAG_RESOLVE = (1 << FIB_NODE_BW_REASON_RESOLVE), FIB_NODE_BW_REASON_FLAG_EVALUATE = (1 << FIB_NODE_BW_REASON_EVALUATE), FIB_NODE_BW_REASON_FLAG_INTERFACE_UP = (1 << FIB_NODE_BW_REASON_INTERFACE_UP), FIB_NODE_BW_REASON_FLAG_INTERFACE_DOWN = (1 << FIB_NODE_BW_REASON_INTERFACE_DOWN), FIB_NODE_BW_REASON_FLAG_INTERFACE_DELETE = (1 << FIB_NODE_BW_REASON_INTERFACE_DELETE), FIB_NODE_BW_REASON_FLAG_ADJ_UPDATE = (1 << FIB_NODE_BW_REASON_ADJ_UPDATE), FIB_NODE_BW_REASON_FLAG_ADJ_DOWN = (1 << FIB_NODE_BW_REASON_ADJ_DOWN), } __attribute__ ((packed)) fib_node_bw_reason_flag_t; STATIC_ASSERT(sizeof(fib_node_bw_reason_flag_t) < 2, "BW Reason enum < 2 byte. Consequences for cover_upd_res_t"); extern u8 *format_fib_node_bw_reason(u8 *s, va_list *args); /** * Flags on the walk */ typedef enum fib_node_bw_flags_t_ { FIB_NODE_BW_FLAG_NONE = 0, /** * Force the walk to be synchronous */ FIB_NODE_BW_FLAG_FORCE_SYNC = (1 << 0), } fib_node_bw_flags_t; /** * Forward declarations */ struct fib_node_t_; /** * A representation of one pointer to another node. * To fully qualify a node, one must know its type and its index so it * can be retrieved from the appropriate pool. Direct pointers to nodes * are forbidden, since all nodes are allocated from pools, which are vectors, * and thus subject to realloc at any time. */ typedef struct fib_node_ptr_t_ { /** * node type */ fib_node_type_t fnp_type; /** * node's index */ fib_node_index_t fnp_index; } fib_node_ptr_t; /** * @brief A list of FIB nodes. */ typedef u32 fib_node_list_t; /** * Context passed between object during a back walk. */ typedef struct fib_node_back_walk_ctx_t_ { /** * The reason/trigger for the backwalk */ fib_node_bw_reason_flag_t fnbw_reason; /** * additional flags for the walk */ fib_node_bw_flags_t fnbw_flags; /** * the number of levels the walk has already traversed. * this value is maintained by the walk infra, tp limit the depth of * a walk so it does not run indefinately the presence of a loop/cycle * in the graph. */ u32 fnbw_depth; } fib_node_back_walk_ctx_t; /** * We consider a depth of 32 to be sufficient to cover all sane * network topologies. Anything more is then an indication that * there is a loop/cycle in the FIB graph. * Note that all object types contribute to 1 to the depth. */ #define FIB_NODE_GRAPH_MAX_DEPTH ((u32)32) /** * A callback function for walking a node dependency list */ typedef int (*fib_node_ptr_walk_t)(fib_node_ptr_t *depend, void *ctx); /** * A list of dependent nodes. * This is currently implemented as a hash_table of fib_node_ptr_t */ typedef fib_node_ptr_t fib_node_ptr_list_t; /** * Return code from a back walk function */ typedef enum fib_node_back_walk_rc_t_ { FIB_NODE_BACK_WALK_MERGE, FIB_NODE_BACK_WALK_CONTINUE, } fib_node_back_walk_rc_t; /** * Function definition to backwalk a FIB node */ typedef fib_node_back_walk_rc_t (*fib_node_back_walk_t)( struct fib_node_t_ *node, fib_node_back_walk_ctx_t *ctx); /** * Function definition to get a FIB node from its index */ typedef struct fib_node_t_* (*fib_node_get_t)(fib_node_index_t index); /** * Function definition to inform the FIB node that its last lock has gone. */ typedef void (*fib_node_last_lock_gone_t)(struct fib_node_t_ *node); /** * Function definition to display the amount of memory used by a type. * Implementations should call fib_show_memory_usage() */ typedef void (*fib_node_memory_show_t)(void); /** * A FIB graph nodes virtual function table */ typedef struct fib_node_vft_t_ { fib_node_get_t fnv_get; fib_node_last_lock_gone_t fnv_last_lock; fib_node_back_walk_t fnv_back_walk; format_function_t *fnv_format; fib_node_memory_show_t fnv_mem_show; } fib_node_vft_t; /** * An node in the FIB graph * * Objects in the FIB form a graph. */ typedef struct fib_node_t_ { /** * The node's type. make sure we are dynamic/down casting correctly */ fib_node_type_t fn_type; /** * Some pad space the concrete/derived type is free to use */ u16 fn_pad; /** * Vector of nodes that depend upon/use/share this node */ fib_node_list_t fn_children; /** * Number of dependents on this node. This number includes the number * of children */ u32 fn_locks; } fib_node_t; STATIC_ASSERT(sizeof(fib_node_t) == 12, "FIB node type is growing"); /** * @brief * Register the function table for a given type * * @param ft * FIB node type * * @param vft * virtual function table */ extern void fib_node_register_type (fib_node_type_t ft, const fib_node_vft_t *vft); /** * @brief * Create a new FIB node type and Register the function table for it. * * @param vft * virtual function table * * @return new FIB node type */ extern fib_node_type_t fib_node_register_new_type (const fib_node_vft_t *vft); /** * @brief Show the memory usage for a type * * This should be invoked by the type in response to the infra calling * its registered memory show function * * @param name the name of the type * @param in_use_elts The number of elements in use * @param allocd_elts The number of allocated pool elemenets * @param size_elt The size of one element */ extern void fib_show_memory_usage(const char *name, u32 in_use_elts, u32 allocd_elts, size_t size_elt); extern void fib_node_init(fib_node_t *node, fib_node_type_t ft); extern void fib_node_deinit(fib_node_t *node); extern void fib_node_lock(fib_node_t *node); extern void fib_node_unlock(fib_node_t *node); extern u32 fib_node_get_n_children(fib_node_type_t parent_type, fib_node_index_t parent_index); extern u32 fib_node_child_add(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_type_t child_type, fib_node_index_t child_index); extern void fib_node_child_remove(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_index_t sibling_index); extern fib_node_back_walk_rc_t fib_node_back_walk_one(fib_node_ptr_t *ptr, fib_node_back_walk_ctx_t *ctx); extern u8* fib_node_children_format(fib_node_list_t list, u8 *s); extern const char* fib_node_type_get_name(fib_node_type_t type); static inline int fib_node_index_is_valid (fib_node_index_t ni) { return (FIB_NODE_INDEX_INVALID != ni); } #endif