1808 Commits

Author SHA1 Message Date
Jan Gelety
8ab4ccc900 Update CSIT tests 170220 -> 170302
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: Ia8078ae23e0e6fb701e141fd0701fb82987743d7
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-03-02 13:40:37 +00:00
Florin Coras
443312bb41 Fix LISP Coverity warning
Change-Id: Id1c3832609859ed004bacba0ced0d07dafd6c409
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-03-02 12:18:13 +00:00
Billy McFall
614c131618 VPP-648: CLI Memory leak with invalid parameter
After VPP-635 was merged, did one more pass. While the code was waiting
to be merged, a few changes were merged to master with the same issue.
This is a few additional changes addressing the same issue. See VPP-635.

Change-Id: I7abeac5c260c1e2e9d9d318fd1aae24cd6932efc
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2017-03-02 12:16:36 +00:00
Klement Sekera
7388448712 BFD: command line interface
Implement command line interface to the BFD binary APIs. Add
corresponding unit tests.

Change-Id: Ia0542d0bc4c8d78e6f7b777a08fd94ebfe4d524f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-03-02 11:56:47 +00:00
Damjan Marion
c3a814be9d dpdk: be a plugin
Change-Id: I238258cdeb77035adc5e88903d824593d0a1da90
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-01 22:06:31 +00:00
Damjan Marion
f71ef1dddf vppinfra: fix issue when copying 16 bytes with clib_memcpy
Current code wos copying same data twice when length is 16.

Change-Id: I8d935b32f61672aaea9789c097a5083ae8f78cdd
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-01 21:38:04 +00:00
Ole Troan
46c75cf65c Initial Release notes for 17.04.
Change-Id: I91a38fe02646438a0cdad92cbb66342a437e8ff9
Signed-off-by: Ole Troan <ot@cisco.com>
2017-03-01 21:34:04 +00:00
Damjan Marion
04ab60edd5 Add MAINTAINERS file
Change-Id: I67819c72a5b3de7bcc7d55ab34f0c95f947578e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-01 20:58:16 +00:00
Dave Barach
68b0fb0c62 VPP-598: tcp stack initial commit
Change-Id: I49e5ce0aae6e4ff634024387ceaf7dbc432a0351
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-03-01 20:25:48 +00:00
Dave Barach
f869028740 Fix buffer template copy
Change-Id: If451c9cb68719fc816999b0330b9be3a0169176a
Signed-off-by: Dave Barach <dave@barachs.net>
2017-03-01 19:06:42 +01:00
Damjan Marion
b3bb10101c devices: vnet_get_aggregate_rx_packets should not be dpdk specific
Change-Id: I1152db4b7d1602653d7d8b2c6cb28cf5c526c4ca
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-03-01 11:11:37 +00:00
Damjan Marion
f7c379403a dpdk: retire support for dpdk 16.07
Change-Id: I8585552c026415340fe9fd0458cb8450da3c4ae2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-02-28 23:26:30 +01:00
John Lo
7100b9cc6f Clear L2 output config on interface mode change to L3 (VPP-651)
With VPP-651, the L2 output config with L2-tag rewrite was not
cleared when a sub-interface is deleted. Subsequently, when the
same sw_if_index was reused for another interface, the L2 output
config with L2-tag rewrite remained on the new interface.

On deleting a (sub-)interface which is in L2 mode, it will be
changed to L3 mode first to clear any L2 config. The L2 to L3 mode
change path did address L2 input config cleanup. It is now fixed
to also clear L2 output config.

Change-Id: I3352a89d92e1b27340a5adcf75bbaa01a5050c29
Signed-off-by: John Lo <loj@cisco.com>
2017-02-28 21:59:13 +00:00
Damjan Marion
c47ed032c6 vlib: add buffer cloning support
Change-Id: I50070611af15b2b4cc29664a8bee4f821ac3c835
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-02-28 21:12:48 +00:00
Dave Barach
05472b625f Fix warning in generated code
Change-Id: Ie56fca84a8a0ed77ee480e8078e6e9b3f4cef105
Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-28 11:23:56 +00:00
Dave Barach
987e11dffe Trace plugin binary API message range allocation
Change-Id: I544a5d2906548607b69f999567b92f802fddddbb
Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-28 11:23:27 +00:00
Klement Sekera
f61bc52eb9 BFD: disable debug prints
Change-Id: I356581f4bdf47b9610b9e50f4f8db9a1510872a7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-02-27 12:49:27 +01:00
Damjan Marion
ff54270773 vlib: add VLIB_BUFFER_EXT_HDR_VALID flag
Change-Id: If56c66dd12eded1cc997087de5fd1b975766c4e2
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-02-27 12:27:43 +00:00
Neale Ranns
39f9d8bd22 [Proxy] ARP tests
Change-Id: I40d6d763b55a26cdee0afef85d1acdd19dd10dd6
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-02-27 12:10:50 +00:00
Filip Tehlar
3e7b569361 Add GPE CLI/API for setting encap mode
Change-Id: Id89e23fb5d275572b2356c073dfa0f55719e1a76
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-02-27 10:20:50 +00:00
Eyal Bari
646ba9b004 fix:vxlan mcast adj - added as ucast dpo adj
Change-Id: Ic2447313075cd46f265202dffaaac894f48ddf6d
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-02-27 08:57:17 +00:00
Dave Barach
a83bc30d06 Load plugins in alphabetical order
API traces contain absolute message numbers.  Loading plugins in
directory (vs. alphabetical) order makes trace replay fragile.

Change-Id: I46b3a3b6a9843a383d42269fca0cf5a789486eaf
Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-26 17:48:51 +00:00
Klement Sekera
239790fd91 BFD: echo function
Change-Id: Ib1e301d62b687d4e42434239e7cd412065c28da0
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-02-26 14:20:24 +00:00
Florin Coras
263440e789 Add NSH to GPE decap path
Change-Id: I97681322fa9ca81736100b4d32eab84868886c7b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-02-25 18:36:51 -08:00
Neale Ranns
5a72c1c151 MFIB: changes to improve route add/delete performance
Change-Id: I063d85200d12b09545ae1c373c7fc69112ae3b34
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-02-25 19:21:48 +00:00
Jan Gelety
b5b2ef5947 Enable tests with VRF reset
- needed to filter out ICMPv6 Neighbor Discovery - Neighbor
  Advertisement packets

- needed to reset routes of reset VRFs learned from ICMPv6
  Neighbor Discovery - Neighbor Advertisement packets after
  run_verify_test()

Change-Id: I8238d8f73428d511ab68ab7765d99ce7dc3a6633
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-02-25 09:45:01 +00:00
Neale Ranns
08a70f177d FIB: 1) fix pool realloc during prefix export. 2) don't walk off the end of the path-extension vector
Change-Id: I8bd8f6917ace089edb1f65bd017b478ee198c03f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-02-24 16:37:23 +00:00
Dave Barach
26cd8c1295 VPP-650: handle buffer failure in vlib_buffer_copy(...)
Change-Id: I6aac48d780fcd935818221044eae50067f225175
Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-24 12:17:01 +00:00
Radu Nicolau
02767e9f2e Fixed QAT device binding and device unbinding when vpp package is removed
Change-Id: I35ad6a42093cad0945df1df09a39c63c4560dce6
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2017-02-24 12:16:38 +00:00
Neale Ranns
bcc6aa4c13 MFIB memory leak. free the per-source interface hash
Change-Id: I0ccb337eb0ed50ccc64193533cd816f6e36e6db5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-02-24 11:16:25 +00:00
Billy McFall
04197eea69 VPP-279: Document changes for vnet/vnet/devices
Add doxygen documentation for dpdk CLI commands.

Outside of adding documentation to the CLI Commands, modified the CLI
code as follows:
* The "set dpdk interface placement" command allows the user to move
  interface/queues to a different thread. But there is only a subset of
  threads that are valid. Updated the "show dpdk interface placement"
  command to display all valid threads, even if all interface/queues
  have been moved off. Updated the "show dpdk interface hqos placement"
  the same way.
* There is a command to modify the Subport attributes, but no way to
  display the changes. Added a "Subport" section to the "show dpdk
  interface hqos" command.
* Reworked the "set dpdk interface hqos subport" command.
  - The current implementation had a local rte_sched_subport_params
    structure and initialized it to default values, then overwrote with
    what was input. The side effect of this is that if all the current
    data is non-default, and a new command is entered with just one
    attribute, all the remaining attrbutes are getting set back to
    default under the cover. Very confusing for the user. Updated the
    code to read the current value and overwrite what has changed.
  - DPDK does not have a read subport data, so no way query the current
    applied values. The set command was not updating the local copy that
    is created at init. Modified the code to store the updated values if
    the DPDK apply function was successful.
  - Several functions repeated the same code to get a pointer to the
    local HQoS data. Added a utility function.get_hqos(..), to perform
    this action. Did not port other code to use new function.
* The "set dpdk interface hqos pktfield" allows the user to set the
  packet fields required for classifiying the incoming packet. The
  classification is across three fields (subport, pipe, tc). The command
  was using 0,1,2 to represent these three fields, but had no
  explanation regarding these magic numbers. Updated the command to take
  the three tokens (subport, pipe, tc) for more clarity. For legacy
  sake, still allow 0,1,2 to be entered. Also updated the "show dpdk
  interface hqos" command to show these tokens.
* The "set dpdk interface hqos tctbl" maps an interface and value 0-63
  to a traffic class and queue. The "show dpdk interface hqos" command
  showed the internal DPDK magic number for traffic class and queue.
  Updated the show command to display what was input instead of the
  magic number.
* The "show dpdk hqos queue" command always returns zeros by default
  because RTE_SCHED_COLLECT_STATS is not defined in DPDK. Took me a
  while to figure out why I wasn't getting values returned. So returned
  an error message if RTE_SCHED_COLLECT_STATS is not defined instead of
  zeros.

Change-Id: I22b640d668245839ee977ef3602175c61d91d24c
Signed-off-by: Billy McFall <bmcfall@redhat.com>
2017-02-24 09:21:31 +00:00
Dave Barach
4a3f69c17f Fix vpp built-in version of api_unformat_sw_if_index(...)
Change-Id: I103fe19a1ecbaf3746ec6b957fa1010458cc9fae
Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-23 09:42:01 +00:00
Filip Tehlar
22dc9df3a8 Remove prints from LISP test
Change-Id: I2776e0a0661794b1c0076519b08807080a1282fb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-02-23 09:12:16 +00:00
Dave Barach
def19da0c9 Clean up "binary-api" help string, arg parse bugs
Change-Id: I12311be8ebd376b8aeac25364d010d70a85c7874
Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-22 17:29:58 -05:00
Filip Tehlar
974cdc6faa Fix LISP and ONE crc marcos
Change-Id: Icd0dba04d8929456228136d1f25c459bffcc6a7a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-02-22 19:17:34 +00:00
Anlu Yan
04f8d3fe25 Support multiple plugin build in the sample-plugin
This follows the setup in the src/plugins directory, and allows
multiple plugin build independent of the main vpp source tree.

Change-Id: I9e20f4087d72ad89c6dc3f505bace4628385a40e
Signed-off-by: Anlu Yan <ayan@cisco.com>
2017-02-22 18:53:17 +00:00
Billy McFall
a9a20e7f69 VPP-635: CLI Memory leak with invalid parameter
In the CLI parsing, below is a common pattern:
  /* Get a line of input. */
  if (!unformat_user (input, unformat_line_input, line_input))
    return 0;

  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
    {
      if (unformat (line_input, "x"))
	x = 1;
      :
      else
	return clib_error_return (0, "unknown input `%U'",
				  format_unformat_error, line_input);
    }
  unformat_free (line_input);

The 'else' returns if an unknown string is encountered. There a memory
leak because the 'unformat_free(line_input)' is not called. There is a
large number of instances of this pattern.

Replaced the previous pattern with:
  /* Get a line of input. */
  if (!unformat_user (input, unformat_line_input, line_input))
    return 0;

  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
    {
      if (unformat (line_input, "x"))
	x = 1;
      :
      else
        {
	  error = clib_error_return (0, "unknown input `%U'",
				     format_unformat_error, line_input);
	  goto done:
        }
    }

  /* ...Remaining code... */

done:
  unformat_free (line_input);
  return error;
}

In multiple files, 'unformat_free (line_input);' was never called, so
there was a memory leak whether an invalid string was entered or not.

Also, there were multiple instance where:
	  error = clib_error_return (0, "unknown input `%U'",
				     format_unformat_error, line_input);
used 'input' as the last parameter instead of 'line_input'. The result
is that output did not contain the substring in error, instead just an
empty string. Fixed all of those as well.

There are a lot of file, and very mind numbing work, so tried to keep
it to a pattern to avoid mistakes.

Change-Id: I8902f0c32a47dd7fb3bb3471a89818571702f1d2
Signed-off-by: Billy McFall <bmcfall@redhat.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2017-02-22 16:23:12 +00:00
Marek Gradzki
2291a36008 jvpp: remove unnecessary msg_id_base caching
Jvpp code uses CRCs to obtain msg IDs.

Checking api_main_t.msg_index_by_name_and_crc is
enough to detect API mismatch.
Calling vl_client_get_first_plugin_msg_id is not needed.

Also fixes VPP-627.

Change-Id: Ie3085dfa458795fa11f17615ac94e76197a1c8cd
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-02-22 15:59:48 +00:00
Neale Ranns
2dd6852d81 Consolidate DHCP v4 and V6 implementation. No functional change intended
The DHCP proxy and VSS information maintained by VPP is the same for v4 and v6, so we can manage this state using the same code.
Packet handling is cleary different, so this is kept separate.

Change-Id: I10f10cc1f7f19debcd4c4b099c6de64e56bb0c69
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-02-16 04:01:06 -08:00
Dave Wallace
c8c5335e3a Add ref to test framework docs in doxygen output.
Change-Id: If3081c4a9dde00cd522d1fc5a7daa9b1849684bf
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-02-22 12:57:28 +00:00
Matus Fabian
2d41f169c8 fix trace frame-queue unformat of index
Change-Id: Id891af5ef3c4afe877282b34cd03fc43886940a3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-02-22 12:56:06 +00:00
Florin Coras
954898f945 Fix last run time update for timer wheel
Change-Id: I9ac04b15440297c154ed1e3fba888915044cb245
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-02-22 12:55:05 +00:00
Jon Loeliger
d45602078d Repair SNAT's IPFIX and IF-add-del test functions.
Inspection shows that the names of two functions:
    api_snat_ipfix_enable_disable()
    api_snat_add_del_interface_addr()
don't match their bodies and have been swapped.
Make the world right again by swapping them to match.

Change-Id: Ieefd7f0fdbf52794e8649b0cbbcf6e1403c1b90a
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2017-02-22 12:54:29 +00:00
Filip Tehlar
694396dc58 Add Overlay Network Engine API
Change-Id: I6b5984df176688f0722a2888e73f05d8ed8b9310
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-02-21 23:29:45 +00:00
Neale Ranns
20a175a184 dhcp: multiple additions
DHCP additions:
1) DHCPv4 will only relay a message back to the client, if the Option82 information is present. So make this the default.
2) It is no longer possible to select via the API to "insert circuit ID" - since this is now default
3) Remove the version 2 API since it's now the same as version 1.
4) Adding the VSS option is now conditional only on the presence of VSS config (not the 'insert' option in the set API)
5) DHCP proxy dump via API

Change-Id: Ia7271ba8c1d4dbf34a02c401d268ccfbb1b74f17
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-02-21 22:25:48 +00:00
Radu Nicolau
2e3677bb20 cryptodev: Automatically download and build ISA-L Crypto library
Change-Id: I5454053461e6fb98e7f58f9562efde3590bb7cb5
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2017-02-21 22:21:57 +00:00
Filip Tehlar
770e89e6b9 Add basic 4o4 LISP unit test
Change-Id: I2d812153d7afe7980346382b525af89b3c47e796
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-02-21 22:21:19 +00:00
Jan Gelety
057bb8c3a4 test: ip6 vrf instances multi-context test (CSIT-497)
- add/delete IPv6 VRF instances and verify results by parsing output
  of ip6_fib_dump API command and by traffic

- small changes in assert_nothing_captured and get_capture to get logged
  unexpected packets

Change-Id: I32207447be2df942e335aa9890ff52fb88e46597
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-02-21 22:20:58 +00:00
Filip Tehlar
82786c418f Rename LISP GPE API to GPE
Change-Id: I133c55bce46d40ffddabbbf8626cbd3d072522d4
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-02-21 17:19:27 +00:00
Pavel Kotucek
65e845785f VPP-540 : pbb tag rewrite details
Extended sw_interface_dump to provide 802.1ah (pbb) tag rewrite info if
present.

Extended log "l2-output" to provide raw data to display result of
prospetive pbb tag rewrite. Tracing is moved after l2output_vtr to show
these changes.

Change-Id: I8b7cb865dc67ce21afab402cc086dac35f7c0f07
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
2017-02-21 00:00:12 +00:00