summaryrefslogtreecommitdiffstats
path: root/src/vnet/bfd
AgeCommit message (Expand)AuthorFilesLines
2017-11-10add warning control macro setGabriel Ganne1-11/+3
2017-11-07fix bfd cli with gcc >= 6Gabriel Ganne1-1/+1
2017-10-09vppapigen: support per-file (major,minor,patch) version stampsDave Barach1-0/+2
2017-10-04[aarch64] Fixes CLI crashes on dpaa2 platform.Christophe Fontaine1-1/+1
2017-07-14vnet_buffer_t flags cleanupDamjan Marion1-2/+2
2017-07-14Introduce l{2,3,4}_hdr_offset fields in the buffer metadataDamjan Marion1-2/+2
2017-05-10Add crc32c inline function, allows compilation on 32-bit systemsDamjan Marion1-1/+1
2017-05-02BFD: don't crash if interface is deletedKlement Sekera1-33/+42
2017-04-25"autoreply" flag: autogenerate standard xxx_reply_t messagesDave Barach1-121/+11
2017-04-24BFD: disable gcc6 warnings in helper macrosKlement Sekera1-0/+11
2017-04-06BFD-FIB interactionsNeale Ranns3-2/+73
2017-04-05BFD: add ARP-awareness, fix bugsKlement Sekera5-77/+282
2017-03-06BFD: documentationKlement Sekera11-91/+526
2017-03-06BFD: drop rpc call if packet doesn't match sessionKlement Sekera1-1/+1
2017-03-06BFD: remove unneeded codeKlement Sekera1-15/+0
2017-03-02BFD: command line interfaceKlement Sekera9-167/+1080
2017-03-01VPP-598: tcp stack initial commitDave Barach1-2/+2
2017-02-27BFD: disable debug printsKlement Sekera1-1/+1
2017-02-26BFD: echo functionKlement Sekera8-318/+864
2017-02-17BFD: put session admin-up/admin-downKlement Sekera1-12/+12
2017-02-15BFD: loop back echo packetsKlement Sekera3-36/+243
2017-02-14BFD: respect remote demand modeKlement Sekera1-9/+46
2017-02-14BFD: set per session UDP source port per RFCKlement Sekera4-16/+43
2017-02-08BFD: minor fixesKlement Sekera2-5/+3
2017-02-08BFD: modify session parametersKlement Sekera8-113/+412
2017-02-02BFD: SHA1 authenticationKlement Sekera8-256/+1455
2017-02-02BFD: improve finding of ipv4/ipv6 headersKlement Sekera1-48/+62
2017-01-31BFD: reformat code to match vpp code styleKlement Sekera1-158/+186
2017-01-17BFD: IPv6 supportKlement Sekera4-82/+223
2017-01-11BFD: fix bfd_udp_add APIKlement Sekera3-29/+29
2017-01-03BFD: immediately honor reduced remote_min_rx intervalKlement Sekera3-22/+31
2016-12-28Repair Doxygen build infrastructureChris Luke1-1/+3
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion12-0/+2723
s="n">vec_header_t; #define VEC_NUMA_UNSPECIFIED (0xFF) /** \brief Find the vector header Given the user's pointer to a vector, find the corresponding vector header @param v pointer to a vector @return pointer to the vector's vector_header_t */ #define _vec_find(v) ((vec_header_t *) (v) - 1) #define _vec_round_size(s) \ (((s) + sizeof (uword) - 1) &~ (sizeof (uword) - 1)) always_inline uword vec_header_bytes (uword header_bytes) { return round_pow2 (header_bytes + sizeof (vec_header_t), sizeof (vec_header_t)); } /** \brief Find a user vector header Finds the user header of a vector with unspecified alignment given the user pointer to the vector. */ always_inline void * vec_header (void *v, uword header_bytes) { return v - vec_header_bytes (header_bytes); } /** \brief Find the end of user vector header Finds the end of the user header of a vector with unspecified alignment given the user pointer to the vector. */ always_inline void * vec_header_end (void *v, uword header_bytes) { return v + vec_header_bytes (header_bytes); } always_inline uword vec_aligned_header_bytes (uword header_bytes, uword align) { return round_pow2 (header_bytes + sizeof (vec_header_t), align); } always_inline void * vec_aligned_header (void *v, uword header_bytes, uword align) { return v - vec_aligned_header_bytes (header_bytes, align); } always_inline void * vec_aligned_header_end (void *v, uword header_bytes, uword align) { return v + vec_aligned_header_bytes (header_bytes, align); } /** \brief Number of elements in vector (lvalue-capable) _vec_len (v) does not check for null, but can be used as an lvalue (e.g. _vec_len (v) = 99). */ #define _vec_len(v) (_vec_find(v)->len) /** \brief Number of elements in vector (rvalue-only, NULL tolerant) vec_len (v) checks for NULL, but cannot be used as an lvalue. If in doubt, use vec_len... */ #define vec_len(v) ((v) ? _vec_len(v) : 0) u32 vec_len_not_inline (void *v); /** \brief Vector's NUMA id (lvalue-capable) _vec_numa(v) does not check for null, but can be used as an lvalue (e.g. _vec_numa(v) = 1). */ #define _vec_numa(v) (_vec_find(v)->numa_id) /** \brief Return vector's NUMA ID (rvalue-only, NULL tolerant) vec_numa(v) checks for NULL, but cannot be used as an lvalue. */ #define vec_numa(v) ((v) ? _vec_numa(v) : 0) /** \brief Number of data bytes in vector. */ #define vec_bytes(v) (vec_len (v) * sizeof (v[0])) /** \brief Total number of bytes that can fit in vector with current allocation. */ #define vec_capacity(v,b) \ ({ \ void * _vec_capacity_v = (void *) (v); \ uword _vec_capacity_b = (b); \ _vec_capacity_b = sizeof (vec_header_t) + _vec_round_size (_vec_capacity_b); \ _vec_capacity_v ? clib_mem_size (_vec_capacity_v - _vec_capacity_b) : 0; \ }) /** \brief Total number of elements that can fit into vector. */ #define vec_max_len(v) \ ((v) ? (vec_capacity (v,0) - vec_header_bytes (0)) / sizeof (v[0]) : 0) /** \brief Set vector length to a user-defined value */ #ifndef __COVERITY__ /* Coverity gets confused by ASSERT() */ #define vec_set_len(v, l) do { \ ASSERT(v); \ ASSERT((l) <= vec_max_len(v)); \ CLIB_MEM_POISON_LEN((void *)(v), _vec_len(v) * sizeof((v)[0]), (l) * sizeof((v)[0])); \ _vec_len(v) = (l); \ } while (0) #else /* __COVERITY__ */ #define vec_set_len(v, l) do { \ _vec_len(v) = (l); \ } while (0) #endif /* __COVERITY__ */ /** \brief Reset vector length to zero NULL-pointer tolerant */ #define vec_reset_length(v) do { if (v) vec_set_len (v, 0); } while (0) /** \brief End (last data address) of vector. */ #define vec_end(v) ((v) + vec_len (v)) /** \brief True if given pointer is within given vector. */ #define vec_is_member(v,e) ((e) >= (v) && (e) < vec_end (v)) /** \brief Get vector value at index i checking that i is in bounds. */ #define vec_elt_at_index(v,i) \ ({ \ ASSERT ((i) < vec_len (v)); \ (v) + (i); \ }) /** \brief Get vector value at index i */ #define vec_elt(v,i) (vec_elt_at_index(v,i))[0] /** \brief Vector iterator */ #define vec_foreach(var,vec) for (var = (vec); var < vec_end (vec); var++) /** \brief Vector iterator (reverse) */ #define vec_foreach_backwards(var,vec) \ for (var = vec_end (vec) - 1; var >= (vec); var--) /** \brief Iterate over vector indices. */ #define vec_foreach_index(var,v) for ((var) = 0; (var) < vec_len (v); (var)++) /** \brief Iterate over vector indices (reverse). */ #define vec_foreach_index_backwards(var,v) \ for ((var) = vec_len((v)) - 1; (var) >= 0; (var)--) /** \brief return the NUMA index for a vector */ always_inline uword vec_get_numa (void *v) { vec_header_t *vh; if (v == 0) return 0; vh = _vec_find (v); return vh->numa_id; } #endif /* included_clib_vec_bootstrap_h */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */