855 Commits

Author SHA1 Message Date
Damjan Marion
ddbdd4f993 packet-generator: fix pcap stream support
Change-Id: I494280964deda1d9448540cb5c6e7a8b750fff93
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-09 00:54:52 +00:00
Dave Barach
8a7fb0cf68 fd-io-styleify for svm
Change-Id: I816de8b1f255dc3bc6d2904566ea0b0f68fac5d8
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-08 14:44:38 -04:00
Chris Luke
49a6963b13 VPP-192 ip_neighbor_add_del incomplete vat help
Adds missing items to ip_neighbor_add_del help text

Change-Id: I1d74c7d31ec6d96f8de9bfb5bfc7872b9cbef682
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-07-08 16:53:46 +00:00
Dave Barach
371e4e19d1 fd-io-styleify pass
Change-Id: I72d0dff064162d11321257c858f68da1ba79ea48
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-08 15:11:40 +00:00
Dave Barach
9b8ffd99fb fd-io-styleify pass
Change-Id: If2d57a213fc2fec996db26df332910c3d2105f97
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-08 14:18:22 +00:00
Yoann Desmouceaux
0557a91ca7 IPv6 frag: avoid overflow while parsing extension headers
A malicious packet could advertise an extension header length bigger than
the actual packet length, which would cause an overflow.

Change-Id: I277123e6fde6937b0170f2b2e33846bd22848ac4
Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
2016-07-08 14:17:19 +00:00
Filip Tehlar
4d5cabde54 Add locator prority and weight to LISP API
Change-Id: Ifa9bcd9a9c5dbda00ff8096909ccbc822445b8cb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-07-08 14:15:37 +00:00
Damjan Marion
bbae375ca2 Remove unnecessary and obsolete configure.ac directives
Also enable silent rules where missing

Change-Id: Ia521886815c862b013f01df4cc18fd8a298aaaa1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-08 13:55:35 +00:00
Damjan Marion
952f4f7422 Update emacs plugin skeleton
Change-Id: I52b370abd8b6fec34b8219a274f2de404e072a97
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-08 13:37:58 +00:00
Juraj Sloboda
ac645ad285 Add IPFIX to vpp-api-test
Change-Id: I32dcfb1c33f0b2324de1ebf08851e8b65793e4ea
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-08 12:38:46 +00:00
Juraj Sloboda
837fbb119c Add binary API for IPFIX
Change-Id: I3346b18126d65b72726e977dfb11ba4c380056c0
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-08 11:24:39 +00:00
Juraj Sloboda
483f668eda Make IPFIX src port configurable
Make src port configurable in flow report sample code

Change-Id: Ic7d3c3de17b83821106a827fb65e79381044da7e
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-08 11:23:48 +00:00
Damjan Marion
905a7f5520 Multiple changes in the plugin build infra
- configure.ac - some plugins are enabled by default
- Plugin .so files are placed into corresponding subdirs
- WITH_PLUGIN_TOOLKIT macro is retired - not needed anymore
- plugins/build-data is removed
- plugin makefiles are not building static libs anymore
- plugin makefiles are not installing header files to /usr/include
  anymore

Change-Id: I55681bd9ce34811f7eb1b2b24d9f0ca42df1cf04
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-08 10:43:38 +00:00
Chris Luke
370e9e38e8 VPP-189 Some bugfixes for issues reported by Coverity
CID 130914 Buffer not null terminated
CID 130916 Unchecked return value
CID 130938 Unchecked return value from library
CID 130939 Unchecked return value from library
CID 130940 Unchecked return value from library
CID 131042 Argument cannot be negative
CID 131222 Resource leak
CID 131223 Resource leak
CID 131334 Double close
CID 131335 Read from pointer after free
CID 131211 Resource leak
CID 131212 Resource leak

Change-Id: Idd80b91f621278e0be15911f2ed4354dbe4fc7f2
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-07-08 09:41:03 +00:00
John Lo
ce3e971bab Allow DPDK per interface startup config to enable/disable VLAN stripping
The init of VIC/ENIC ports enable VLAN stripping of received packets by
default, which is different to all other devices. The VLAN stripping of
ENIC ports can be disabled by adding the per device DPDK config as
"vlan-strip-offload off" such as:
  dpdk {...  dev 0000:0c:00.0 {vlan-strip-offload off} ...}
The per device config "vlan-strip-offload on" can be used for enabling VLAN
stripping for other devices which support this function but is disabled
by default.

Change-Id: I9c81904a87c26868a07900b03677aeeb57f72372
Signed-off-by: John Lo <loj@cisco.com>
2016-07-08 09:38:56 +00:00
Juraj Sloboda
618ab08c4f Reset IPFIX streams after configuration change
Reset IPFIX streams if reconfiguring IP addresses or collector port

Change-Id: Idc914f90462572342d4ed02b538bb2d30b317931
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-08 09:36:48 +00:00
Damjan Marion
a7775387b1 Set plugin path properly when using toplevel makefile to run/debug vpp
Change-Id: Ib6f7dd9d7e1d9f2f2108a8b89421149e4435d5ec
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-08 00:19:12 +00:00
Juraj Sloboda
5a49bb9ef5 Add configuration options for IPFIX
Make Path MTU configurable
Make template resend interval configurable
Make collector port configurable

Change-Id: Ia557916137995ea565f0ede12e169efe81eb0a5d
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-07 20:29:18 +00:00
Juraj Sloboda
86634f0e74 Use arbitrary FIB for IPFIX
Change-Id: I85b3543a3f72a10e15c252e04ce2e4a390513ca9
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-07 20:28:14 +00:00
Neale
e9dbd2b781 VPP-142 Recursive route sending traffic to wrong interface
Indirect routes should always result in an indriect adjacency even when the route's next-hop is covered by a connceted, since the covering route may change and no tracking is in place.
Some de-duplication of code for installing indirect routes via the CLI and API.

Change-Id: I7a440ffba43ae3990b68cb407244c06bd0827534
Signed-off-by: Neale <nranns@cisco.com>
2016-07-07 19:33:43 +00:00
marek zavodsky
689acafcab VPP-148 added bvi_mac flag to l2fib_add_del api call similarly to cli
Change-Id: I3b65e85d24ed37b6889af7e194fee45ec61b15a8
Signed-off-by: marek zavodsky <mazavods@gmail.com>
2016-07-07 19:30:08 +00:00
Juraj Sloboda
0d2a8e7897 Fix bugs and do some optimization in IPFIX code
Change-Id: Iba8627062874eac63c584ec05343f4591f48c286
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-07-07 16:10:08 +00:00
Dave Barach
132d51d4d2 Document more nodes
Change-Id: Ib8ef0559aa0573bf1229e9c794d48520197f9c8a
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-07 16:06:42 +00:00
Dave Barach
708357415d Remove #if DPDK == 0, to eliminate a data structure size mismatch
Otherwise, e.g. the ip4/6_main_t's change size between PLATFORM=vpp
and PLATFORM=vpp_lite. That, in turn, makes it far easier to build
broken plugins.

Change-Id: Ic962d75b170eee698de29c4e29849ce73d27caad
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-07 16:05:59 +00:00
Damjan Marion
57bf403b34 Remove duplicate code buffer_func.h
Change-Id: I57e442b1f3486c5e8caac9d2e288869ee10f37b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-07 15:28:23 +00:00
Filip Tehlar
b93222f7e4 Fix deletion forwarding entries when deleting static remote mapping
Change-Id: I11207a0452cbccfb959ff426faefda4820463007
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-07-07 15:18:26 +00:00
Damjan Marion
3a94475e29 Retire support for DPDK 2.1.0 and older
Change-Id: I3c3427c61e32d4727360aa802950bb9ab44afd84
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-07 12:35:10 +00:00
Dave Barach
9770e20a9e Add some doxygen tags
Also add an index of node names

Change-Id: Id65c2e607976d8bad73deb738035a471be077196
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-07-07 09:33:41 +00:00
Filip Tehlar
1b1ee4f2e5 Add an option to dump details about specific LISP EID in API/CLI
Change-Id: Ie5e6751fd791e7ca728522632332abe442a1a75b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-07-07 08:13:47 +02:00
Damjan Marion
137c7c6126 Retire PLATFORM=virl
Change-Id: Iaf9735258f456574534c1a581b983326badea171
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-06 22:56:56 +00:00
Damjan Marion
3d9c86e9f7 Add support for capturing packets on packet generator interfaces
This patch introduces following changes:
 - 4 predefined pg/stream[0-3] interfaces are removed
 - Interface naming is changed form pg/streamX to pgX where X can be
   any u32 value
 - one pgX interface can handle multiple streams
 - keyword "source pgX" is added to "packet-generator add" command, X is 0
   by default
 - new cli "packet-generator capture" is introduced
 - new cli "create packet-generator interface pgX"

Change-Id: I768d075b9d4a34f0b5073debdc5dd4a0880c682c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-06 22:38:28 +00:00
Mohsin KAZMI
64f450da8f Netmap: Fix Netmap Polling Issue
Previously, netmap node switched from interrupt to polling if
worker threads are enabled even if there was no netmap interface
running. Netmap input node consumed CPU cycles because of input
node calls but these cycles were wasted as input node did not have
any packet to process.

This patch fixes issue stated above using more intelligent way of enabling
or disabling polling based on interfaces count. But the pre-requisite
condition for polling is, worker thread(s) should be enabled.

Change-Id: I3a901823c7b040cce3393958981f439b9f290fe5
Signed-off-by: Mohsin KAZMI <sykazmi@cisco.com>
2016-07-06 20:43:15 +00:00
Jan Srnicek
2e95f5a1d1 VPP-184 - Bad type translation in jvpp
Change-Id: I6dda9eb8d58a2bc9a1e4d6636688dfa1f8bb88c6
Signed-off-by: Jan Srnicek <jan.srnicek@pantheon.tech>
2016-07-06 19:16:58 +00:00
Calvin
31a367417e Bug fix for VPP-104 about not being able to down a sub-if if the super-if is up
Change-Id: I913c9807519aa10e515d12fcfbcbfc22b58f5839
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-07-06 16:47:35 +00:00
John Lo
cbec1a18e2 VPP-182: IPv4 static ARP entries should not be deleted on interface down
IPv4 static ARP entries should remain when interface is set admin-down
and be reapplied on interface admin-up.

Change-Id: Ic0051865154230c2561d6e6421b05d842f147ca7
Signed-off-by: John Lo <loj@cisco.com>
2016-07-06 14:02:21 +00:00
Matus Fabian
141977f60d VPP-177: IPsec empty buffers allocation fix
Change-Id: I6d224fe19f1e0dd7ad5659e0734bc96ba37337ff
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-07-06 09:23:14 +00:00
Calvin
ed9b757a10 VPP-144: Fix that shows the empty segment field in sh sr tunnel
Change-Id: Idc71a48f2eab3b712f6953af8baf1a6ecd54dcaf
Signed-off-by: Calvin <calvin.ference@gmail.com>
2016-07-05 23:25:40 +00:00
Dave Barach
2195706fef VPP-179 Fix adjacency reference-count botches
Change-Id: I3fe83a511064d73087c4526ef33cd7628f15b90f
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-05 13:37:46 -04:00
John Lo
55bf5c9385 ENIC driver patches to address various issues
Also clear x-bit for old patch files 0013-xxx and 0014-xxx.

Change-Id: I217fdbfb32cef1ae575c668270d3baf593e688c6
Signed-off-by: John Lo <loj@cisco.com>
2016-07-05 16:21:35 +00:00
Florin Coras
f727db9e6f LISP CP cleanup and refactoring
- avoid code duplication by using only one function for
  insertion/updating of remote mappings into map-cache. Static remote
  mappings are now inserted using this function as well and therefore
  the code does not try to build forwarding entries out of them now.
- bring up lisp dp interfaces when a vni is bound to a vrf.
- ensure eids are cleaned-up before parsing control plane messages
- ensure map-requests are always sent to default fib
- new API to insert lisp adjacencies as opposed to remote mappings which
  should be replaced post merged in CSIT
- reorganize and group functions according to their purpose and use. No
  need to pre-declare internal functions now.
- this does not touch locator-set logic

Change-Id: Ibcfc0f2d9c1bc1c9eab6e83c1af1b4cf9302ac10
Signed-off-by: Florin Coras <fcoras@cisco.com>
2016-07-04 18:48:50 +00:00
Matus Fabian
7d54a3d120 VPP-174 IPsec API fix
ipsec_sad_add_del_entry and ipsec_spd_add_del_entry parameters with IPv4 address
are always 0.0.0.0

Change-Id: I75cb211ce9069596df4ef1d910e263d22940b9d8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2016-07-04 01:31:56 -07:00
Keith Burns (alagalah)
4b72a5812c Add gtags option to use ctags. Hidden option in Makefile
Change-Id: I6b01c1f2beec37d7aaad1ab9dab303835a9feb49
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2016-07-02 17:54:36 -07:00
Dave Barach
dbacf85fed Finish cleanup of .../plugins/{configure.ac, Makefile.am}
To add a new plugin subdirectory, add this to Makefile.am:

if ENABLE_new_PLUGIN
SUBDIRS += new-plugin
endif

and add this to configure.ac:
PLUGIN(new)

Change-Id: I770a6f4f8f964fd7318a912be486accf46514b59
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-02 10:35:08 -04:00
Damjan Marion
a15568029a Enable PCI extended tags in the DPDK config
This change should improve DPDK performance on 40G+ NICs
with small packets.
It also removes ITR setting for i40e devices, allowing driver to set default.

Change-Id: I70761b155e48fb0281f7c231516d83027bd16ca2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-07-02 12:22:43 +00:00
Dave Barach
20c02cb133 Simple ip4 NAT plugin
Change-Id: Iffe77bf2a05ced41474540ff54a842101aad7c41
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-01 18:20:13 +00:00
Dave Barach
b8dca74c23 VPP-171: fix a set of hw interface recycling bugs
Change-Id: I735292bb2176742acab2295f90956c57e6f7ec1c
Signed-off-by: Dave Barach <dave@barachs.net>
2016-07-01 12:38:29 -04:00
Chris Luke
bfd32fddb3 VPP-163 "show ip6 interface" ignores many addresses
The output of the CLI command "show ip6 interface" shows only the first
link-local address and any globally-scoped addresses. It ignores all
other valid address scopes.

This patch reworks that routine to cover the three main address scopes
("link-local", "global" and "local") and anything else it finds is
grouped under "other").

Rationale for this final grouping is that these other addresses fall under
ranges currently either "reserved" or "multicast" in scope. Whilst it's
good to show if these are present, they are not normally found as link
addresses.

DBGvpp# sh ip6 int tap-0
tap-0 is admin down
	Link-local address(es):
		fe80::e857:7fff:fe77:c1a9/64
	Local unicast address(es):
		fd50:7389:246b:4321::2/64
	Joined group address(es):
		ff02::1
		ff02::2
		ff02::16
		ff02::1:ff77:c1a9
		ff02::1:ff00:2
...

Change-Id: I1d750b3b39c54aa4eb75632d53089640601bcba5
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-06-30 15:19:27 +00:00
Pierre Pfister
371fa44110 Fix buffer leak from L2 flooding replication process
vlib_buffer_free_inline actually checks (b->flags & VLIB_BUFFER_RECYCLE)
in order to decide whether to free the packet or not.
Although the flag was correctly set in replication_prep, it is not removed
by replication_recycle during last iteration.

This patch just removes VLIB_BUFFER_RECYCLE when is_last is set.

Change-Id: I2445ebce908d94d95535e706b40407b4f15906e4
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2016-06-30 14:15:52 +00:00
Filip Tehlar
c4770ecc62 Fix wrong interger type when unformating value in VAT
Since format string "%d" expects a 32 bit value using u8 type in unformat()
results in buffer overflow.

Change-Id: Idee5b588049d7573ddbde56c28030f9db3758493
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2016-06-30 10:01:02 +02:00
Damjan Marion
ec175104cf Fix clang build
Change-Id: I678d7e0a7c91c7daf9feb3ec23a633b96fab56a7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-06-30 01:02:17 +02:00