3436 Commits

Author SHA1 Message Date
Andreas Schultz
c1214bd1b6 make sure the very first fragment triggers an rx_callback
On the first session server, the first payload packet gets queued
but the Rx callback will only be invoked when the second packet
is received.

By initializing enqueue_epoch in the session, we can make sure that
the RX callback will be invoked for the first packet as well.

Change-Id: I60e2cf8d4d2ca71d461ca003d459c8e6e6956a4d
Signed-off-by: Andreas Schultz <aschultz@warp10.net>
2017-12-10 02:48:38 +00:00
Swarup Nayak
82d8ec2571 VPP-1077 Add meaningful error info, when executing command with enable/disable option
Change-Id: I47dd6f9637f0214971e3191852d84aa92d64b8c0
Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
2017-12-10 00:20:16 +00:00
Neale Ranns
9128637ee8 BIER in non-MPLS netowrks
as decsribed in section 2.2
  ihttps://tools.ietf.org/html/draft-ietf-bier-mpls-encapsulation-10
with BIFT encoding from:
  https://tools.ietf.org/html/draft-wijnandsxu-bier-non-mpls-bift-encoding-00

changes:
1 - introduce the new BIFT lookup table. BIER tables that have an associated
    MPLS label are added to the MPLS-FIB. Those that don't are added to the
    BIER table
2 - BIER routes that have no associated output MPLS label will add a BIFT label.
3 - The BIER FMask has a path-list as a member to resolve via any possible path.

Change-Id: I1fd4d9dbd074f0e855c16e9329b81460ebe1efce
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-09 20:55:08 +00:00
Damjan Marion
cef87f1a5e vlib: PCI rework to support VFIO
Also fixes old ixge driver, so it works with recent physmem changes and
vfio.

Change-Id: Id4be74b34daed47cd281a77eec43d6692340d882
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-12-09 14:10:17 +00:00
khemendra kumar
34719e37bf VPP-249 Coding standards cleanup - vnet/vnet/dhcp
Change-Id: I45a166b5780675d2bc6fe90595f413725704eaa8
Signed-off-by: khemendra kumar <khemendra.kumar13@gmail.com>
2017-12-09 13:24:39 +00:00
Marek Gradzki
87a137c77b jvpp: include all api files from @top_builddir@/vpp
Currently:
- vpe.api (supported previously)
- stats.api
- oam.api

Change-Id: Iab48d5d142e9a1ea0a4f366352b1d9429cc47309
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-09 13:23:40 +00:00
Marek Gradzki
6e73f7f605 jvpp: do not hardcode event sufixes (VPP-940)
JVpp maps request messages with replies
for Java API user convenience, e.g.:
- do not polute send APIs with messages other than requests/dumps,
- allow callback registration only for replies/details and events.

Since there are no conventions for event message naming
(https://wiki.fd.io/view/VPP/API_Concepts#API_Conventions),

jvpp should not limit events to messages
that end with 'event' or 'counters' suffix.

Instead jvpp should treat all messages
except for requests/dumps as potential events.

Such behaviour was introduced on Java API level by
https://gerrit.fd.io/r/#/c/8377/

in order support reusing
details messages as events (e.g. BFD events).

This patch goes one step forward by
relaxing rules at jvpp generation level.

Change-Id: I2a35e9eb2a288b2cf02d36ca95e6cb13e76e19e3
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-09 13:23:15 +00:00
Neale Ranns
c42fc05bfb Remove the unused 'create VRF if needed' API parameters
Change-Id: I35e166feeb0ac1e0e570efe07cb5f4cbeb5b8670
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-12-08 13:53:52 -08:00
Damjan Marion
2df39094d2 tapv2: multiple improvements
- change interface naming scheme
- rework netlink code
- add option to set link address, namespace

Change-Id: Icf667babb3077a07617b0b87c45c957e345cb4d1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-12-08 19:33:49 +00:00
Sergio Gonzalez Monroy
20ec716500 vppinfra: fix issues depending on compiler
It looks like different compiler versions produce different results for
expressions like "(cast) ptr + inc".

Use parenthesis to avoid such issues.

Change-Id: I93a9883bf5fc05ae462df5b004817775f0739405
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-12-08 15:18:09 +00:00
Klement Sekera
b716308ca5 punt: fix tracing for partially traced chains
This fixes a crash if the first buffer in buffer chain is not traced,
but some other buffer (mid-chain) is.

Change-Id: I2c9f529ae0bc3263d20981e0cb83ce24ed292bd8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-12-08 13:56:03 +00:00
Mohsin Kazmi
0708515198 vom: acl-l3: Fix pretty print for TCP mask and flags
Change-Id: If14d1b2d9b73de77321d94f10d48fa1bb04846f6
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2017-12-08 13:52:09 +00:00
Neale Ranns
d3464b5b4a VOM: prefix bit fiddling
Change-Id: I4fbf4a574f455628d56e78cefc1a76adc06bc801
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-12-08 08:27:38 +00:00
Marek Gradzki
acf33e49b9 jvpp: unify notification handling
Since introduction of dedicated SW Interface Event,
there is no need for special handling of messages
that can be both requests and events.

Change-Id: I76575e32c6d5b19e9a1ca953e5841d8ac3de4de7
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-07 17:17:39 +01:00
Marek Gradzki
8f3ad25c63 jvpp: remove special request<>reply mappings
Since L2FibTable removal
and introduction of dedicated SW Interface Event,
special message handling code can be removed.

The patch also fixes issues
found by Intelij's code inspection tool.

Change-Id: Ic4b2fd12ac30c7627f4cd6769716e4bb52ec0b10
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
2017-12-07 16:54:28 +01:00
Swarup Nayak
a3611a7034 Corrected help string of show ip punt
Change-Id: I32ec3ff341e70ceaa6203df5a9e7c3ffdae20a06
Signed-off-by: Swarup Nayak <swarupnpvt@gmail.com>
2017-12-07 05:38:00 +00:00
satish.karunanithi
93fbcc6af9 VPP-259 Coding standards cleanup - vnet/vnet/lawful-intercept
Change-Id: Ie750c9fe06c067226b90bdcc3ea423b74d16562d
Signed-off-by: satish.karunanithi <satish.fdio@gmail.com>
2017-12-06 19:41:26 +00:00
Neale Ranns
f363ebd4e7 Label stack size exceeded fix
Change-Id: Ibe2041d83e9b5be16801dc316bd472ae4f6e8c31
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-06 19:40:06 +00:00
Florin Coras
73e4f7965b session: support for rule tags overwriting
Change-Id: I0cf48b69042996afcb8b192f5fd98165058d9e1d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-06 19:28:04 +00:00
Ole Troan
3288ed7234 UT: Repaired broken C unit tests (--enable-tests)
Change-Id: I63d720378b92813993525f80fee90fc79df27fba
Signed-off-by: Ole Troan <ot@cisco.com>
2017-12-06 17:49:48 +01:00
Hongjun Ni
bf4be57305 Restructure some files in LB to src/vnet to reuse
Change-Id: Ic8b193e93ce18ca82b294816aa7ee0ef31d64bc2
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2017-12-06 13:22:51 +00:00
Dave Barach
22229864cb Remove unused, uninteresting code
Move elog_sample.c to src/examples/vlib

Change-Id: I7d32c83c424b9ca4a057372c7fc6a6e2b7dab034
Signed-off-by: Dave Barach <dave@barachs.net>
2017-12-06 10:43:45 +00:00
Dave Barach
55c79e9c7e make clib_maplog_update_header(...) globally accessible
clib_maplog_process(...): handle logs which weren't closed properly.
It will happen.

Change-Id: Ibcf9c9ea7a09991e6294050e7d2979a0d3f965cf
Signed-off-by: Dave Barach <dave@barachs.net>
2017-12-06 10:43:19 +00:00
Neale Ranns
9c2c243062 fix bug in pager
the format statement can return NULL before the pager has pages.

Change-Id: Ibabfd107e64fc9ab0eb142c28c155506f0d25828
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-06 01:05:43 -08:00
Gabriel Ganne
73cb0062e3 fill "show cpu" Flag list on aarch64 platforms (VPP-1065)
use getauxval(AT_HWCAP) to get the processor capabilities.
The result should be the same as calling
  cat /proc/cpuinfo | grep Feature | head -n1

All but one (aes) features have a different name.
handle aes by adding it an arch prefix, which is skipped during print
and a clib_cpu_supports_aes() custom function.

Change-Id: If9830bd5a17bac1bd1b5337dacbb0ddbb8ed6b18
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-12-05 18:19:43 +00:00
Milan Lenco
2aef64f04e tap_v2: convert ring size from network to host order
Change-Id: Ica1be5c75c83ac64c7063bfeff1f4d00702a00e1
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
2017-12-05 18:19:21 +00:00
Sergio Gonzalez Monroy
99214ce0ae dpdk/ipsec: multiple fixes
- fix ESP transport mode
- safely free crypto sessions
- use rte_mempool_virt2phy/rte_mempool_virt2iova
- align DPDK QAT capabilities for IPsec usage (DPDK 17.08)
- reserve 16B for aad (reference cryptodev doc)

Change-Id: I3822a7456fb5a255c767f5a44a429f91a140fe64
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-12-05 18:18:58 +00:00
Eyal Bari
3a699b28bb dpdk:remove duplicate code
unify code from both branches

Change-Id: Iae7325cff8c799c7827727ad7465bec089e39f50
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-12-05 18:17:07 +00:00
Gabriel Ganne
b96412d8f0 remove smp dead code (VPP-1066)
this follows commit 01d86c7f6f05938c7d3fe181bd0aa2f75ccdd1df
which removed many unused functions from smp.h

Change-Id: I3aa0954a5e2319cc526fa68dda113f3cbe063960
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-12-05 16:34:32 +00:00
Neale Ranns
a4e776642f Revert "FIB: optimise for src memory allocations"
This reverts commit 84517cfd1508f6da24937f310f7fffe752f22584.

Change-Id: Ic7eeffa2ed4607d3d653f34b93c20c833c789ee1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2017-12-05 08:54:16 +00:00
Steven
35de3b3376 vnet: set vnet_buffer l2_hdr_offset and l3_hdr_offset
Changes made in ethernet_input to set l2_hdr_offset,l3_hdr_offset, and
their corresponding flags.
Please note that ethernet_input, as a critical DP, incurs a few extra cpu
cycles due to this patch, but for a worthy cause.

Change-Id: Ie9ae352ea62959d2779ebcca98a1898e3d9e1d6f
Signed-off-by: Steven <sluong@cisco.com>
2017-12-04 20:18:21 +00:00
Eyal Bari
2e292c6f64 vlib: switch when frames are different
[ebari] no need to switch if next2, next3 are equal to next_index
[dbarach] change fix_speculation calculaton to a branch-free xor/or tree

Change-Id: I0131dc4499218363d5b0ce8f6440ce74e0b22bb9
Signed-off-by: Eyal Bari <ebari@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2017-12-04 17:13:38 +00:00
Damjan Marion
c99b4cd1c3 tap_v2: move code to vnet/devices/tap
virtio backend stays in vnet/devices/virtio

Change-Id: Idbf04f1c645a809ed408670ba330662859fe9309
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-12-04 17:08:28 +00:00
Damjan Marion
ffffb15fb5 tapcli: change interface name
As tapcli code is going to be deprecated and replaced with tap v2 code,
change the interface naming so the new code can use form tap-X.

Change-Id: I2684a880c037caee677927214752c00cf97f63f6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-12-04 17:07:13 +00:00
Eyal Bari
7223959c0a dpdk: remove unused "use_rss" flag
Change-Id: I31d2cbb02a0f59603ef1adc0d185e3d775dfda2f
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-12-04 16:26:27 +00:00
Eyal Bari
1645bbc1ac dpdk: remove duplicate function
dpdk_rx_next_from_packet_start is equivalent to dpdk_rx_next_from_etype and seems to have no side effects

Change-Id: I629dadfbfb35ad1f5c7198e7824883ae4bd6abaa
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-12-04 14:52:02 +00:00
Eyal Bari
f4d5fb71cc dpdk: remove unused cached eth input node
Change-Id: Ic43c70bfe3e93cb3e6cfab7cda1986e44e371c06
Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-12-04 13:51:40 +00:00
Renato Botelho do Couto
e266ea3795 Optimize RPM build process
* Remove unused variable OS_VERSION_ID
* Do all RPM building in build-root/rpmbuild
* Add build-root/rpmbuild to .gitignore
* Move redundant code to a target called 'spec'
* Copy spec file to SPECS instead of SOURCES
* Only set %{_topdir} macro when it's undefined, and because of that
  remove sed call to delete definition on spec file
* Pass _version and _release using --define parameter instead of using
  sed to add them to .spec
* Move rpm files to build-root after build finishes
* Add dist tarball to .gitignore

Change-Id: I230d60b62914056b353f7f8701d14754b0bf7f8c
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
2017-12-04 11:36:28 +00:00
Steven
37eba0db42 tap_v2: coverity strikes, again!
fd is not close when IOCTL encounters an error which causes resource
leak. The fix is to initialize fd to -1. At return, close fd if
it has a valid value.

Change-Id: I53c4f5c71ca0f556fb6586f5849e7cb622632d8f
Signed-off-by: Steven <sluong@cisco.com>
2017-12-04 11:27:03 +00:00
Jan Gelety
87c30d9c10 Update CSIT tests 171127 -> 171204
- update of CSIT operational branch to be used for VPP-patch test

Change-Id: I9a154daa661fc5f2f1e7c2eeb77a4bb08d4e34be
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-12-04 11:26:26 +00:00
Damjan Marion
7074961b48 virtio: zero data structs in virtio_vring_init
Change-Id: I877cf1abb062a90f428c3ec0cab5c6e9dad0ca82
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-12-04 11:24:53 +01:00
Dave Barach
04fee31f26 maplog headers, offline processing, doxygen tags
Change-Id: I0545018ec02f3706ad6a2da6fc13537db5c31a2d
Signed-off-by: Dave Barach <dave@barachs.net>
2017-12-02 18:44:07 +00:00
Mohsin Kazmi
e2e9ce5cec VOM: l2fib: Add bvi flag support
Change-Id: I03d7508649e80a538fcf9541815e2c29224bc87a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2017-12-02 17:11:50 +00:00
Damjan Marion
91c6ef7cae tap_v2: multiple improvements
- add support for assigning tap interface to the bridge
 - add support for assigning tap interface host side ip4 and ip6 address
 - host namespace can be specified as PID (pid:12345) or full path to file
 - automatically bring linux interface up

Change-Id: I1cf7c3cad9a740e430cc1b9c2bb0aad0ba4cc8d8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-12-02 10:11:25 +00:00
Florin Coras
9fa1581cc4 gpe: fix gpe enable/disable command
Return error if not input provided.

Change-Id: I4a68fafaf4efd74395e513baa7f18fa55b83de87
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-02 01:07:08 +00:00
Florin Coras
7a2e1bd6c7 session: allocate cb messages from client ring
Change-Id: Ib644a1840c5f24203b6968561f467fbe5e255055
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-12-01 17:50:54 +00:00
Dave Barach
7a64019a76 Coverity warning be gone
Change-Id: I0946c0a124f3fc9a0aa87499a35edfeaabaec932
Signed-off-by: Dave Barach <dave@barachs.net>
2017-12-01 16:57:29 +00:00
Steven
0b26bd78cf vnet: fix a typo in vnet/buffer.c
vnet_buffer->l3_hdr_offset should be displayed as l3-hdr-offset,
not l2-hdr-offset.

Change-Id: Ib8ec9d17a1b4167a2204002023ba2260e8ba36c4
Signed-off-by: Steven <sluong@cisco.com>
2017-12-01 07:00:18 -08:00
Steven
f953dfc8e0 virtio: fix coverity warnings
Fix 3 coverity warnings
1. api_format.c: init net_ns = 0 and remove its corresponding vec_add and
vec_free
2. netlink.c (reported in tap.c before the code was removed): resource leaked
due to fd is not close
3. tap.c: subtract 1 for size when calling strncpy to accommodate the
terminated NULL character

Change-Id: Iff4e66604862f0c06dac227b8cfd48d3979e41a5
Signed-off-by: Steven <sluong@cisco.com>
2017-12-01 11:14:52 +00:00
Neale Ranns
088f0e221c VOM: fixes for interface recreate on agent restart and L2 re-binding
Change-Id: I14c838ee99f9bc2db66bb2e775039d2cb2e7924f
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2017-12-01 11:14:18 +00:00