758 Commits

Author SHA1 Message Date
Ed Warnicke
ec6290a8a5 VPP-127: Make rpm/deb provide vpp group to access vpp-api
Change-Id: I80b7f55034d64ad8360e29c669002948317c64ba
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-06-08 18:12:37 -05:00
Ed Warnicke
40c6639428 VPP-124: Fix rpms to work out of the box.
Currently, for vpp we are not building any rpms for dpdk or igb_uio.
This is because uio_pci_generic as shipped with centos works with vpp.
However, our vpp rpms do not install kernel module uio_pci_generic at
start up and the /etc/vpp/startup.conf does not configure vpp to use
uio_pci_generic.

vpp rpms should do both, so that when the vpp rpm is installed and
vpp started, it just works out of the box.

This patch fixes the rpms to do so.

Change-Id: Ib934b51f9271cded466d235aa4044bef75c35960
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-06-08 14:41:40 -05:00
Maros Marsalek
2f0a7a880c Increase jvpp connection timeout
Change-Id: I4d52c113336deac80dfcbad91b21a7a70eea2213
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
2016-06-08 11:40:32 +00:00
Dave Barach
599839d12d VPP-83: fix collateral damage
Accidentally removed pthread_mutex_unlock (&root_rp->mutex) in the
dead client scan case. Oops. Bad idea.

Change-Id: I488b7e39d01c267052785bd346e8846351db90a9
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-07 18:28:51 -04:00
Damjan Marion
c883fa7cdb Fix missing null termination in DPDK EAL Args
Change-Id: I8292628ad359a19e02ff79568d773ad2b1af51ec
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-07 21:50:37 +02:00
Damjan Marion
b54db102ac Adjust buffer data offset based on rte_mbuff data_off
This commit removes assumption that all packets have
data offset equal to RTE_PKTMBUF_HEADROOM. Some drivers
like fm10K receive packets with different data offset.

Change-Id: I0aba6296458dab9df6fff639b4b827b2084ddc3e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-07 19:29:28 +00:00
Damjan Marion
19414deeaa Rebase DPDK patches
Change-Id: I3ef9faceb085bd06b55e3ba7800389eaae56177a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-07 16:34:44 +00:00
John Lo
3ef822e1c3 VPP-110: vxlan encap node should never touch a deleted tunnel
Remove usage of dummy encap string for output from BD to a tunnel which
has been deleted. Instead, use a node l2-outpt-del-tunnel so that if
there are stale entries in the L2FIB for any deleted tunnel sw_if_index,
l2-output will send packets using this entry to the l2-output-tunnel-del
node which just setup the proper drop reason before sending packets
to the error-drop node to drop the packet.

Change-Id: I590982ee25e924ab74e2855c55c58baf29a9fad4
Signed-off-by: John Lo <loj@cisco.com>
2016-06-07 09:14:07 -04:00
Shesha Sreenivasamurthy
30097b5d22 Multicore support for vCGN
Locks are used while populating DB, which is once
    once per entry. Therefore, it is not in the performance
    critical path. Each thread is a PMD, therefore, spin locks
    are used instead of mutexes.

Change-Id: I4bc297f73a8f3eafebed1f00e51ec75ca24163f6
Signed-off-by: Shesha Sreenivasamurthy <shesha@cisco.com>
2016-06-07 11:30:34 +00:00
Marek Gradzki
97d99518d7 Add u32[] type handling in reply messages to jvpp
Change-Id: I9fd0cd49e4636d5d8978567fa914487785035c8a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-06-07 11:28:58 +00:00
Hongjun Ni
cccd1bfdd0 Fix link down issue of vxlan-gpe interface
Change-Id: Iaf72e7ffb2d30799733f641d66bbc74f40a4d6e1
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-06-07 11:28:22 +00:00
Ole Troan
944f548d10 IPv6 HBH: Refactor code. Separate out RFC2460 HBH handling and the more experimental
IOAM code. Support dynamically adding options. By default
          only process HBH if explicitly configured to. Otherwise we'll just set
          ourselves up to be a victim of DOS.

Change-Id: I41cdfdc00aeaa0cf568e4463440b89be761b6b7d
Signed-off-by: Ole Troan <ot@cisco.com>
2016-06-07 11:22:29 +00:00
Filip Tehlar
6f91cfe4aa ONE-18: Fix trailing garbage string in LISP status dump API
Change-Id: I5cba5eae5a981e41df3f227834a079e10982537f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-06-07 11:10:10 +00:00
Damjan Marion
39da6211a3 Add startup conf options to set per-interface descriptor ring size
This patch introduces following 2 startup options:

  num-rx-desc
  num-tx-desc

Which can be specified under the dpdk { dev PCI_ADDR {...} } or
dpdk { dev default {...} } .

"show hardware" output is extended to display what is set:

TenGigabitEthernet2/0/0            5    down  TenGigabitEthernet2/0/0
  Ethernet address 90:e2:ba:96:d0:54
  Intel 82599
    carrier up full duplex speed 10000 mtu 9216
    rx queues 2, rx desc 512, tx queues 2, tx desc 1024
    cpu socket 0

Change-Id: Ia832885c8e5cf0eb0575367e97581e7065934753
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-06 13:29:30 +02:00
Pierre Pfister
3535222f97 VPP-94: Add build-data directory for plugins and Makefile target
Commit e36af5f3153 moved sample-plugin a dedicated directory.
The build system could not find sources for sample-plugin-* targets.
This commit adds a dedicated build-data/packages directory for
plugins and moves sample-plugin.mk there.

Change-Id: I9e3ee8858580e86ff6d4f7317300df0a5e239a01
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-05 13:56:19 +00:00
Dave Wallace
431cd2f150 VPP-112: linux kernel info missing from build log
Change-Id: I343418d409d682b00e74e41236382fdc6b3c780c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2016-06-05 13:49:40 +00:00
John Lo
7185c3bb68 VPP-113: BVI shall filter unicast DMAC for L2 to L3 forwading
As BVI receive a packet with unicast DMAC from the BD, including unknown
unicast flood packet, the packet should not be L3 forwarded unless its
DMAC matches the MAC of the BVI.

Change-Id: I46e18629c901062592c8ebe3a238c5cfdc1096b4
Signed-off-by: John Lo <loj@cisco.com>
2016-06-05 13:48:31 +00:00
Damjan Marion
c68b4cbf3a Add per-device startup config support
This change adds support for providing per-interface
parameters in the startup config.

Sample configuration:

  dpdk {
    dev default {
      num-rx-queues 3
      num-tx-queues 3
    }

    dev 0000:02:00.0 {
      num-rx-queues 2
      num-tx-queues 2
    }

    dev 0000:02:00.1
  }

Change-Id: Ia7d9ae2ac9c4fd9baaa480d061a395f8a421a722
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-05 13:46:05 +00:00
Thomas Monjalon
96e10b554f dpdk: download from dpdk.org
The tarball repository fast.dpdk.org is fast and reliable enough
to be used in VPP build process.

Change-Id: Ifaae57d6f8308127b93fc51b2a2a863da5766cd2
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-05 08:45:40 +00:00
Dave Barach
08602d129b Add dpdk config parameter: poll-sleep <nn>
Sleep <nn> milliseconds after each dpdk input device poll, useful when
oversubscribing CPUs.

Change-Id: I90ad1f21dae7eeeda56bfe845911118aa46f83ec
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-04 14:11:15 -04:00
John Lo
0128e59938 VPP-100: Fix IP4 local handling of TCP/IP fragmented packet
Fix previous change that does not work on little endian machines.
Use inline call ip4_is_fragment() which is endian neutral.

Change-Id: I5a35d89d936650ab6c628dfc388b8c992a74a589
Signed-off-by: John Lo <loj@cisco.com>
2016-06-04 00:53:44 +00:00
Dave Barach
2b54e996d4 Sample plugin moved to .../plugins/sample-plugin
Change-Id: I6de20c9883d6918899c4b5b03e900814961e824d
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-03 15:27:27 -04:00
Ed Warnicke
227fe26987 VPP-107 Fix for mistake that breaks pkg-rpm in
https://gerrit.fd.io/r/#/c/1338/

Change-Id: I8b7fffe24cbeb435b18faaada9ef1cea9fd93d39
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-06-03 00:30:09 +00:00
Chris Luke
4b8b718ff9 VPP-92 Fixup some srv6 issues
Some small fixes to the srv6 code to bring it toward
conformance with draft-previdi-6man-segment-routing-header-05.

- The first segment needs to remain in the segment list.
- The segment list template needs a space for the ultimate
  destination.
- The ultimate destination needs to be inserted into that
  space when adding the SRH.

Change-Id: I66db6912e0128da084f14ceca20918ef67ccff79
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-02 20:58:38 +00:00
John Lo
4cd850e7b2 VPP-106: Patch e40i driver to support VLAN sub-interface
Check packet for presence of VLAN tag in the MAC header and set
the PKT_RX_VLAN_PKT flag to trigger sub-interface lookup in VPP
ethernet-input node.

Change-Id: Iadbfc59d08ef85efb936c88323a90194f3cd656f
Signed-off-by: John Lo <loj@cisco.com>
2016-06-02 20:46:12 +00:00
Chris Luke
e544360053 VPP-91 fix sr tunnel add_del collision check
The add_del function was not properly checking if a tunnel already
existed; instead it was checking if the given tunnel name existed.
If no tunnel name was given it flat out refused to add a tunnel
even though that is optional.

Cleanup the add/del parameter validation to "do what I expect" it
to do:

When adding a tunnel:
- If a "name" is given, it must not exist.
- The "key" is always checked, and must not exist.

When deleting a tunnel:
- If the "name" is given, and it exists, then use it.
- If the "name" is not given, use the "key".
- If the "name" and the "key" are given, then both must point to the
  same thing.

Change-Id: I9b48ae0203f9664cf8af0f7dc49bf480ddec10d5
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-02 11:28:59 -04:00
John Lo
3419d0b9c1 VPP-100: Fix IPv4 local handling of IP fragmented packets
Before VPP is enhenced to do IP reassembly of local packets, just set
the protocol path to "experimental" for now so they will be error-punted
as unknow IP protocol.

Change-Id: I2ffefb0b4205357653ba24d80c722cafd5972fba
Signed-off-by: John Lo <loj@cisco.com>
2016-06-02 14:16:05 +00:00
Chris Luke
079d86e8c8 VPP-105 Map API SHM uid/gid name to number
When providing uid or gid for the API SHM, if non-numeric values
are given look them up in the local system user database and if
found use the values discovered.

Change-Id: I95152f58646643bc44d2af4cbad6338901935c69
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-01 23:51:25 +00:00
Dave Barach
16c75df797 VPP-83 Allow non-privileged clients to use the vpp binary API.
Use the command line argument "api-segment { uid <nnn> gid <nnn> }" to
configure shared memory segment file ownership. Defaults to uid = gid
= 0.  Shared-memory segments are explicitly set to 0770 mode, aka
"rwxrwx---".

Change-Id: Ic5d596b68139add61e7de6ace035c57dfd030111
Signed-off-by: Dave Barach <dave@barachs.net>
2016-06-01 20:05:08 +00:00
Chris Luke
c79491571f VPP-98 Dedicated storage for VXLAN over IPv6 hash keys
When creating VXLAN over IPv6 the code was using storage for the
hash key that could later be moved. Since the key is larger than
the word size this was being referenced as a pointer; when the
storage moves that breaks the hash.

Instead allocate dedicated storage for the key.

This patch also includes other minor cleanups, including using
clib_memcpy in places it should be used and some whitespace
fixes.

Change-Id: I579f2cb515853ef56dedcca350fcad08aa6111a9
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-01 19:55:56 +00:00
Thomas Monjalon
9d6c0ab311 vagrant: disable automatic update on start
The box update requires an internet connection.
It is better to disable it on vagrant start.
It still can be updated with the manual command:
	vagrant box update

Change-Id: I04e05ea08477bf36f25672c54d0a057d995d4a42
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-01 10:26:16 +02:00
Ed Warnicke
750c62548e Fix build-root/scripts/version to not have spurious ~
Change-Id: Id28f134e3a4aa19c5756014d53004501db0d0c88
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-05-31 21:46:45 +00:00
Marek Gradzki
34e7772443 Fix u16 type handling in jvpp
Change-Id: I6e5ed2562c65dde6c9f6f085c8b9d40f80684894
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-05-31 21:19:07 +00:00
John Lo
cb51846ae0 VPP-102: vHost reconnect to previously used sockets on VPP restart
Change-Id: Ida11bddb52268e0e8513b7b379eeed6103bd48f1
Signed-off-by: John Lo <loj@cisco.com>
2016-05-31 21:06:13 +00:00
John Lo
17f17cb44f VPP97: Flooding of pkts with multiple buffers in BD with BVI crashes VPP
The loopback interface should use vnet_interface_output_no_flatten so
follow-on buffers of a jumbo packet do not get put on the output frame
and be sent back to ethernet-input or l2-input node.

The replication_recycle_callback() function should not assume follow-on
buffers of a jumbo packet are on the buffer free list.

Change-Id: Ide646a6d9b43e82782c0581ea3022a9e70f82582
Signed-off-by: John Lo <loj@cisco.com>
2016-05-31 20:28:40 +00:00
Florin Coras
1d3b2abc2c Fix hash table bogus read in ip6 vxlan-gpe
- consistent use of hash_*_mem methods.
- tunnel setup copies the key from the wrong location
- remove extraneous storage for keys copied from the vxlan
  node that is not applicable here

Change-Id: I419fd30a52ba387104abe467c296de85233823d1
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-31 19:38:50 +00:00
Filip Tehlar
58f886ab9a Add CLI/API for clearing all remote mappings
Change-Id: I5aef12d3a9c8daefff52e5f958c504f5d2ff9fd0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-31 18:50:39 +00:00
Andrej Kozemcak
6a2e4392e9 ONE-15: Fix duplicate locator, refactoring locator
Check duplication locator and clean after locator when remove it.
Refactoring locator_set code.

Change-Id: Ib83cbcddc7a363a60fa5b6a366203d0dc0ea7ca6
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-05-31 14:48:22 +02:00
Filip Tehlar
d1c5cc3930 ONE-16: Locators are not properly cleaned
Change-Id: Ia6eaaa9a741e84cbd0ff957cfd9a7143a3d0a977
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-31 11:19:39 +00:00
Hongjun Ni
0e06e2b142 Add Dump API for VxLAN-GPE tunnel
Change-Id: I4913fe6c4b1280939147887896aea9b79a9f7f10
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-05-30 03:31:13 +00:00
Chris Luke
4b46c84901 VPP-84 af_packet retry on EAGAIN, count on errors
When af_packet signals the kernel that there are packets in the tx
ring with sendto() the kernel sometimes responds with EAGAIN.
Previously the af_packet driver would treat any error from sendto()
as fatal.

Whilst there's not much we can do about this, count the errors
and let's try to not die on the spot or sit in a loop forever.

Change-Id: Id76ba5e07b744f1ed6f348ec838a1ac506a381c9
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-28 16:34:39 +00:00
John Lo
1220afe52a VPP-96 ENID driver update for rx of jumbo pkts using muliple mbuf's
Change-Id: I0e985b079da3224f4886e3ee2cece4d046e291eb
Signed-off-by: John Lo <loj@cisco.com>
2016-05-28 15:47:11 +00:00
Hongjun Ni
473ec878f9 Fix VxLAN-GPE add_del API issue
Change-Id: I4210b3320d3fe841ba7ff1349b6a52affc047338
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-05-29 01:27:14 +08:00
Chris Luke
404be66978 VPP-95 VXLAN add_del API intermittent failure
The VXLAN add_del API sometimes rejects calls with
VNET_API_ERROR_SAME_SRC_DST when the two parameters are obviously
different. This is because the API code is checking the "is_ip6" flag in
a not-yet initialized area of memory leading to random results.

Also fix help text for vxlan_add_del_tunnel in vat.

This does not change the API; it repairs intermittent failure.

Change-Id: I41863694f478c1f669078f82f69d8cca4841c989
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-05-27 12:13:51 -04:00
Damjan Marion
68c69d8967 Fix dpdk march/mtune defaults
Change-Id: I6e6940c8467a331b37da153bb8a2154c1d165261
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-27 10:17:45 +02:00
Filip Tehlar
f747cd8b9b Add show command for LISP map resolvers
Change-Id: I3ed6269f9a307b50b56ce04defc2576a139c6add
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-05-26 16:47:11 +02:00
Damjan Marion
64ae669038 Move dpdk startup config data to separate struct
This is preparation work for moving DPDK
EAL and mempool initialization to vlib.

Change-Id: I2dc35aa53edec0e07fc2650d630aa625831154c3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-05-25 18:45:07 +02:00
Andrej Kozemcak
94e34764b4 ONE-14: Fix crash when re-enable Lisp
Change-Id: Ib95338d7055dea9036eddb7dff5ca7ccbcb35639
Signed-off-by: Andrej Kozemcak <akozemca@cisco.com>
2016-05-25 13:34:53 +02:00
Hongjun Ni
df921cc65a Add Vxlan-Gpe over IPv6
PatchSet4: consolidate code as per comments.

PatchSet3: simplify the code using ip_udp_encap_one/two

PatchSet2: consolidate comments and indent style

Change-Id: Ia8b43f854a46d77e838e198566200ad28fd72472
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2016-05-25 10:42:43 +00:00
Marek Gradzki
c4cb44c05d VPP-86: fix array copy in generated JNI code
Change-Id: Ic67b3c0623d98c5ee3f1ffa1e1bd9cfb96b233bd
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2016-05-24 15:44:28 +00:00