aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2018-12-04Add VNET_BUFFER_F_AVAIL definitionsDave Barach2-1/+26
Add a check to make sure that the vlib and vnet buffer flag bit definitions do not overlap. The VNET_BUFFER_F_AVAIL1...8 definitions allow out-of-tree codes to: #define VNET_BUFFER_F_MY_USECASE VNET_BUFFER_F_AVAIL1 and so on. This avoids introducing irrelevant and/or proprietary bit definitions into vnet/buffer.h, and hopefully minimizes merge pain for everyone involved. Change-Id: I5be4f61dceb81b5bfca005f6d609ade074af205b Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-04vcl: test refactor and improvementsFlorin Coras6-13/+25
Change-Id: I92f415bf253d6e051ec9d94ebeb98f081b2a0293 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-04MPLS: buffer over-run with incorrectly init'd vector. fix VAT dumpNeale Ranns2-3/+3
Change-Id: Ifdbb4c4cffd90c4ec8b39513d284ebf7be39eca5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-03Format vnet_buffer_t l2 feature bitmapDave Barach1-0/+8
Change-Id: Iad3120ab6466b77875efc89ccb49f6d22e36e62a Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-03API: C generator improve symbol protection.Ole Troan1-2/+2
Change-Id: I9ef042c06c12892a2bbc23cc3bac6891c77e3feb Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-03vcl: handle worker process exitFlorin Coras6-22/+56
Change-Id: Ife05d25fd736ae3064f01e974e5aecc5b48de924 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-03svm: use explicit svm fifo segment main for slavesFlorin Coras8-62/+76
Change-Id: Id39d64bf1b49345a3dc31c63360569212aba6865 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-03Add UDP encap flagFilip Tehlar2-0/+3
Change-Id: Ic6a8b9aaec7e5dee4fb1971168988dbe4f931f86 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2018-12-03move [m]fib and BIER tests to unittest pluginNeale Ranns5-3/+3
Change-Id: I9d2f52e756363df011026773bfffa838a557313f Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-03Copying QoS Bits when fragmented, so that marking can happen properly also ↵Vijayabhaskar Katamreddy1-0/+7
cleaning up some unused code Change-Id: I1558eec79af173e5cdcc769d7c3909039403eed8 Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-12-02IPSEC-AH: anti-replay testingNeale Ranns2-6/+9
Change-Id: Ia5d45db73e4bdb32214ed4f365d5eec8e28115f3 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-02vppinfra: c11 safe string functionsSteven3-25/+2641
Add memcmp_s, strcmp_s, strncmp_s, strcpy_s, strncpy_s, strcat_s, strncat_s, strtok_s, strnlen_s, and strstr_s C11 safe string API. For migrating extant unsafe API, add also the corresponding macro version of each safe API, clib_memcmp, clib_strcmp, etc. In general, the benefits of the safe string APIs are to provide null pointer checks, add additional argument to specify the string length of the passed string rather than relying on the null terminated character, and src/dest overlap checking for the the string copy operations. The macro version of the API takes the same number of arguments as the unsafe API to provide easy migration. However, it does not usually provide the full aformentioned benefits. In some cases, it is necessary to move to the safe API rather than using the macro in order to avoid some unpredictable problems such as accessing memory beyond what it is intended due to the lack of the passed string length. dbarach: add a "make test" vector, and a doxygen file header cookie. Change-Id: I5cd79b8928dcf76a79bf3f0b8cbc1a8f24942f4c Signed-off-by: Steven <sluong@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-01ip_reassembly_enable_disable reply handler name is changed.Chore1-1/+1
Change-Id: I89be597376690bb75c4347bcfc1c6c3d27c4034c Signed-off-by: Chore <s3m2e1.6star@gmail.com>
2018-12-01dpdk-ipsec-mempool: allocate from dpdk mem specified by socket-mem in ↵Kingwel Xie1-22/+17
startup.conf otherwise, these pools will occupy an entire huge page for each even they are very small. Change-Id: I08919714de9b6cd4b8dddb546ca54364b56ec99f Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-12-01Delete shared memory segment files when vpp startsDave Barach1-0/+22
Should have been done this way years ago. My bad. Change-Id: Ic7bf937fb6c4dc5c1b6ae64f2ecf8608b62e7039 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-30Metadata / opaque formatting belongs in vppDave Barach9-81/+348
VPP graph dispatch trace record description: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Major Version | Minor Version | NStrings | ProtoHint | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Buffer index (big endian) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + VPP graph node name ... ... | NULL octet | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Buffer Metadata ... ... | NULL octet | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Buffer Opaque ... ... | NULL octet | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Buffer Opaque 2 ... ... | NULL octet | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VPP ASCII packet trace (if NStrings > 4) | NULL octet | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Packet data (up to 16K) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Graph dispatch records comprise a version stamp, an indication of how many NULL-terminated strings will follow the record header, and a protocol hint. The buffer index allows downstream consumers of these data to easily filter/track single packets as they traverse the forwarding graph. FWIW, the 32-bit buffer index is stored in big endian format. As of this writing, major version = 1, minor version = 0. Nstrings will be either 4 or 5. Here is the current set of protocol hints: typedef enum { VLIB_NODE_PROTO_HINT_NONE = 0, VLIB_NODE_PROTO_HINT_ETHERNET, VLIB_NODE_PROTO_HINT_IP4, VLIB_NODE_PROTO_HINT_IP6, VLIB_NODE_PROTO_HINT_TCP, VLIB_NODE_PROTO_HINT_UDP, VLIB_NODE_N_PROTO_HINTS, } vlib_node_proto_hint_t; Example: VLIB_NODE_PROTO_HINT_IP6 means that the first octet of packet data SHOULD be 0x60, and should begin an ipv6 packet header. Change-Id: Idf310bad80cc0e4207394c80f18db5f77c378741 Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-30coding-style: missing coding-style-patchKingwel Xie1-168/+200
fix coding style Change-Id: I458d81fa80c509b71edb2021468a89715cb32ae3 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-11-30IPSEC-AH: fix packet dropNeale Ranns2-7/+0
Change-Id: I45b97cfd0c3785bfbf6d142d362bd3d4d56bae00 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-30vcl: wait for segments with segment handleFlorin Coras9-69/+152
Instead of waiting for notification from binary api. Change-Id: I5ecab857d6bcdbed62d6bb06709570c4cf6b19ea Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-30API: Add dependency on compiler for API .json and .api generation.Ole Troan1-2/+2
Add dependency on the API compiler, so that builds can deal with changes to the tool. Change-Id: I2587235fefa93a69955495870d49f36b4203bfea Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-30session: segment handle in accept/connect notificationsFlorin Coras19-50/+122
Change-Id: I03884b6cde9d4c38ae13d1994fd8d37d44016ef0 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-30session: use endpt fib index if app in default nsJohn Lo1-1/+6
Change-Id: Icf1408c50a6438c81e16033e83b2a76ce6eb0166 Signed-off-by: John Lo <loj@cisco.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29do not opttimize graph node functions in debug buildsDamjan Marion1-1/+1
Change-Id: I5b4cd419d317381a06e7e6d703373959f4bbd97b Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-29DHCP: Initialise trace for copied buffers.Ole Troan2-0/+4
DHCP tests failed intermittantly with a core dump. Let's see if this fixes it. Change-Id: I42829a2c7e7f5a9a6775330d37bf972ff0008210 Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-29vpp_papi: Add custom exceptions.Paul Vinciguerra6-54/+121
This patchset adds and raises the following custom exception classes: * class VPPApiError(Exception): * class VPPNotImplementedError(NotImplementedError): * class VPPIOError(IOError): * class VPPRuntimeError(RuntimeError): * class VPPValueError(ValueError): * class VPPSerializerValueError(ValueError): * class VPPStatsIOError(IOError): * class VPPStatsClientLoadError(RuntimeError): * class VppTransportShmemIOError(IOError): * class VppTransportSocketIOError(IOError) Change-Id: Ia40900fd2dcef148d01125d6c691329fc666901e Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-29vpp_papi: Fix: raise NotImplemented.Paul Vinciguerra1-1/+1
'raise NotImplemented' should be 'raise NotImplementedError'. NotImplemented is not part of the Exception heirarchy. Change-Id: I7fb647f1d56e689fafa2cd9a5566da826def072b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-29api: ip_source_check_interface_add_del api is added.Chore2-0/+48
Change-Id: I4799a9d469c797e54669ff4b50851a9acc849427 Signed-off-by: Chore <s3m2e1.6star@gmail.com>
2018-11-29GBP: l3-out subnetsNeale Ranns22-278/+910
Change-Id: Id4a20066fc5be716c61a497dfcb4d00dc1dbb28d Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-29gbp: Add support for flow hash profileMohsin Kazmi2-8/+27
Change-Id: Ibea87f21b3403045cc0d865903b94396fe670e79 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-11-29NAT: syslog - sessions logging (VPP-1139)Matus Fabian11-2/+463
Change-Id: I6e0b7cf37c1a9ac66f8ac011db29504e57844ee9 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-11-29vcl: basic support for apps that forkFlorin Coras10-168/+358
- intercept fork and register a new worker with vpp - share sessions between parent and forked child - keep binary api state per worker Change-Id: Ib177517d661724fa042bd2d98d18e777056352a2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29VPP-1507: Added binary api to dump configured ip_punt_redirectPavel Kotucek5-29/+214
Change-Id: I790f7785e183cc9aaffd5b593617c4e12a32e20d Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-11-29ldp: basic multiworker supportFlorin Coras3-119/+170
Change-Id: Ia794fa7e15dac02c8607c4cee2f119ad9815c0a8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29vppinfra: add pool_dup macroFlorin Coras1-0/+35
Change-Id: I192e340bd072d27bf6ddc382347ad5c3ca411bad Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29Export ethernet/mac_address.h as part of API installation.Jon Loeliger1-0/+1
Change-Id: Ibb6d648948f990280e3cb048ce907f01e5c32b12 Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-11-29dpdk-ipsec-nodes multiarch: nodes are formatted in VLIB_NODE_FN styleKingwel Xie4-13/+24
crypto-input,esp encrypt/decrypt are indicated in CMakefiles Change-Id: I18ba851c1d4e5633d07c5de61cdaeae938e94982 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-11-29dpdk: bump to DPDK 18.11Damjan Marion1-48/+5
Change-Id: Ib6458e56f546bb5b11c23aa5e1afe0f4b5011c08 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-29MAP: Use bool type in map.api instead of u8.Ole Troan1-5/+5
Change-Id: I4e40bb6d6bf274a27892053f37aeeb81a7278965 Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-29vppapigen: Fix python3 compatibilityOle Troan1-24/+40
Change-Id: I9124fcb755ba43fd8f44712f0940f351c460c5b0 Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-29API: Add support for type aliasesOle Troan11-32/+170
Previously all types are compound. This adds support for aliases, so one can do things like: typedef u32 interface_index; or typedef u8 ip4_address[4]; Change-Id: I0455cad0123fc88acb491d2a3ea2725426bdb246 Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-29ipsec: move ipsec defs to ipsec.hKlement Sekera2-51/+54
Change-Id: Ia3dcd98edb6188deb96a3a99d831e71b2ffa0060 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-29VPP-1508: vpp_transport_socket.py fix importPaul Vinciguerra1-1/+4
Import queue in an py2-py3 compatable way. Change-Id: I83f166a959c4ee55438e3997edbcb596dc72059f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-28Use acquire/release ordering when accessing svm_fifo shared variable cursizeSirshak Das3-8/+12
Improves TCP iperf3 performance by ~3% on AArch64. Change-Id: I1e51bd8403ba45ec6af4c2f96b95e884c1ae0d67 Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
2018-11-28vpp_papi: Reserved keywords.Paul Vinciguerra2-3/+3
'async' and 'await' are reserved keywords starting with Python 3.7. This change is necessary to support VPP-1508. Change-Id: Iba2b3aef98a0ecaabc1622719b364f8f4ab5d5a3 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-28dpdk: allow interface name to be specified from startup.confDamjan Marion4-4/+20
Example: dpdk { dev 0000:01:00.0 { name eth0 } dev 0000:02:00.0 { name eth1 } } Change-Id: I11e60e969a7e3548c99ac0c0c3531767819cb157 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-28cmake: display warning and continue if dpdk not presentDamjan Marion2-4/+9
Change-Id: I5cb2619444507a159c42ac8401800e90b6541a20 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-28Remove useless prefetch in ip4-rewrite nodeSimon Zhang1-1/+1
Prefetching first 2 packets' header is useless cause of the prefetching action is not done before using the packets. There's no performance drop in Xeon platform and slightly performance gain in Atom platform after rmoving the prefetch. Change-Id: Ib4b074af20d7cd5053aecc7147b162141aec31f5 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
2018-11-28vpp_papi: Use new style classes.Paul Vinciguerra6-13/+13
Python2 defaults to old style classes to maintain compatability with python 2.1. Moving to new style classes will ensure consistent behavior across interpreters. Change-Id: I89493d608d1edb63989000c17a9566a97785a4aa Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-27ldp: sid to fd mapper for apps with multiple workersFlorin Coras3-22/+112
Change-Id: I79585cd6b467b007c3eb9a7668387ff3777de46d Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-27pmalloc: correct format_pmalloc_map u32 index overrun bugKingwel Xie2-5/+3
Change-Id: I95ba4eab6e2154ef33a479450b997c8317db3a92 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>