Commit Graph

1456 Commits

Author SHA1 Message Date
a60d4cb0a1 Improve dpdk-input node to handle drivers not setting mbuf PTYPE
For drivers that do not provide dpdk rte_mbuf PTYPE information,
check ethernet header Etype to acccelerate IP4 and IP6 forwarding
path. Update packet trace for dpdk-input node to provide more info
from DPDK rte_mbuf offload flags and packet types.

Change-Id: I207158797a155305314d002726c0af97b8cb0eb3
Signed-off-by: John Lo <loj@cisco.com>
2016-12-20 12:09:10 +00:00
6a7acc2f9a Declare variables as external
non-external declarations in header files are generating
multiple empty definitions of the same symbol.

Change-Id: I7f3933404f79d08579468d0052c106731b57507c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-20 10:23:44 +00:00
fc63973076 l2input: remove unused code and reduce number of branches
Change-Id: Ic37b5740285dc0020b9fdb0d8c98bc304cee7aa8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-19 21:41:48 +00:00
8e8b811ca1 make test: work around timing issue in bfd test
Change-Id: I3f70091950b9288670969e54eadd35ac733905e4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-19 21:40:57 +00:00
07ea7615ff snat: fix port allocation
Change-Id: Id6aeb4d19476934dfaa354562aa1703650bd037f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-19 21:40:26 +00:00
f5984bde04 Python API: Add back support for old-style VLA, e.g. mask[0]
Change-Id: I5be6bfe522e5ea93934f0ddf75d4e4707376dc0c
Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-19 21:38:35 +00:00
65cc8c0dbf make test: filter IPv6 RAs out by default
Most of the test cases are not interested in IPv6 Router Alerts,
so change the default behaviour of get_capture to filter out
these packets with the possibility of turning the filtering off,
for test cases which are interested in the RAs.

Change-Id: I0b5ee685f82c49cd32c6d6a4638eb3493d2988fc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-19 21:33:42 +00:00
72d0916b82 ioam: export plugin - genarate java bindings
Change-Id: Ia0b81418a2171464ca4b4753afa6898c0c9ee626
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
2016-12-19 18:52:16 +00:00
b75b8df6bd dpdk: fix IV physical address in esp-decrypt
Change-Id: I96b74aa82231038c54e9d07b54cc16fc53efe0be
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-19 18:51:52 +00:00
85bb93ae86 dpdk: fix dpdk-crypto-input packet trace
Change-Id: Ic8073215222e4800c62ac42738e73d5e990806ef
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-19 18:51:34 +00:00
71ce4a4bc5 Update CSIT tests 161211 -> 161218
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I2942502803e1fc6edaf35fc08dee4e7848594f96
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-12-19 18:15:19 +00:00
4db5b46858 dpdk backward compatibility
When building with an older dpdk version, the build fails
as the function 'rte_delay_us_override_cb' is not used.

Change-Id: I4eb5d1c5b357331cf020efd8c6492dd8c82710ee
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-12-19 14:51:57 +01:00
c294c4c92e VPP-563: Fix inter plugin dependency in ioam vxlan-gpe
Change-Id: I31684b3844cd02ba0d0b046d621db59ecac3992d
Signed-off-by: Shwetha Bhandari <shwethab@cisco.com>
2016-12-17 13:01:12 +05:30
bd6462e16a Coverity fixes, VPP-486
Change-Id: I8906bb983128e8f6e2664e367d2015325c1125fb
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-16 20:31:18 +00:00
d6900496dd Fix dpdk-input check for VLAN packets including VLAN strip case
For DPDK-16.11 or later, use packet_type to check packets with VLAN
tags. For earlier versions of DPDK, keep using ol_flags but include
PKT_RX_VLAN_STRIPPED bit as part of the VLAN tags check.

Change-Id: Ic4ad8f04e44658dc0a99de0232fdc949cfa13e93
Signed-off-by: John Lo <loj@cisco.com>
2016-12-16 14:29:31 +00:00
9225dee965 make test: improve robustness and performance
Introduce an API which asserts empty capture for interface.
Throw exception in old API if the capture does not exist, thus
making it clear if the test expects packets to arrive or not.
Improve performance by not doing sleeps after starting the packet
generator, rather lazily deleting captures when needed.
Fix wrong usage of packet.show() in various tests.

Change-Id: I456cb23316eef99b3f35f80344fe595c4db9a21c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-16 08:09:40 +00:00
cc53285baf Expand ethernet-input node speed-path for non-L2 paths
Improve ethernet-input speed path for untagged packets to also handle
L3 and other forwarding paths. In the IP4 forwarding path for untagged
IP4 packets, per packet clock count in ethernet-input node is reduced
to ~14 clocks from ~43 clocks.

Change-Id: I8e6f121820e056d6085dff3eb95d6913fc422f99
Signed-off-by: John Lo <loj@cisco.com>
2016-12-15 14:29:10 +00:00
fb9931ff16 LISP: Fix several control plane message issues, VPP-558
* Fix TTL in map-regster message (defaults to 15 minutes)
* Handle multiple local EID registration in a for loop
* Parse multiple records in map-notifies, not only one
* Parse map-notify in the worker thread instead of the main thread

Change-Id: Ife68c2227bc5abf14c19f1a948a88d34de3b4af9
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-12-15 09:53:28 +00:00
d4cfe15965 Fix NPE in JNI while handling int arrays, VPP-559
Change-Id: Idc3760b65e62cfa5d37dd7379e35331b7f95f913
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-12-15 07:38:08 +01:00
cb630ff691 Ping response in a VRF context uses correct FIB for response
Change-Id: I3b626a1fb9d74ebc609ded14c16c5e3d5a1655ab
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-14 16:09:14 +00:00
8c2f05c2dc IP and MPLS route debug CLI fixes
Change-Id: I1b61f36c88308c1bcf9a61a87843d1fea457d8fe
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-14 12:25:23 +00:00
9f9d07b801 make test: improve virtualenv patching process
Change-Id: I5041bdc733c4da633d83f60f7db7747b4d0b8894
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-14 08:55:40 +00:00
bc5643d180 Fix coverity build-break, VPP-255
Change-Id: I6a68f2ba5e7a5c76ac4e6b3e8f7cf695b1d66c54
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-13 18:22:53 -05:00
04f4b78ce2 vpp_papi: Add help() support for python interactive mode
The python api 1.3 removed the ability to call 'help' in interactive
mode.

example:
> help(vpp.sw_interface_span_enable_disable)
Help on function sw_interface_span_enable_disable in module vpp_papi.vpp_papi:

sw_interface_span_enable_disable(**kwargs)
    u16 _vl_msg_id, u32 client_index, u32 context, u32 sw_if_index_from, u32 sw_if_index_to, u8 state

Change-Id: Iea1944fdc862482490174ff966592cf3c8208a98
Signed-off-by: Christophe Fontaine <christophe.fontaine@qosmos.com>
2016-12-13 16:24:21 +00:00
cdab4bde04 LISP: Move parsing of LISP map-reply to worker thread, VPP-554
Change-Id: I2c3093068b97bb3ed10e1ecb067fc297013d063c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-12-13 15:43:03 +00:00
b1e7ead54b ACL: Install ACL JSON in install directory.
Change-Id: I3f7dbd23114acf37322f97da80be746616a9d95d
Signed-off-by: Ole Troan <ot@cisco.com>
2016-12-13 12:32:14 +00:00
deb6984471 make test: Use VXLAN built in scapy 2.3.3
- fix documentation issues.
- fix mpls test.

Change-Id: Ieef6b4b5e4aca99e89bd03e45a991be89d42adba
Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-12-13 07:06:56 +01:00
abd98b2c88 Update CSIT tests 161204 -> 161211
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I141dad311139d2b819352fab6038d440f76c7fc2
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2016-12-12 18:42:19 +00:00
f78a70d494 snat: Hairpinning (VPP-444)
Change-Id: I73881ef32d547852da96e77402a1758f37e812d5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-12-12 13:45:06 +00:00
1a419f2b63 make test: remove unneeded print
Change-Id: I99242486371cea230e72974a7fc8768ffee9af62
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-12 13:44:29 +00:00
4d4899390c ip4: perf optimization in the ip4-input node
Change-Id: I9ddbbf8ce0d7307b9eb82ccd0c51f84e479ffd23
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-12 13:05:00 +00:00
1b6f902046 ipsec: go straight to lookup after esp encrypt
Currently, IPsec tunnel traffic goes to ip4-input/ip6-input after esp-encrypt.
It is not necessary to check that the new IP header is valid (if it is not
valid then we have otehr issues).

Instead, just send packets straight to ip4-lookup/ip6-lookup after esp-encrypt.

Change-Id: I5e35d500cb0f33f418f8554ed1f4390f02b6647d
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2016-12-12 13:03:27 +00:00
64bc612d4c Fix for PAPI async call registration
Introduce async API call registration

Change-Id: Iccc89eca1b6e7dcce96a8e7bc5da80d9abc363fc
Signed-off-by: Wojciech Dec <wdec@cisco.com>
2016-12-12 11:37:15 +01:00
9ca18c604a MPLS Nodes Dual Loop
Change-Id: Ic54d4cb9dec8e91446b9b4d2b40ed69a14bd4355
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-11 14:14:30 +00:00
fa0fb5821a VRF imported FIB entry should inherit the flags from the export entry.
Change-Id: Ie2c3d62a468315390ef2c4314a73cff0f6d3cdaf
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-11 14:10:05 +00:00
4a72c8e0d9 ioam: trace plugin read api fix
-fix verify job failures

Change-Id: I0756f4b6577d58598702185ebe6f8ed9db23b0fa
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
2016-12-10 04:30:59 -08:00
892e076a1e ip4: perf optimization in the ip4-rewrite node
This change shows around 7% improvement in ip4 path
when ip4-output features are not used.

Change-Id: I81c1c4c38c99fff0ad8270d3c0df907acf1d8c58
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-09 21:43:23 +00:00
5929085918 python api rpm packaging - json files are not executables
Change-Id: If8231aad2b95cf9e06cd8c95978e6a3128cdf084
Signed-off-by: Gabriel Ganne <gabriel.ganne@qosmos.com>
2016-12-09 20:13:28 +00:00
b4bc55b9d7 ioam: pot plugin - pot profile read API
Addition of read API to ioam-pot plugin which returns the current
pot profile(s) configured

Change-Id: I188e53811391e053860009dde3719612a2446521
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
2016-12-09 20:12:55 +00:00
d24625fbd1 ioam:trace plugin - trace profile read API
Addition of read API to ioam-trace plugin which returns the current
trace profile configured

Change-Id: Ibe2baf0f60fb2a74ddc140747b53128aba975aaa
Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
2016-12-09 20:12:18 +00:00
0ebe8d7d76 Add FIB unit test to 'make test'
Change-Id: I57126416f57649768f3601cd715c7f5f4b9b9fad
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-09 20:11:30 +00:00
637b9c4531 BFD: handle timing wheel prematurely firing events
Improve handling of timeouts. Add a workaround for when timing wheel
fires an event a tiny amount of time before it should actually be
fired.  Don't delete unneeded events at all from timing wheel, instead
ignoring unexpected events. Enable the skipped BFD test, which passes
now.

Change-Id: I6ffd4fc0ba7a049ffe63bb0e5290641a7300dd6f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-09 20:10:02 +00:00
0279b29f32 Add make test code coverage reporting using gcov
Change-Id: Ia8247841fdbe76e1d888aab49ae213b4216af273
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-12-09 20:09:35 +00:00
d7cb1b5f22 Coding standards cleanup for vnet/vnet/ip, VPP-255
Change-Id: I12892fa571cc50e0541d6463a8b68e1b618edd9f
Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-09 11:47:00 -05:00
b78292efdf VPP-547: Fix for co-existence of HbH and RH header in Segment routing:
1. sr-rewrite - SR insertion in v6 : SR RH is inserted immediately after v6 header
but if hbh header is present as per RFC2460 it should immediately follow
v6 header. This is fixed.
2. sr-local : v6 packet destined to a sr segment is received if hbh is present
it is not handed over to sr-local for processing. fixed ip6-local handling to
skip hbh as there is no register handler for hbh for now.
3. sr-replicate - update in dual of sr_rewrite to handle replicate, fixes in
sr-replicate to handle presence of hbh header

Change-Id: I034523a42d2fedf97134761f956ab534babb8b36
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-12-09 14:57:21 +00:00
16a14cdb16 make test: FIB add/update/delete - ip4 routes
- JIRA:CSIT-483

Change-Id: Idb4c5bd7a234bc975f3380ece58c0e8d4bfdafd9
Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-12-09 09:03:19 +00:00
82a06a9335 When waiting for an IPv6 response, filter non-ND packets
Change-Id: Ia5f5e00db84022bb7ee89a1b9d036fffa734295a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2016-12-09 09:02:36 +00:00
199ca9c449 DPDK HQoS: enable vpp control plane thread connection to hqos thread
The vpp control plane thread generates different types of packets such as ARP,
DHCP client, IPv6 RA, etc. which need to go through HQoS thread associated
with the output interfaces. Therefore, this patch enables vpp main thread
connection with the HQoS thread through dedicated SWQ.

Change-Id: Idcb759546d4bcd9b40beedaec4f12b29baae3e40
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2016-12-09 09:00:56 +00:00
e4504c6320 BFD: fix timing in the main loop
Properly wakeup the main process loop only when necessary to avoid
missed events. Improve BFD unit test reliability and speed. Add
timestamps to logs and replace Queue with more efficient deque.

Change-Id: I01255a02057d3146917b43b669ccdc74f31ef0c8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-12-09 09:00:26 +00:00
56912c896a Add extra validation for VXLAN packets and tunnels
- On VXLAN packet decap, validate its DIP against VXLAN tunnel.
- Add extra logic to validate and handle creation of multicast
  VXLAN tunnels.

Change-Id: I6abdddd7be4cd9f1bcfc88d9970ba681fdd72f7c
Signed-off-by: John Lo <loj@cisco.com>
2016-12-09 09:00:11 +00:00