2840 Commits

Author SHA1 Message Date
Steve Shin
9a6fcef43c LLDP: Add Management Address TLV
- Management Address TLV is added as per IEEE Std 802.1AB-2009.
- Support of management ipv4/ipv6 addresses and OID.

Change-Id: I57c14741774390809ce5a829cc087947424432c7
Signed-off-by: Steve Shin <jonshin@cisco.com>
2017-10-12 13:57:11 +00:00
Marco Varlese
34acce2574 Add support for packaging SUSE RPMs.
This patch adds a new spec file for SUSE distribution and modifies the
Makefile to learn which platform is building the RPMs for.

Change-Id: Ic8ee0ddf978042cc1785ebc28bd1a6c9faf9bb74
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-10-12 02:41:26 +00:00
Florin Coras
de706084f6 tcp: do not format sb if not established (VPP-1018)
Change-Id: I011dda118f37cb31a37dda270027612d0af57ca0
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 87f141172212b7568f519653ab32ebd1b5d34344)
2017-10-12 01:44:12 +00:00
Steven
b5a1160be5 VCL: Add REUSEADDR, BROADCAST, and V6ONLY to vppcom_session_attr API
1. Add the subject enum type
2. Fix a typo for the clib_warning

Change-Id: I59f6d15d51c66b96022d51592d65c41755c1582a
Signed-off-by: Steven <sluong@cisco.com>
2017-10-12 01:43:17 +00:00
Keith Burns (alagalah)
b327c2b954 Initial push of vcl-ldpreload to extras
- fix checkstyle

Change-Id: I4317757258ed6a65b8fae1377f17db39375282ac
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Signed-off-by: shrinivasan ganapathy <shrinivasanganapathy@gmail.com>
2017-10-12 01:38:54 +00:00
Damjan Marion
c517020977 Revert "VPP-1001 - update AF Packet Driver to for modern kernels"
Issues observed with specific kernel versions, e.g. stock Ubuntu 16.04
kernel.

This reverts commit 3eab064e3fadaf2a6a128f167ad04ca0319b4e17.

Change-Id: I24241f3b580df749fc686af3a319011ca035fb5e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-10-11 21:11:53 +00:00
Damjan Marion
a472f868d6 test: retry 3 times if test fails during verify
Change-Id: Ib1cb7f09c444f3667904eade935eb220f327b6fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-10-11 20:05:34 +00:00
John DeNisco
68b0ee3a38 Redhat and small system support
Initial 17.10 commit
Final 17.07 cleanup, 17.10 next
Added CentOS grub support, this should complete the CentOS support
Added Centos install/unistall
Added TCP parameters.

Change-Id: I064e3a4118969ac36e62924a6a3f8a98f132ba60
Signed-off-by: John DeNisco <jdenisco@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-11 18:45:41 +00:00
Dave Wallace
35830af800 Add VCL session get/set attributes api function.
Change-Id: I72b0c063e89bf8299699dafec2a7e0395b86c8b9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-10 22:05:52 +00:00
Florin Coras
cea194d8f9 session: add support for application namespacing
Applications are now provided the option to select the namespace they
are to be attached to and the scope of their attachement. Application
namespaces are meant to:
1) constrain the scope of communication through the network by
association with source interfaces and/or fib tables that provide the
source ips to be used and limit the scope of routing
2) provide a namespace local scope to session layer communication, as
opposed to the global scope provided by 1). That is, sessions can be
established without assistance from transport and network layers.
Albeit, zero/local-host ip addresses must still be provided in session
establishment messages due to existing application idiosyncrasies. This
mode of communication uses shared-memory fifos (cut-through sessions)
exclusively.

If applications request no namespace, they are assigned to the default
one, which at its turn uses the default fib. Applications can request
access to both local and global scopes for a namespace. If no scope is
specified, session layer defaults to the global one.

When a sw_if_index is provided for a namespace, zero-ip (INADDR_ANY)
binds are converted to binds to the requested interface.

Change-Id: Ia0f660bbf7eec7f89673f75b4821fc7c3d58e3d1
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-10 20:42:50 +00:00
Damjan Marion
1f36a93d3d dpdk: fix mempool size calculation
Change-Id: I5b48310c46ca8a2143b2132110240d7e9a52c25d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-10-10 17:04:16 +00:00
Klement Sekera
df2b980daf make test: add RETRIES option
Change-Id: Ibe31e932bc997f0101a8947e01df90a90d1f100f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-10-10 16:48:38 +00:00
Matej Perina
ac1a728650 jvpp: adding callbacks for all messages (VPP-914)
1) In the previous version callbacks were generated based on
request-replay naming conventions. It turned out they were too
strict in case of events (e.g. BFD sends Details messages as
notifications). So now we generate callback for all messages,
allowing to receive any message as notification.(callback_gen.py)
2) "notification" suffix is no longer added because all messages
are treated same (dto_gen.py, jvpp_c_gen_.py)
3) name of property that holds notification/events changed in callback
facade and future apis
4) JVppNotification.java is no longer used since all events are treated
equally

Change-Id: I13f6438affc3473040d63cd4acb3984d03e97482
Signed-off-by: Matej <matej.perina@pantheon.tech>
2017-10-10 16:44:03 +00:00
Neale Ranns
d91c1dbdb3 punt and drop features:
- new IPv4 and IPv6 feature arcs on the punt and drop nodes
 - new features:
   - redirect punted traffic to an interface and nexthop
   - police punted traffic.

Change-Id: I53be8bf4e06545add8a3619e462de5ffedd0a95c
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-10-10 16:42:39 +00:00
Steve Shin
268e64e312 dpdk: patch to support bonded interface for MLX NIC
At present, creating bonding devices using --vdev is broken for PMD like
mlx5 as it is neither UIO nor VFIO based and hence PMD driver is unknown
to find_port_id_by_pci_addr().

This DPDK patch fixes parsing PCI ID from bonding device params by verifying
it in RTE PCI bus, rather than checking dev->kdrv.

Change-Id: If575f63ef31733102566610d769ddd212d74736a
Signed-off-by: Steve Shin <jonshin@cisco.com>
2017-10-10 16:35:35 +00:00
Marco Varlese
50ec721119 openSUSE packages fix.
Adding the capability for CLANG for various opensuse distros.
Added rpm-build package to build RPMs.
Tiny edit for correct error message.

Change-Id: I96a1e009d1daa44cbf8d0df60fc24091a50688d7
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-10-10 13:28:13 +00:00
Ole Troan
7504e99a8b API versioning: Fix coverity errors from strncpy()
Change-Id: Ife87f9b00f918ff1bb8c91c6f13ebe53a3555a12
Signed-off-by: Ole Troan <ot@cisco.com>
2017-10-10 08:44:24 +02:00
Eyal Bari
755b1403da TEST,L2-FIB:refactor test-removing shared state
and remove dependencies between tests

Change-Id: I6ceacfdeb65b2d3c64811309358c3bfd47b213ef
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-10-09 19:27:34 +00:00
Neale Ranns
8edad036f1 IP neighbour move incorrectly placed jump label
Change-Id: I19fdf13a4848306ee3841d822b832cba96c5bce5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-10-09 16:37:28 +00:00
Dave Barach
0d056e5ede vppapigen: support per-file (major,minor,patch) version stamps
Add one of these statements to foo.api:

  vl_api_version 1.2.3

to generate a version tuple stanza in foo.api.h:

/****** Version tuple *****/

vl_api_version_tuple(foo, 1, 2, 3)

Change-Id: Ic514439e4677999daa8463a94f948f76b132ff15
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>
2017-10-09 13:32:40 +02:00
Matus Fabian
87da476db0 NAT: hairpinning rework (VPP-1003)
Change-Id: I7c6911cd6ac366fe62675fd0ff8b0246a25ea1db
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-10-09 10:53:40 +00:00
Matus Fabian
deabc7f731 NAT: fixed ICMP broken translation for GRE tunnel interface (VPP-1008)
Change-Id: Ie3245b96c511cc30915e70e8c881f445291a38c2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-10-09 10:52:52 +00:00
Pierre Pfister
56a868429b fix buffer allocation for sparse jumbo frames in vhost
A bug was reported where a jumbo packet would stay in vhost
queue forever or until a large enough number of other packets
arrived in the queue too.

This is due to a bug in vhost input node buffer allocation.

The fix is to make sure that vhost always allocates at least
enough buffers for one single big packet. '40' is used to
account for 65kB frames.

Change-Id: I1d293028854165083e30cd798fab9d4140230b78
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
(cherry picked from commit 67700d41169ac37d21c400949a316750eabad969)
2017-10-09 03:37:58 +00:00
Marco Varlese
c2e63feb62 Allow use of /etc/os-release file
The top-level Makefile in VPP already uses the file /etc/os-release to
recognize which OS the build is being performed on.
The scripts for vagrant images instead were still using different files
for different distros and adding a new distro to be supported causes
issues with the extra-logic to deal with it.
This patch aligns the vagrant scripts to use the same approach followed
by the top-level Makefile and simplifies the steps to identify / update
the OS and build / run VPP.

Change-Id: I539f4a7c27b3fef70ed1c12b0276049bc47dc289
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-10-09 02:41:01 +00:00
Chris Luke
e9aebf9db5 Coverity fixes for API socket
- Coverity whines about a zero-length field not being initialized.
  Change the struct setup to an initializer which will implicitly zero
  all unused fields, and add the coverity notation that should stop
  it whining. One or both of these should shut it up!
- Fix some incorrect use of ntohl that was tainting values; in these
  cases htonl should have been used, and avoid a double-swap.

Change-Id: I00493a77eb23a0b8feb647165ee349e1e9d5cfdb
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-10-06 23:02:47 +00:00
Dave Wallace
f7f809c298 VCL: add epoll_* functions.
Change-Id: Ife27795ea96919c116fb6ff33d106663b54df72d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-06 12:25:10 +00:00
Steven
4cd2576674 tuntap: Introduce per thread structure to suport multi-threads
https://gerrit.fd.io/r/#/c/8551/ decoupled the global variable,
namely tm->iovecs from TX and RX. However, to support multi-threads,
we have to eliminate the use of this global variable with per thread
variable. I notice that rx_buffers must also be per thread variable.
So, we introduce per thread struct to contain rx_buffers and iovecs.
Each thread will find the per thread struct with thread_index.

Change-Id: I61abf2fdace8d722525a382ac72f0d04a173b9ce
Signed-off-by: Steven <sluong@cisco.com>
2017-10-06 08:56:59 +00:00
Marco Varlese
b598f1d3d7 Initial GENEVE TUNNEL implementation and tests.
Notes on this first implementation:
* First version of the implementation does NOT support GENEVE OPTIONS
HEADER: it isn't well understood what the purpose of the OPTIONS will be and/or
what content would be placed in the variable option data;

Once the IETF work will evolve and further information will be available
it could be possible to modify the frame rewrite to contemplate the
actual GENEVE OPTIONS.

Change-Id: Iddfe6f408cc45bb0800f00ce6a3e302e48a4ed52
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-10-06 08:51:09 +00:00
Hongjun Ni
4e5ceefb55 Separate CP and DP fib table for PPPoE
CP table: link_table
DP table: session_table

Change-Id: I2adbfd8f6a63d51d00d6dd291f32aebf20d13e4d
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-10-06 08:22:50 +00:00
Sergio Gonzalez Monroy
db93cd9713 dpdk/ipsec: rework plus improved cli commands
This patch reworks the DPDK ipsec implementation including the cryptodev
management as well as replacing new cli commands for better usability.

For the data path:
 - The dpdk-esp-encrypt-post node is not necessary anymore.
 - IPv4 packets in the decrypt path are sent to ip4-input-no-checksum instead
 of ip4-input.

The DPDK cryptodev cli commands are replaced by the following new commands:
 - show dpdk crypto devices
 - show dpdk crypto placement [verbose]
 - set dpdk crypto placement (<device> <thread> | auto)
 - clear dpdk crypto placement <device> [<thread>]
 - show dpdk crypto pools

Change-Id: I47324517ede82d3e6e0e9f9c71c1a3433714b27b
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-10-05 09:54:34 +00:00
Dave Barach
7939f90460 Clean up "show api ring" debug CLI
Add a primary svm_region_t pointer to the api_main_t so we can always
find the primary region, even when processing an API message from a
memfd segment.

Change-Id: I07fffe2ac1088ce44de10a34bc771ddc93af967d
Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-05 09:51:41 +00:00
Neale Ranns
6f63115603 Distributed Virtual Router Support
A distributed virtual router works by attmpeting to switch a packet, but on failing to find a local consumer (i.e. the packet is destined to a locally attached host) then the packet is sent unmodified 'upstream' to where the rest of the 'distributed' router is present. When L3 switching a packet this means the L2 header must not be modifed. This patch adds a 'l2-bridge' object to the L3 FIB which re-injects packets from the L3 path back into the L2 path - use with extreme caution.

Change-Id: I069724eb45956647d7980cbe40a80a788ee6ee82
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-10-05 09:50:26 +00:00
Christophe Fontaine
d3c008d108 [aarch64] Fixes CLI crashes on dpaa2 platform.
- always use 'va_args' as pointer in all format_* functions
- u32 for all 'indent' params as it's declaration was inconsistent

Change-Id: Ic5799309a6b104c9b50fec309cba789c8da99e79
Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
2017-10-04 17:31:13 +00:00
Marco Varlese
9bce0f6d7c Packages dependencies: added clang3_8 and indent packages
Change-Id: I4ed2d5f7e743369e2a41cfcb93b016d928cfed95
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2017-10-04 15:03:12 +00:00
Klement Sekera
6b6bd9d0b2 checkstyle: add clang-format dependency, fix bug
Change-Id: I608d3b73700d57652b015a9fc09300e99386a37f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-10-04 15:02:29 +00:00
Neale Ranns
d867a7cf6b Set MAC address needs the HW interface index
Change-Id: I7b175d57b85e626aab00221b6dac0498aebcbeae
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-10-04 15:01:49 +00:00
Damjan Marion
206243c1b7 dpdk: use vpp physmem allocator for dpdk buffers
This allows us to have single contignuous allocation for DPDK buffers
with single mmap FD, so buffer memory can be easily shared with diffrent
process.

As a consequence dpdk socket-mem is no longer in charge for allocating
buffer memory, but still we need some space allocated for dpdk
structures so default socket-mem is reduced form 256 to 64 MB.

For a default of 16K buffers per numa node, physmem allocation is now
40MB, so basically this change reduces footprint from 256MB per socket
to 48 (64 + 40).

Change-Id: Ic8cfe83930a18411545b37a12b14aac89affd04f
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-10-04 10:46:51 +00:00
Neale Ranns
7b7ba572ab Dump of deag/lookup routes has is_drop=1 (VPP-995)
Change-Id: I58772a83e22885a9ea8a7a981d2bcb4b31a050d2
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-10-04 09:53:41 +00:00
Jakub Grajciar
e2a4f07200 libmemif: memif_rx_burst fix
Change-Id: I2f488fef828df8915b57552567e1be79efe69700
Signed-off-by: Jakub Grajciar <Jakub.Grajciar@pantheon.tech>
2017-10-04 09:48:00 +00:00
Steven
9fefa9a697 memif: crash on slave mode
Crash was seen on recent image with this BT on top of the stack

(gdb) bt full
    (mif=0x7fffb6226568) at
    /vpp/build-data/../src/plugins/memif/memif.c:297
        ring = 0x0 <<<<<<<<<<
        i = 0
        j = 0
        buffer_offset = 65792
        r = 0x7fffb5e59f80
        alloc = {flags = 1, name = 0x7fffb449f965 "memif region",
          size = 4260096, numa_node = 0, addr = 0x7fff41dac000,
          fd = 11,
          log2_page_size = 12, n_pages = 1041}
        err = 0x0
        __FUNCTION__ = "memif_init_regions_and_queues"

The crash happened at this line.
      ring = memif_get_ring (mif, MEMIF_RING_S2M, i);
      ring=>head = ring->tail = 0; <=====

Please note that the crash is caused by dereferencing NULL rinng.
Put breakpoint into the function. I notice that
mif->regions[0].shm is not initialized.

(gdb) p mif->regions[0].shm
$8 = (void *) 0x0

It looks like we forgot to set shm after clib_mem_vm_ext_alloc().
Add the missing cide and the crash is fixed.

Change-Id: Ib722a6c241c77acfa8e33962106b57faa50e1ea7
Signed-off-by: Steven <sluong@cisco.com>
2017-10-04 09:46:26 +00:00
Jan Gelety
62549fec3b Update CSIT tests 170926 -> 171002
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I6331016b17b0811bf0ea1be03c5782428514a01a
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-10-04 09:44:53 +00:00
Anton Ivanov
3eab064e3f VPP-1001 - update AF Packet Driver to for modern kernels
1. Add VNET headers support for checksumming - required
to operate correctly on any recent Linux

2. Bypass QDISC on transmit - improves performance by ~ 5%.
Enabled only if the macro is detected - apparently not
present on archaic distributions.

This still does not solve all issues with TSO - it can be
fixed only by going to tpacket v3 and dynamic rx ring as
well as significant changes in the TX (sendmmsg?).

Change-Id: Iea14ade12586c0a8da49e6dd1012108a08bc85b3
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
2017-10-04 09:42:23 +00:00
Matthew Smith
2802953096 Add API support to dump IPsec SAs
Add an API request message type to dump IPsec SAs. Either
all IPsec SAs can be dumped or it can be limited to a single
SA ID (numeric ID set at creation time - not an index).
Add a handler for incoming messages with the new request type.
Add an API response message type containing the data
for an IPsec SA.
Add VAT support for new message type.

Change-Id: Id7828d000efc637dee7f988a87d3f707a8b466b7
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2017-10-04 09:37:03 +00:00
Florin Coras
780fc39506 api: fix internal client registrations
Makes sure vlib_rp and shmem_hdr are initialized for internal
registrations. They are needed for keepalive msg exchanges.

Change-Id: I805dec2d2aa84b1efdc1fdd692fc1d94389b776e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-03 23:53:35 +00:00
John Lo
5a6508d726 Update L2FIB entry timestamp only if BD aging enabled (VPP-1002)
Change L2 learning path so it update stale timestamp in MAC entry
only if aging is enabled on the BD for the MAC entry.

Change-Id: I7babe986ceef3c030d8ef9185076c42b405f7b0f
Signed-off-by: John Lo <loj@cisco.com>
2017-10-03 18:59:25 +00:00
eyal bari
c6038c91ad L2FIB,TEST:add max macs in event test
Change-Id: Ied72d44f8695af524751ffc54196cc3ac1addc85
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-10-03 17:17:16 +00:00
Florin Coras
a096f2d182 tcp: updates to connection closing procedure (VPP-996)
- add separate TIME_WAIT time constant
- fix output node for TIME_WAIT acks
- ensure snd_nxt is snd_una_max after retransmitting fin
- debugging improvements

Change-Id: Ic947153346979853f2526824b229126e47aead86
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-03 11:05:55 +00:00
Matej Perina
b4d3c96f89 jvpp: added logs for sending and receiving event messages (VPP-982)
Change-Id: I47f9d12d934378f18c6f841b902af2a64ee7b187
Signed-off-by: Matej Perina <mperina@cisco.com>
2017-10-03 11:04:18 +00:00
Dave Barach
59b2565cd9 Repair vlib API socket server
- Teach vpp_api_test to send/receive API messages over sockets
- Add memfd-based shared memory
- Add api messages to create memfd-based shared memory segments
- vpp_api_test supports both socket and shared memory segment connections
- vpp_api_test pivot from socket to shared memory API messaging
- add socket client support to libvlibclient.so
- dead client reaper sends ping messages, container-friendly
- dead client reaper falls back to kill (<pid>, 0) live checking
  if e.g. a python app goes silent for tens of seconds
- handle ping messages in python client support code
- teach show api ring about pairwise shared-memory segments
- fix ip probing of already resolved destinations (VPP-998)

We'll need this work to implement proper host-stack client isolation

Change-Id: Ic23b65f75c854d0393d9a2e9d6b122a9551be769
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-03 11:03:47 +00:00
Jon Loeliger
35ffa3e8f6 Propagate duplicate IF addr add/del error up to API.
Identify and complain when the same IP prefix is assigned
to two different SW interfaces:

    vpp# set int ip address TenGigabitEthernet6/0/0 1.2.3.4/32
    vpp# set int ip address TenGigabitEthernet6/0/1 1.2.3.4/32
    set interface ip address: Prefix 1.2.3.4/32 already found on
	interface TenGigabitEthernet6/0/0

Change-Id: I1aee1b6a7ddd00d3109a53d8e1b6ce97bf45e372
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2017-10-03 10:15:53 +00:00