Commit Graph

5371 Commits

Author SHA1 Message Date
dd89173cc1 Fix L2BD arp termination Test Case
==============================================================================
L2BD arp termination Test Case
==============================================================================
12:02:21,850 Couldn't stat : /tmp/vpp-unittest-TestL2bdArpTerm-_h44qo/stats.sock
L2BD arp term - add 5 hosts, verify arp responses                        OK
L2BD arp term - delete 3 hosts, verify arp responses                     OK
L2BD arp term - recreate BD1, readd 3 hosts, verify arp responses        OK
L2BD arp term - 2 IP4 addrs per host                                     OK
L2BD arp term - create and update 10 IP4-mac pairs                       OK
L2BD arp/ND term - hosts with both ip4/ip6                               OK
L2BD ND term - Add and Del hosts, verify ND replies                      OK
L2BD ND term - Add and update IP+mac, verify ND replies                  OK
L2BD arp term - send garps, verify arp event reports                     OK
L2BD arp term - send duplicate garps, verify suppression                 OK
L2BD arp term - disable ip4 arp events,send garps, verify no events      OK
L2BD ND term - send NS packets verify reports                            OK
L2BD ND term - send duplicate ns, verify suppression                     OK
L2BD ND term - disable ip4 arp events,send ns, verify no events          OK

==============================================================================
TEST RESULTS:
     Scheduled tests: 14
      Executed tests: 14
        Passed tests: 14
==============================================================================

Test run was successful

Change-Id: I6bb1ced11b88080ffaa845d22b0bc471c4f91683
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-30 21:03:36 +00:00
7fff3d2054 Metadata / opaque formatting belongs in vpp
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-30 20:18:54 +00:00
8861c1a1f2 coding-style: missing coding-style-patch
fix coding style

Change-Id: I458d81fa80c509b71edb2021468a89715cb32ae3
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-11-30 17:04:03 +00:00
bb46324d7e IPSEC-AH: fix packet drop
Change-Id: I45b97cfd0c3785bfbf6d142d362bd3d4d56bae00
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-30 17:02:14 +00:00
33177d698e make test: print TEST= values for failed tests
This prints the format strings required to rerun the failed test next to
the failures.

Change-Id: I973d8ae025f026129826356bce265b1e70086d2f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-30 17:01:59 +00:00
774356ad5a GBP: UT more robust for endpoint timeout
Change-Id: Ib78c747fa3e304f7158f8182d060e11e4e778400
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-30 13:04:54 +00:00
0ae445ea11 vcl/test: increase wait time before connect
Also split tests into smaller groups

Change-Id: I35809607b7a59029606bb34b90cfeffd1985fe60
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-30 09:33:50 +00:00
d85de68ec3 vcl: wait for segments with segment handle
Instead of waiting for notification from binary api.

Change-Id: I5ecab857d6bcdbed62d6bb06709570c4cf6b19ea
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-30 09:33:30 +00:00
e4f849c137 API: Add dependency on compiler for API .json and .api generation.
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-30 08:22:39 +00:00
978aa643ca Tests: Fix traceback.
self.assertTrue(packet.haslayer(msg_type))
      File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
        raise self.failureException(msg)
    AssertionError: 0 is not true

* Scapy packet.haslayer() returns 1 or 0.
  Replace with assertEqual(packet.haslayer(), 1) to fix tracebacks.

* Scapy has multiple layers called TCP/UDP
  Specify the module name to prevent namespace collisions.

* Remove duplicate import.

Change-Id: I600f9f330075cd40e1da50f8b2ceb24f645f2c20
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-30 07:43:05 +00:00
fa76a76bf3 session: segment handle in accept/connect notifications
Change-Id: I03884b6cde9d4c38ae13d1994fd8d37d44016ef0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-30 07:21:02 +00:00
4744ddbfe0 session: use endpt fib index if app in default ns
Change-Id: Icf1408c50a6438c81e16033e83b2a76ce6eb0166
Signed-off-by: John Lo <loj@cisco.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-30 06:32:27 +00:00
5588225398 GRE: UT uses new pkt send functions
Change-Id: Icb1767b31421aa1e427498adc82d79307835ee1a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-29 21:57:45 +00:00
10d066eade make test: verify packet counters in ipsec tests
Change-Id: Ia15b40f9d91daf3a325cb8d707b22a1dbc68d9cc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-29 21:56:23 +00:00
5ad75f5dea do not opttimize graph node functions in debug builds
Change-Id: I5b4cd419d317381a06e7e6d703373959f4bbd97b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-29 21:55:10 +00:00
e87865dd85 DHCP: Initialise trace for copied buffers.
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-29 21:54:06 +00:00
6ccc6e9164 vpp_papi: Add custom exceptions.
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-29 19:18:07 +00:00
039a1c2f14 vpp_papi: Fix: raise NotImplemented.
'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-29 18:51:44 +00:00
56d68cb23d Trivial: test_container.py
First argument of a classmethod should be named 'cls'.

Change-Id: Iff4b8d856e57c13a3404dbf6780c1d4add45b36a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-29 18:49:03 +00:00
741865bb76 Trivial: test/test_ipip.py
First argument of a method should be named 'self'.

Change-Id: I7260916ce9d96108202b650dbf7ac8ce4b3aafdc
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-29 17:32:59 +00:00
c9aa7db825 VOM: missing GBP symbol
Change-Id: I6cbed0bce7c78970d5a22ac823d0380d14b73dbc
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-29 06:39:08 -08:00
3460b014a7 api: ip_source_check_interface_add_del api is added.
Change-Id: I4799a9d469c797e54669ff4b50851a9acc849427
Signed-off-by: Chore <s3m2e1.6star@gmail.com>
2018-11-29 13:44:53 +00:00
8e1cc46b2b VOM: deprecate TAP add ip-punt redirect dump
Change-Id: I675e04d9f8bb2a18293cf6dd01581a9dc62882fe
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-29 13:44:12 +00:00
b6a4795397 GBP: l3-out subnets
Change-Id: Id4a20066fc5be716c61a497dfcb4d00dc1dbb28d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-29 12:36:30 +00:00
d40c3e652d gbp: Add support for flow hash profile
Change-Id: Ibea87f21b3403045cc0d865903b94396fe670e79
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-11-29 12:33:54 +00:00
ad1f3e1482 NAT: syslog - sessions logging (VPP-1139)
Change-Id: I6e0b7cf37c1a9ac66f8ac011db29504e57844ee9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-11-29 11:28:29 +00:00
2eb42e7061 test: use smaller timeouts for vcl/ldp tests
Change-Id: Idebd110cbf5f0ddc5d9da5a1975b5d278825d131
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29 11:27:47 +00:00
47c40e2d94 vcl: basic support for apps that fork
- 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-29 11:27:18 +00:00
743ee3e125 GRE: fix VRF unit-tests
Change-Id: Ic6d011065bf062a84fdccdb1726ed3e5ed99cfbc
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-29 09:40:19 +00:00
609e1210c6 VPP-1507: Added binary api to dump configured ip_punt_redirect
Change-Id: I790f7785e183cc9aaffd5b593617c4e12a32e20d
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-11-29 08:49:17 +00:00
dfe4cf48ae ldp: basic multiworker support
Change-Id: Ia794fa7e15dac02c8607c4cee2f119ad9815c0a8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29 08:43:16 +00:00
8be6c40cf3 vppinfra: add pool_dup macro
Change-Id: I192e340bd072d27bf6ddc382347ad5c3ca411bad
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29 08:43:00 +00:00
330bf9387b Export ethernet/mac_address.h as part of API installation.
Change-Id: Ibb6d648948f990280e3cb048ce907f01e5c32b12
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-11-29 08:29:34 +00:00
b8c72a4a8d make test: create virtualenv under /test/
instead of using build-root, use /test/venv directory for virtualenv
similarly, don't pollute build-root with test-built binaries

Change-Id: I1e63c04037eaee718b27b34ef16c9eb0252afa53
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-29 08:22:10 +00:00
040950a59d dpdk-ipsec-nodes multiarch: nodes are formatted in VLIB_NODE_FN style
crypto-input,esp encrypt/decrypt are indicated in CMakefiles

Change-Id: I18ba851c1d4e5633d07c5de61cdaeae938e94982
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-11-29 08:20:40 +00:00
14033aaebd dpdk: bump to DPDK 18.11
Change-Id: Ib6458e56f546bb5b11c23aa5e1afe0f4b5011c08
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-29 08:12:56 +00:00
a173a7a07b MAP: Use bool type in map.api instead of u8.
Change-Id: I4e40bb6d6bf274a27892053f37aeeb81a7278965
Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-29 07:42:23 +00:00
58914254f0 vppapigen: Fix python3 compatibility
Change-Id: I9124fcb755ba43fd8f44712f0940f351c460c5b0
Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-29 07:42:03 +00:00
53fffa1db7 API: Add support for type aliases
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-29 07:39:22 +00:00
4f10db3173 ipsec: move ipsec defs to ipsec.h
Change-Id: Ia3dcd98edb6188deb96a3a99d831e71b2ffa0060
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-29 07:20:45 +00:00
555ea9a105 VPP-1508: vpp_transport_socket.py fix import
Import queue in an py2-py3 compatable way.

Change-Id: I83f166a959c4ee55438e3997edbcb596dc72059f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-29 07:18:16 +00:00
19515acddc Use acquire/release ordering when accessing svm_fifo shared variable cursize
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-28 20:50:21 +00:00
5785e89ba1 vpp_papi: Reserved keywords.
'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-28 16:34:30 +00:00
068ec3809c pmalloc: fix shared hugepage backed mmap on older kernels
Usual suspect, CentOS 7. Kernel doens't like MAP_HUGETLB to be
set together with MAP_SHARED even if we are mapping hugetlb backed file.

Change-Id: I6bb0fe14e9e42286963bb648840279942b2e8307
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-28 16:34:27 +00:00
940d1c8a18 dpdk: allow interface name to be specified from startup.conf
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-28 14:12:22 +00:00
8ebd7929bd cmake: display warning and continue if dpdk not present
Change-Id: I5cb2619444507a159c42ac8401800e90b6541a20
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-28 10:46:50 +01:00
5a5a86987b Remove useless prefetch in ip4-rewrite node
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-28 08:43:46 +00:00
7e713f133a vpp_papi: Use new style classes.
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-28 07:30:40 +00:00
526ad04e01 test/remote_test.py: Fix missing import
Change-Id: I192c33d36f43ae2df0dda509e118f2b920d561ac
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-28 07:28:28 +00:00
30e273b305 ldp: sid to fd mapper for apps with multiple workers
Change-Id: I79585cd6b467b007c3eb9a7668387ff3777de46d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-27 22:55:36 +00:00