290 Commits

Author SHA1 Message Date
Damjan Marion
28e3db9dd6 Add options to link with external DPDK tree
By uncommenting following lines in the build-data/platforms/vpp.mk
VPP links nicely with packaged DPDK 2.2 distributed with
Ubuntu 16.04 LTS.

vpp_uses_external_dpdk = yes
vpp_dpdk_inc_dir = /usr/include/dpdk
vpp_dpdk_lib_dir = /usr/lib
vpp_dpdk_shared_lib = yes

Change-Id: Id5b7d95bac6aa60341933b92e86d949a9abf1a5d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-01 15:22:15 +00:00
Damjan Marion
aa04a0ff8e Add option to link DPDK dynamically
Change-Id: Ie2b47f9020c8260b199d141103318a0261e16832
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-01 16:38:33 +02:00
Damjan Marion
102ec52bc4 Add support for installing ipv4 routes via unresolved next hop
Change-Id: I71f3ba0c8192fe0ac3b5b81fb1275b64ec02876a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-04-01 10:38:42 +00:00
Damjan Marion
b02e49c4be Enable af_packet interfaces in the API test apps
Change-Id: Ic1247a712614df2762c95142122ff122076fd0ab
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-31 17:44:25 +02:00
Dave Barach
459a11a07a Remove historical tags, fix the debug tag
Change-Id: I013784aeef5ae6b5ba4a30c7759e9daff3c2c576
Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-30 10:24:56 -04:00
Damjan Marion
0df78dda5a Add DPDK 16.04-rc2 support
Can be used by specifying DPDK_VERSION=16.04-rc2 in the make command line

Change-Id: I657b44d7ca22f1ef57756e7703088020fab12bc6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-29 21:25:12 +00:00
John Lo
23650e6cad Update ENIC driver patches for DPDK 2.2.0
This includes all patches in ENIC driver which are up-streamed to DPDK
to improve RX performance, fix buffer/error handling and interoperation
with link bonding PMD library.

Change-Id: Id4c71a350d5234834951f9261c69db5476ba396b
Signed-off-by: John Lo <loj@cisco.com>
2016-03-29 16:14:35 -04:00
Dave Barach
13f3c450cc Support per-interface packet rx redirection
Change-Id: I8bb6124efa5665053620b48d11c8160472103c29
Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-29 11:56:55 -04:00
Damjan Marion
dab123ba69 Add abbility to specify dpdk tarball download base url
Change-Id: Ieceb0b1f4ab69609961d8946f627dd9311963da5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-29 15:24:49 +00:00
Ed Warnicke
31854abeb9 Fix to centos vagrant file
Change-Id: I5ceae4354c029cb92527b2eeb1a71b76dc2b0311
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-03-29 08:27:30 -05:00
Damjan Marion
f1bd8bec87 Move classify_table_index under the union
Fields needed only by specific adj type should
be shared.

Change-Id: I59ee15a29d2f5f527f46910a1a63866b291734c7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-29 12:50:53 +00:00
Dave Barach
b2ef4dde97 Adjacency allocator
Change-Id: Ieacbfa4dbbfd13b38eaa2d37f618f212cef4e492
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-29 12:46:42 +02:00
Ed Warnicke
3c79e65bd6 Fix epl-release in make install-dep for rpm
Change-Id: I01a7421dc58ee6683eb84482bb92dd6a519a21e8
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-03-29 09:00:29 +00:00
Jurek Matuszewski
a69318b7f7 Increment MRU if hardware supports CRC stripping
Change-Id: I46bd007c3c75e5fb872c1beba557e6140fa8d715
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-29 08:59:46 +00:00
Todd Foggoa (tfoggoa)
ad8b4728cb Allow vlans to be programmed on 40GE VF interfaces
Change-Id: Ia3a1bf7cb482f0aa98628b23d88de01cf60c46a9
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-29 08:52:27 +00:00
Todd Foggoa (tfoggoa)
4b9fb50010 Mark some show commands as mp safe
Change-Id: I92cd378370feeddf27832acde06f186fbdf64908
Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
2016-03-29 08:51:59 +00:00
Dave Barach
e5389bb053 event logger skeletons, improve debug CLI
Change-Id: Ieb2e4043fc7bc3b4a5436a7a6aa35f573d8d4506
Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-28 17:12:36 -04:00
Dave Barach
fb6e59d839 Improve main-loop event-logs
Change-Id: I984debeffe0dce36c9e7ab963f25d862cc7550cc
Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-26 18:45:52 -04:00
Shwetha
20a64f5f8a iOAM trace configuration APIs
Change-Id: I6d31f0ddb812d148ad065e27775440d09f402def
Signed-off-by: Shwetha <shwethab@cisco.com>
2016-03-25 20:57:19 +00:00
Damjan Marion
1901020228 Use rte_mempool private data for storing vlib_buffer_t
Change-Id: If3fc88a35bc0b736376113a39667caea42802ea1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-25 20:55:15 +00:00
Ed Warnicke
46040a513b Fix distclean to correctly handle Centos
Change-Id: I3f930306e9f384011687d2ce88052639df0d966b
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-03-25 20:37:40 +00:00
Ed Warnicke
c841eac773 Fix vagrant centos flavor to work with top level make file
Change-Id: I89044ed27130a036536ed33aba847034ed15ad7d
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-03-25 20:37:28 +00:00
Damjan Marion
1d49c98f7f vpp-api-test and sample-plugin should depend on dpdk conditionally
Change-Id: Ie26340141fdbd3256e305ab37f4baa817081bf46
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-25 20:34:59 +00:00
Ed Warnicke
84eda9de0b Add build-root/*.rpm to .gitignore
Change-Id: I88398b5e538271efa4657851bf53c9b76a56b432
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-03-25 20:28:48 +00:00
Damjan Marion
aca36e1bd2 Remove unnecesary clib_bitmap_set from af_packet input node
Change-Id: I856fefd52efdfc0a3b8be8bafa3f3106267dfcf1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-25 20:06:39 +01:00
Pierre Pfister
d6f5b96e6f l2-rw: Packet rewrite feature for L2 bridges
This patch defines a new l2input feature: l2-rw
It makes use of vnet_classify in order to match
packets and applies mask/value changes depending
on the matched classify entry.

Change-Id: Ia98c128931e59195bf3ecb66721e155ff9049a2e
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-03-24 17:49:44 +00:00
Damjan Marion
2e89a894a4 Reduce number of parallel gcc invocations from 4 to 2 per cpu
Some build hosts can run out of memory during compilation.
This should reduce memory demand without affecting build time.

Change-Id: I11bd2884a1f8885a8a332bbbf0a63324a3079c3b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-24 17:20:14 +01:00
John Lo
e2efecec42 Fix L2 flood packet replication interaction with VXLAN-tunnel
The check for input sw_if_index against output sw_if_index is not correct
for the interface on the replication order after VXLAN tunnel because the
encap code overwrite packet sw_if_index[VLIB_RX] with that of the VXLAN
tunnel sw_if_index. The check should be done using sw_if_index[VLIB_RX]
saved in the packet context.

Change-Id: I175717221409977e80576e84dfe5362d1f6aed2f
Signed-off-by: John Lo <loj@cisco.com>
2016-03-23 19:44:39 -04:00
John Lo
d90df1820a Add dpdk vmxnet3 driver patch and init.c change to allow jumbo packets
Change-Id: I9d7f8b9a0543d885ed10908b859d52a80bf89f56
Signed-off-by: John Lo <loj@cisco.com>
2016-03-23 16:42:33 -04:00
Pierre Pfister
3a8f32be9f tapcli: Receive vector of packets and memory leak fix
tapcli interfaces were creating single-packet frames.
It now calls readv until the frame is full, or
readv returns error EAGAIN.
This is usefull when a significant amount of traffic
flows through tap interfaces.
This patch also fixes a memory leak by correctly
initializing b->clone_count to zero.

Change-Id: I15e435ba76d542be2f263274e76297425cd10243
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-03-22 11:48:32 +00:00
Damjan Marion
d56209695a Unbreak build on gcc-5
Change-Id: I0dc5f48ade786b60b34441c30f3de5b9f373d714
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-21 19:09:09 +01:00
Dave Barach
f39ff74346 vnet classifier debug CLI enhancements
Extensible next-index and opaque unformat function scheme. Added
next-index-by-node-name and sw_if_index->opaque functions.

Allow dynamic graph arcs to be added to ip4/6-inacl.

Change-Id: Ie434335399a0708772eb82563a154df19c63b622
Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-20 10:15:24 -04:00
rangan
4f81085a77 * Added support to configure trace type as a
configuration parameter.  This can be any combination
  of nodeid, interface indices, timestamp and appdata.
  This configuration is passed through packet header by
  encap node to all other nodes. Rewrite buffer is resized
  accordingly. Trace function modified accordingly.
* Added CLI 'show ioam summary' command to display various
  configuration.
* Added CLI 'clear ioam rewrite'

Change-Id: Ide4c85f8b22561303df48519c5ea59668a300188
Signed-off-by: rangan <rangan@cisco.com>
2016-03-19 13:43:52 +00:00
Dave Barach
acf0872108 cosmetic: indent code
Gerrit wouldn't merge the previous attempt, so let's just make the
pain go away...

Change-Id: Ia008d43f755b6e3a5f4c699de365d241bf361aa9
Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-19 08:54:10 -04:00
Nagaprabhanjan Bellari
a0005dc347 Add llc_init in osi_init to ensure init order dependency
Change-Id: I5cb2a319384e49a072d75f3ea05e6fb92e381c23
Signed-off-by: Nagaprabhanjan Bellari <nagp.lists@gmail.com>
2016-03-19 12:46:08 +00:00
Keith Burns (alagalah)
ca46d8c501 Adminis-trivia - rename skel files
- rename skels so M-x skel-<tab> gives catalog

Change-Id: Ice25a4ce4d02d09e076f0de51e8443cfab20688d
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-03-19 12:41:20 +00:00
Damjan Marion
eec8d3e220 add ctags and cscope files to .gitignore
Change-Id: I047cc41a5d0c4a6e4191ca35c505ff21236abcfa
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-18 15:03:18 +00:00
Ed Warnicke
76a66c1f06 Add -y to apt-get install for install-dep target
This allows install-dep to be run non-interactively

Change-Id: I5c3e55958ed16dd3d128bbad9f317d9f2428d41a
Signed-off-by: Ed Warnicke <eaw@cisco.com>
2016-03-18 15:02:24 +00:00
Dave Barach
ba8c540c52 Fix longstanding next-frame clone bug
Do not propagate flags into cloned vlib_next_frame_t's.
vlib_next_frame_init(...) sets nf->frame_index to ~0. If it turns out
that the original flags include VLIB_FRAME_IS_ALLOCATED, the wheels
fall off. And so on.

Change-Id: I8de18653acfcc8eb20cee36f4eb5b9e82234f21b
Signed-off-by: Dave Barach <dave@barachs.net>
2016-03-18 14:53:07 +00:00
Pierre Pfister
cb656303df vnet_classify: Handle non-aligned vectors and various bugfixes
classifier used to crash when packet data was not aligned.
This commit also includes:
- writer lock initialization bugfix
- CLI help was missing opaque-index
- ip_input_acl was applying the mask on buffer->data instead of packet head

On a side note, my tests failed to show any improvements
when using SSE. Further tests might be interesting to see if they
actually perform better.

Change-Id: Ic34eecd6a2226919121ffce2fe4324506deee52f
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-03-18 14:22:37 +00:00
Dave Barach
dbf19ca7f9 Make adjacencies shareable
Change-Id: I620871ca715b751d2e487f37341b7118797c9176
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-18 12:59:51 +01:00
Todd Foggoa
4ea4ecdda9 Bring back p1.c so plugins can see DPDK symbols
Change-Id: Ia450c9bc6d00fbd054d41a462366f826121d781d
Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
2016-03-17 14:23:14 -04:00
Damjan Marion
89b3398a81 Reincarnate call to unix_physmem_init() for non-dpdk use
Change-Id: Iaa3da32060e78bbc505ee84a2a6393f899aa110e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-17 12:09:37 +00:00
Damjan Marion
aaf2acddb3 Don't stop binding pci device if write to new_id fails
In some cases write to new_id fails but binding is still
possible.

Change-Id: I1944eab4326a08e85e83cd5cd7379c6a4d03d98d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-17 12:46:57 +01:00
Damjan Marion
e6f9023ff0 Few additions to top-level Makefile
* Added option to specify target platform (e.g. export PLATFORM=vpp_lite)
* Added ctags targed to (re)build ctags database
* Added cscope targed to (re)build cscope database

Change-Id: I93feb7b458abe9fbd93000f75b7be24e3865f089
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-17 09:16:47 +00:00
Damjan Marion
048ee2ebe5 af_packet: vec functions should not be used on pool
Change-Id: Ifc67db0575a7517ac24519894996906ea44ead67
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-16 22:59:21 +01:00
Dave Wallace
334806ccc2 Add VLIB_INIT_FUNCTION() to dual-loop-skel
Change-Id: I4aafad8a3e4c0c57eef1940fac8debfb80bbb137
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2016-03-16 20:07:48 +00:00
Damjan Marion
83243a0ff5 Add vpp native linux kernel AF_PACKET interface support
This is 1st drop of VPP native driver for linux AF_PACKET.

New CLI:

  create host-interface name <host-if-name>  [hw-addr <mac-address>]

References:
 - Documentation/networking/packet_mmap.txt in the Linux kernel tree
 - man 7 packet

Known issues:
 - attaching to linux bridge doesn't work
 - it is not expected to work in multicore setup

Change-Id: I1cb1c3d305f349759e90e76e25696718b73bd73d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-16 20:27:52 +01:00
Damjan Marion
b8abf877ba Declare node, hw_interface_class and device_class instances as external
This fixes issue observed on Ubuntu 16.04 where
dynamic loader is not finding correct instance of
specific structure.

Change-Id: I618d0933c7e171b8a9b40495b36894785af7790a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-03-14 20:43:12 +01:00
Jean-Mickael Guerin
8941ec2cb4 fix declaration of symbol of different size
I got many warnings at the link step with gcc version 5.3.1 20160225 (Ubuntu 5.3.1-10ubuntu2):

/usr/bin/ld: Warning: size of symbol `cop_input_node' changed from 112 in vnet/cop/.libs/cop.o to 168 in vnet/cop/.libs/node1.o
/usr/bin/ld: Warning: size of symbol `ethernet_input_node' changed from 112 in vnet/.libs/interface.o to 136 in vnet/ethernet/.libs/node.o
/usr/bin/ld: Warning: size of symbol `l2output_node' changed from 112 in vnet/l2/.libs/l2_efp_filter.o to 120 in vnet/l2/.libs/l2_output.o
/usr/bin/ld: Warning: size of symbol `srp_input_node' changed from 112 in vnet/srp/.libs/format.o to 136 in vnet/srp/.libs/node.o
/usr/bin/ld: Warning: size of symbol `vxlan_encap_node' changed from 112 in vnet/vxlan/.libs/vxlan.o to 128 in vnet/vxlan/.libs/encap.o
/usr/bin/ld: Warning: size of symbol `vxlan_input_node' changed from 112 in vnet/vxlan/.libs/vxlan.o to 144 in vnet/vxlan/.libs/decap.o
...

Looking at vlib_node_registration_t, I think the reason is that
the char * next_nodes[] could be bigger where the variable is defined
in .c file.

We should mark global variables as external in header files.

Some of them can be made static.

Change-Id: Ieb6961fd08180c9a69e1d884852703f3eb23f23f
Signed-off-by: Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>
2016-03-14 12:40:17 +00:00