summaryrefslogtreecommitdiffstats
path: root/src/plugins
AgeCommit message (Collapse)AuthorFilesLines
2017-06-05SNAT: fix ICMP hairpinningMatus Fabian1-1/+67
Change-Id: I9d63133bd1db72917571ade868040c4597c896a1 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-06-05More GCC-7 errorsMarco Varlese1-0/+2
The Wmaybe-uninitialized is the new error included with Wall. This patch addresses the warning and fixes it. Change-Id: I8fdf9ff2d236c46b717024a14874fbbbad8af303 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-06-02memif: fix coverity warningsSteven1-0/+2
Check -1 for return from read prior to using the data Change-Id: Ibab7309244de488737ea7938b334fab495bf855d Signed-off-by: Steven <sluong@cisco.com>
2017-06-02Add l3 routing for GTP-U decapHongjun Ni10-14/+25
Change-Id: Ic3c8cd58cb2b02622299cf74c9efcabd2ef2b513 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-05-31memif: multi-queues supportSteven7-73/+167
- Add rx-queues and tx-queues option to the create memif CLI - Add vlib_worker_thread_barrier_sync () to memif_conn_fd_read_ready () as the latter function may disconnect the ring and clean up the shared memory. - On transmit, write the rid (queue number) to the socket. - On receive, read the rid and trigger the interrupt for the corresponding thread. Change-Id: If1c7e26c7124174678f047909cbc33e931eaac8c Signed-off-by: Steven <sluong@cisco.com>
2017-05-30Flowprobe: Stateful flows and IPv6, L4 recordingOle Troan18-1915/+2420
Change-Id: I67839281623721bf42f0a918a53356143d9dc78a Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Pavel Kotucek <pkotucek@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com>
2017-05-29memif: master instance crashes when typing quit on slaveSteven1-15/+29
When I type in 'quit' on the slave instance, the master instance crashes on this line. 0: /home/sluong/vpp-master/vpp/build-data/../src/vlib/unix/input.c:200 (linux_epoll_input) assertion `! pool_is_free (um->file_pool, _e)' fails Aborted (core dumped) Below is the decode from gdb line_number=0, fmt=0x7f57af6cc9a0 "%s:%d (%s) assertion `%s' fails") at /home/sluong/vpp-master/vpp/build-data/../src/vppinfra/error.c:143 vm=0x7f57af8e2400 <vlib_global_main>, node=0x7f576d40ad80, frame=0x0) at /home/sluong/vpp-master/vpp/build-data/../src/vlib/unix/input.c:200 vm=0x7f57af8e2400 <vlib_global_main>, node=0x7f576d40ad80, type=VLIB_NODE_TYPE_PRE_INPUT, dispatch_state=VLIB_NODE_STATE_POLLING, frame=0x0, last_time_stamp=1525665215050617) at /home/sluong/vpp-master/vpp/build-data/../src/vlib/main.c:1016 vm=0x7f57af8e2400 <vlib_global_main>, is_main=1) at /home/sluong/vpp-master/vpp/build-data/../src/vlib/main.c:1500 I am able to reproduce the problem consistently with the below procedure. 1. Create 3 memif interfaces between slave and master instances. 2. Type 'quit' on the slave. Neither crashes the first time. 3. Bring back the slave. Type 'quit' on the master. Neither crashes. 4. Bring back the master. Type 'quit' on the slave. The master crashes. There are two places the interrupt line is disconnected and the unix file is removed via the call unix_file_del () 1. memif_int_fd_read_ready () 2. memif_disconnect () which is called via multiple places in memif. When the crash happens, the unix file was removed from memif_disconnect () via memif_conn_fd_read_ready () with size of the message == 0 in recvmsg (). It is noted when the unix file was removed from memif_int_fd_read_ready (), it never crashes. It is a race condition. However, if I follow the aformentioned procedure, the crash always happens. The reason the crash happens when memif_disconnect () removes the unix file is because there may still be pending input in linux_epoll_input (). When linux_epoll_input () tries to access the unix file via the line 200 unix_file_t *f = pool_elt_at_index (um->file_pool, i); it crashes. We could add code in linux_epoll_input () to avoid the crash if the index for the particular file_pool is already free. Or we could fix memif to not remove the unix file in memif_conn_fd_read_ready () when recvmsg () got 0 byte and just postpone the unix file deletion in memif_int_fd_read_ready () later after linux_epoll_input () got a chance to run to empty the input stream. I choose to fix the problem in the latter approach. I split the function memif_disconnect () into two parts. For the code path which memif_conn_fd_read_ready () calls memif_disconnect (), it does not remove the unix file. All other calls to memif_disconnect () will continue to do what it uses to do to avoid regression. Please let me know if I should fix the problem other way. Change-Id: I8efe2a3d24c6581609bc7b6fe82c2b59c22d8e4b Signed-off-by: Steven <sluong@cisco.com>
2017-05-24SNAT: fix IPFIX data src and dst portMatus Fabian1-2/+2
Change-Id: Ifa9582962710a3601fcccbbf388529043fc7f08a Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-05-24IPv6 Performance bugsNeale Ranns2-2/+1
- inline the FIB lookup function; this requires access to the bihash, so for files that use more than one type this casues problems. those files that include ip6_fib.h unnecessarily have been updated - better use of the feature arcs. ip6-lookup and interface-output are now sentinels (end-node-index in the cm speak) rather than enabled features. Change-Id: I9d1375fee63f7dbb2d327da6124d8e60b63367ec Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-05-23Added support for Virtio-user interfaces by means of a new VNET_DPDK_PORT_TYPE.Mohammed Hawari3-1/+16
Change-Id: I101e32cee8d9de51227b39ec2639c9fb44da1e6c Signed-off-by: Mohammed Hawari <mhawari@cisco.com>
2017-05-22dpdk: make dpdk global debug level configurableDamjan Marion3-33/+30
Adds startup.conf knob: dpdk { log-level debug } Change-Id: I80dfbc00559528d7b0970958fba9f08d97aa7118 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-22Fix GTP-U Coverity issuesHongjun Ni1-24/+15
Change-Id: I982e0dfb96c371672aa636aa7e40f06a84e2bb69 Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-05-18acl-plugin: reject the too-short variable-length messages from clients (VPP-839)Andrew Yourtchenko1-3/+42
Prior to commit bfd9227e6da567e0e19e026afe94cd4c0b65f725, there was no clean way to check the lower-level message length as supplied by the client, so there was no option but to trust that the client does the right thing and allocates memory correctly. The absence of checks makes it hard for a misbehaving client to spot the problem - because everything "appears" to work correctly for the specific erroneous message exchange. This commit ensures the message received is at least as big as we expect, and complains loudly if it is not. Change-Id: I806eaac7c7f1ab3c64cb2bfa6939ce27da9a2b44 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-05-17ioam: configuration for SRv6 localsid (VPP-693)shwethab4-23/+54
This add debug cli to accept SRv6 localsid that will be used to attract the return traffic for M-Anycast flows. Change-Id: I8f8dd115c36498141ae4cb143c6584141950b1d3 Signed-off-by: shwethab <shwetha.bhandari@gmail.com> (cherry picked from commit 00c14a94c34fac89e6e589c4a7aad20d8dd183dc)
2017-05-17dpdk: Do not check and set rte_mbuf refcnt if dpdk ver >= 17.05Damjan Marion1-0/+4
According to DPDK release notes this is done by DPDK. Also, it fixes assers in debug image. Change-Id: Ida1d25f8cd0c2232110e44eabd7dc3e512336758 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-16Unneeded linkingMarco Varlese1-0/+4
Removed the linking which does not appear to be necessary when using in repo dpdk and which causes a build failure when using the shared-dpdk mode. Change-Id: I6bad2bd11d6db40fbd2def78f98c6beba66ff416 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-05-16Fix regression of setting device to admin-down stateJohn Lo1-5/+4
Change-Id: I0ffa572839405efe1170d6ddb073e53e9af02db7 Signed-off-by: John Lo <loj@cisco.com>
2017-05-15acl-plugin: unapply the ACLs if interface is being deletedAndrew Yourtchenko1-0/+4
(HC2VPP-137 is the client behavior triggering this) If the user does not unapply the ACLs off the interface, but deletes the interface, the subsequent reuse of the sw_if_index might find itself with the datapath hooked up for ACL processing even though there is no ACL configured. The fix is to unapply any ACLs in the callback which is called upon the sw_if_index addition/deletion. Change-Id: Icea413d7fbf1ef891844a4818626e1b34fe79cbf Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> (cherry picked from commit 4c72e629e5ace392390a9d6109594254525064f7)
2017-05-15dpdk: Enable hardware CRC strip for Intel VFsDamjan Marion1-0/+5
Change-Id: I60a7795761fe74ae5d57dacd03c343ddb77434d4 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-15Add GTP-U plugin. VPP-694Hongjun Ni12-0/+4248
Basic GTP-U feature Change-Id: I31226f890a92c5303ac06e112ed7820cae52d9bd Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-05-15memif: migrate memif to use vnet device infra APIsSteven2-22/+40
Migrate memif to use vnet device infra APIs. No new function is added. Change-Id: I70e440d2ae1e673876365041f31fe78997aceecf Signed-off-by: Steven <sluong@cisco.com>
2017-05-15dpdk: improve error handling during device initializationDamjan Marion6-79/+98
Change-Id: Ib390164abb07ca0d38fd49e7e2e6b4e9ea856405 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-15Add a missing byte-swap call in ACL intf dump.Jon Loeliger1-1/+1
Change-Id: I87495d95dc6c5a36ff6d2ae05203e22e43403bf6 Signed-off-by: Jon Loeliger <jdl@netgate.com>
2017-05-15[plugins/dpdk] Support for CLIB_HAVE_64 (aarch64)Christophe Fontaine1-0/+13
For platforms which do not support u8x32, such as aarch64, add an alternative implementation of 'dpdk_buffer_init_from_template'. Change-Id: Ia7e8d0a5985fa5925e063ed6e890208c73e39933 Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
2017-05-11dpdk: bump to dpdk 17.05Damjan Marion4-22/+16
Change-Id: I19744387859129c6b8dc104041af158bf5f1d988 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-10completelly deprecate os_get_cpu_number, replace new occurencesDamjan Marion4-22/+22
Change-Id: I82c663bc0866c6c68ba354104b0bb059387f4b9d Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-10Add crc32c inline function, allows compilation on 32-bit systemsDamjan Marion2-8/+3
32-bit code still can use crc32c instructions, but it operates on 32 registers Change-Id: I9bb6b0b59635d6ea6a753584676ebcf59c8f6584 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-10dpdk: refactor interface speed detectionDamjan Marion3-98/+42
- Adds VirtualFucntionEthernet for VFs - Enables MLX4 driver Change-Id: I163300e68edbe033227f641bdfcfe5918cbe58cf Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-10SNAT: move API code to separate fileMatus Fabian4-1256/+1312
Move API source code from snat.c to snat_api.c Change-Id: I1c4439eb5d2e3f43695ecc4d300eccd148105c15 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-05-09dpdk: refactor setup, start, stop codeDamjan Marion5-87/+167
Change-Id: I0fec86914ec027383ff511b7092beac2363f55f7 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-09Fix remaining 32-bit compile issuesDamjan Marion2-5/+6
Change-Id: I9664214652229b663c3e3ba7406b4ede96bfb123 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-08dpdk: use speed_capa to detect i40e device speedDamjan Marion3-19/+13
Change-Id: I1decca6fb5ce6de74ccbcd5a262ebd3db6f55cdc Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-07Avoid active connection prevent timeout of idle conns after itAndrew Yourtchenko2-10/+12
Fix a logic error related to timing out of the connections following the active one. To avoid this class of issue in the future, create corresponding testcases, as well as some trivial sanity testcases for both IPv4 and IPv6. Since these tests are timing-dependent and take up time, mark them as extended tests. Change-Id: I2c72bad5efda7db8aa9cb05801fe47928dc47927 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-05-05First commit SR MPLSPablo Camarillo3-3/+3
Change-Id: I961685a2a0e4c314049444c64eb6ccf877c278dd Signed-off-by: Pablo Camarillo <pcamaril@cisco.com>
2017-05-02Add interface rx mode commands, unify rx mode and placement CLIDamjan Marion1-5/+5
Change-Id: Ib506c3e9d66170f29e3266ad6dc4d32b829befba Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-05-02dpdk: remove unused codeDamjan Marion5-64/+3
Change-Id: I16dcc0de2553c6c1eb87dd1ec4c8d3c649e6f285 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-28dpdk: cryptodev support enabled by defaultSergio Gonzalez Monroy6-28/+8
This patch slightly modifes how to enable DPDK Cryptodev. The startup option 'enable-cryptodev' has been removed and unless not enough cryptodevs are found, DPDK cryptodev will be enabled by default. Change-Id: Ic0ac507802cdc0eeb51f065e04ec43a1885617cf Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-04-27dpdk: cleanup, move APIs to separate .c fileDamjan Marion5-327/+337
Change-Id: Id632ff1b30be808d9f270e2f77260391569fbda2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-04-27CGN: Send ICMP error packet if user is out of sessions availableMartin Gálik1-6/+21
Change-Id: I19a6015fde7342588cfa9c7a4f07016aa339cc72 Signed-off-by: Martin Gálik <magalik@cisco.com>
2017-04-27ioam: adding missing setup api msg crc tableShwetha Bhandari4-0/+66
Change-Id: Ic95fe6179de1151796188813cc595187d4c842a0 Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
2017-04-26CGN: Session dump, test naming for ports fixedMartin Gálik3-3/+153
Change-Id: Ib542b2b3ee023fbe3d0e01ceaf4b4ab7a0ec80dc Signed-off-by: Martin Gálik <magalik@cisco.com>
2017-04-26CGNAT: close session API and CLI commands.Martin Gálik3-4/+351
Change-Id: I9c8636bd2c4b8da2907e8e4a4f2be1a2c3a8e0bb Signed-off-by: Martin Gálik <magalik@cisco.com>
2017-04-25"autoreply" flag: autogenerate standard xxx_reply_t messagesDave Barach12-374/+37
Change-Id: I72298aaae7d172082ece3a8edea4217c11b28d79 Signed-off-by: Dave Barach <dave@barachs.net>
2017-04-22Fix multicast enable on the bonded interfaceSteve Shin2-1/+13
Multicast enable flag should be set when the bonded interface is up. This flag allows multicast packets to be processed from the slave devices of the bonded interface. Also promiscuous mode for all-multicast should be correctly displayed as part of 'show hardware detail' output. Change-Id: Ief0157c4c030a28afb9c45ebf3d6a12710083724 Signed-off-by: Steve Shin <jonshin@cisco.com>
2017-04-21CGN: IPFIX loggingMatus Fabian3-18/+215
maximum entries per user exceeded event Change-Id: Ie35d7f40f55001e2ef4a38f934f176594f25b189 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-04-20Temporary workaround for the bug VPP-698.Milan Lenco1-2/+2
Change-Id: I220b0b95449f24cc547206e38ab8e10019115ec0 Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
2017-04-20Clean up old datapath code in ACL plugin.Andrew Yourtchenko13-2078/+18
Change-Id: I3d64d5ced38a68f3fa208be00c49d20c4e6d4d0e Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2017-04-19Support ping from outside network in 1:1 NAT (VPP-695)Juraj Sloboda4-45/+59
Change-Id: Iec8fd4c2bd26874bd8bda82172af797e9b92592c Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2017-04-18ACL-plugin does not match UDP next-header, VPP-687Pavel Kotucek1-1/+1
Change-Id: Ide4f9bd6158fb64d069540fb43f4e593e39d6ff3 Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-04-13Remove unsed parameter from fib_table_entry_special_add() (only used in FIB ↵Neale Ranns3-7/+3
tests). The DPO was incorrectly initialised with FIB_PROTO_MAX Change-Id: I962df9e162e4dfb6837a5ce79ea795d5ff2d7315 Signed-off-by: Neale Ranns <nranns@cisco.com>