4377 Commits

Author SHA1 Message Date
Chris Luke
70a745d966 cli: Fix off-by-one in the pager
- The last line in the pager buffer was sometimes missed when
  using space/pg-dn; simple off-by-one error.

Change-Id: Id4e5f7cf0e5db4f719f87b9069d75427bc66d3f7
Signed-off-by: Chris Luke <chrisy@flirble.org>
2018-06-10 16:32:32 +00:00
Dave Barach
5313adc02a Don't use foreach_vlib_main macro w/out barrier sync
It should be OK to scrape dispatch stats without forcing a barrier
sync. Scrape the stats manually. We'll see what happens.

Change-Id: Ia20b51ea12ed81cce76e1801401bad0edd0645bb
Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-10 09:21:20 +00:00
Damjan Marion
98a5d810f8 add script for virtual function create/show/remove
Change-Id: I151bc4269cb4d7e8572a6a676da20f69206d6c3f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-10 06:56:38 +00:00
Damjan Marion
4a97393eff Fix bug in vlib_buffer_free_from_ring_no_next
Change-Id: I332bb4578d1a3c79770985bf1f315d2ed823a3e5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-09 18:50:21 +00:00
Florin Coras
66cf5e0c42 session: cleanup queue node tracing
Change-Id: Ib8e332174d96bf9cfa4bbaaa5b8d8bc9958424b1
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-09 17:31:26 +00:00
Damjan Marion
43f64ce3a2 avf: properly cofigure RSS LUT
Change-Id: I85cfab692ae0a72277ae561cdba7dcbc1f60aca3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-09 17:31:02 +00:00
Damjan Marion
1c869c71c7 avf: add support for intel X722 NICs
Change-Id: I3e07070eed4948e813ad1490963c7f8ef7f4262e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-09 15:10:10 +02:00
Dave Barach
a98c40305d Time range support for vppinfra
Change-Id: I2356b1e05fd868b46b4d26ade760900a5739ca4d
Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-08 23:19:09 +00:00
Neale Ranns
f12dad658d Add reaper functions to want events APIs (VPP-1304)
Change-Id: Iaeb52d94cb6da63ee93af7c1cf2dade6046cba1d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-06-08 23:11:02 +00:00
Juraj Sloboda
81119e86bd Implement DHCPv6 PD client (VPP-718, VPP-1050)
Change-Id: I72a1ccdfdd5573335ef78fc01d5268934c73bd31
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-06-08 20:39:05 +00:00
Florin Coras
898cd8f83d http server: do not close connections after reply
Change-Id: I7add46258fe44bc4d23d805ffc7eae75e37cab82
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-08 20:30:16 +00:00
Dave Barach
048a4e5a00 export counters in a memfd segment
also export per-node error counters

directory entries implement object types

Change-Id: I8ce8e0a754e1be9de895c44ed9be6533b4ecef0f
Signed-off-by: Dave Barach <dave@barachs.net>
2018-06-08 11:42:01 -04:00
Neale Ranns
59ae61ee75 Gratuitous ARP packet handling
only learn from a GARP packet if it is an update to an existing entry.

Change-Id: I4c1b59cfedb911466e5e4c9756cf53a6676e1909
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-08 08:52:29 +00:00
Vijayabhaskar Katamreddy
180f6476f8 Adding pad for reasm vnet_buffer reasm struct sothat adj_index is retained
Change-Id: Ib756c4f3e8caba1f77ef48b62a2a5d7283fe5016
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
2018-06-08 07:36:47 +00:00
Hongjun Ni
bedc1ca8c4 LB: reply message id and table length are wrong.
Change-Id: Iea2c661cb3e0728bb2d10b06791ed84fed00f6a7
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-06-08 07:27:24 +00:00
John Lo
3c22affe8b Fix IP scan neighbor API/CLI handling of interval and stale
Change-Id: I77264c4398e6fad461bb4dc10867a1f9c3accec0
Signed-off-by: John Lo <loj@cisco.com>
2018-06-07 18:54:35 +00:00
Damjan Marion
a6cca8323c dpdk: fix interface naming issue
... introduced with dpdk 18.05 support patch

Change-Id: Idf2283888f81d7652599651c0d65476e451f9343
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-07 18:44:09 +00:00
John Lo
535939c381 Revert "Allow arp-input node to learn IPv4 neighbors from GARP packets"
This reverts commit d018870d1b02109fc8b328446f15312fdd2fcd11.

Change-Id: I700ade7a25ae5ed72cfed586e50b02492a4f11de
Signed-off-by: John Lo <loj@cisco.com>
2018-06-07 18:44:02 +00:00
Rui Cai
041881b11a dpdk: failsafe PMD initialization code
Added code to initialize failsafe PMD

This is part of initial effort to enable vpp running over
dpdk on failsafe PMD in Microsoft Azure(4/4).

Change-Id: Ia2469c7087ca4b5c7881dfb11ec5c4fcebaa1d04
Signed-off-by: Rui Cai <rucai@microsoft.com>
2018-06-07 14:35:51 +00:00
Neale Ranns
daff178403 DHCP Client Dump
- use types on the DHCP API so that the same data is sent in comfing messages and in dumps
- add the DHCP client dump API
- update VOM to refelct API changes
- rename VOM class dhcp_config* dhcp_client*
- the VOM dhcp_client class maintains the lease data (which it reads on a dump) for clients to read

Change-Id: I2a43463937cbd80c01d45798e74b21288d8b8ead
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-07 03:11:10 -04:00
Damjan Marion
0e969ac843 Add support for DPDK 18.05
Change-Id: I205932bc727c990011bbbe1dc6c0cf5349d19806
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-07 05:48:49 +00:00
John Lo
d018870d1b Allow arp-input node to learn IPv4 neighbors from GARP packets
Change-Id: I86019f4ff9b0c8c633638fa23341d8ce49099ba6
Signed-off-by: John Lo <loj@cisco.com>
2018-06-07 02:24:18 +00:00
Ian Wells
d0e812f2d4 Alter logging semantics for VPP PAPI object
Logging previously used a string name for the log level and changed
the system-wide log level based on this string name.  It now uses a
logging-module provided constant for the log level and changes its own
logger's level based on the name, and only if the level is provided.

This allows the logging to be more compatible with Pythonic usage,
where an external source may be used to dictate logging levels across
the system on a per module basis and should not be overridden.

Change-Id: Icf6896ff61a29b12c11d04374767322cdb330323
Signed-off-by: Ian Wells <iawells@cisco.com>
2018-06-06 19:10:54 +00:00
Steven
9f781d84b0 bond: send gratuitous arp when the active slave went down in active-backup mode
- Modify the API send_ip6_na and send_ip4_garp to take sw_if_index instead
of vnet_hw_interface_t and add call to build_ethernet_rewrite to support
subinterface/vlan
- Add code to bonding driver to send an event to bond_process when the first
interface becomes active or when the active interface is down
- Create a bond_process to walk the interface and the corresponding
subinterfaces to send garp/ip6_na when an event is received.
- Minor cleanup in bonding/node.c

Note: dpdk bonding driver does not send garp/ip6_na for subinterfaces. There is
no attempt to fix it here. But the infra is now done and should be easy to
add the support.

Change-Id: If3ecc4cd0fb3051330f7fa11ca0dab3e18557ce1
Signed-off-by: Steven <sluong@cisco.com>
2018-06-05 11:09:32 -07:00
Andrey "Zed" Zaikin
439a122f3a lb api: correct byte order of new_flows_table_length argument
Change-Id: I3ac348a8cb1a515dfe1839eaa084c87719d282e1
Signed-off-by: Andrey "Zed" Zaikin <zed.0xff@gmail.com>
2018-06-05 17:32:13 +00:00
Ole Troan
73710c7da2 VPP API: Memory trace
if you plan to put a hash into shared memory, the key sum and key
equal functions MUST be set to constants such as KEY_FUNC_STRING,
KEY_FUNC_MEM, etc. -lvppinfra is PIC, which means that the process
which set up the hash won't have the same idea where the key sum and
key compare functions live in other processes.

Change-Id: Ib3b5963a0d2fb467b91e1f16274df66ac74009e9
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-05 14:30:01 +00:00
Jerome Tollet
0b061112f7 VPP-1305: Add support for tags
Change-Id: I9e759037295fe675abe426e565a562b1ec1e7d33
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2018-06-05 10:14:38 +00:00
Neale Ranns
8f6e321862 BIER CLI show commands; no crash on non-existant objects (VPP-1303)
DBGvpp# sh bier disp entry
DBGvpp# sh bier disp entry 0
No such BIER disp entry: 0
DBGvpp# sh bier disp table
DBGvpp# sh bier disp table 0
No such BIER disp table: 0
DBGvpp# sh bier disp table 11
No such BIER disp table: 11
DBGvpp#

DBGvpp# sh bier bift
no BIFT entries
DBGvpp# sh bier bift set 0
no BIFT entries
DBGvpp# sh bier bift set 0 sd 0 bsl 0
no BIFT entries
DBGvpp#

DBGvpp# sh bier fib
No BIER tables
DBGvpp# sh bier fib 0
DBGvpp# sh bier fib 0 4

DBGvpp# sh bier fmask
DBGvpp# sh bier fmask 2
No BIER f-mask 2

DBGvpp# sh bier imp
DBGvpp# sh bier imp 0
No such BIER imposition: 0

Change-Id: Ibadac3441dd8a6d1b96bd9ee4358e28498875b95
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-06-05 06:34:34 +00:00
Dave Barach
473f46135c Configure or deduce CLIB_LOG2_CACHE_LINE_BYTES (VPP-1064)
Added configure argument "--with-log2-cache-line-bytes=5|6|7|auto"
AKA 32, 64, or 128 bytes, or use the inferred value from the build host.

produces build-xxx/vpp/vppinfra/config.h, which .../src/vppinfra/cache.h

Kernels which implement the following pseudo-file (aka x86_64) are
easy: /sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size

Otherwise, extract the cpuid from /proc/cpuinfo and map it to the
cache line size.

Change-Id: I7ff861e042faf82c3901fa1db98864fbdea95b74
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Nitin Saxena <nitin.saxena@cavium.com>
2018-06-04 22:24:48 +00:00
Florin Coras
1b25552ebb ip4: optimize ip4_local
"sh run" says the number of clocks for my tcp based throughput test
dropped from ~43 to ~23

Change-Id: I719439ba7fc079ad36be1432c5d7cf74e3b70d73
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-04 17:05:01 +00:00
Milan Lenco
1f8697c4b6 Fix API trace dump for tapv2
Change-Id: Ib092da61ba037ea30c6f38ea692ef9f1ca0cd8e7
Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
2018-06-04 15:18:39 +00:00
Neale Ranns
f8db62a001 Remove unused GRE buffer meta-data
Change-Id: Ia8ef019742c13b1149916d51796cad6f50687162
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-06-04 15:15:06 +00:00
Eyal Bari
d3de756a8b flow:add enabled hw format function
Change-Id: Ide1f76e9207b6022d5258a119f8d59cca85651b5
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-06-04 14:27:52 +00:00
Florin Coras
3a0325f9ca ip: save fib index for buffer in ip lookup
Avoids recomputing the fib index in ip local for locally delivered
packets and should incur no extra cost when forwarding packets.

Change-Id: Id826ffa8206392087327f154337eabc8a801b4d7
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-04 11:09:25 +00:00
Jerome Tollet
61f7912466 fix usage string missing arg
Change-Id: I9710e9ed6ceff6c0b2de0bcf77f355762df88b58
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
2018-06-04 09:16:23 +00:00
Neale Ranns
c16f6b34b6 Join the VAC read timeout thread
Change-Id: I5bcbae276f8ac23718c5afc859da222508d07ad7
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-04 09:02:16 +00:00
Neale Ranns
d1812d023b Enable Position Independent Executable for production VPP
Change-Id: I0f81423b854be1dc456df696416e5f3747393208
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-06-04 08:01:24 +00:00
Damjan Marion
65165072d4 dpdk: buffer free optimizations
~5 clocks/packet improvement...

Change-Id: I1a78fa24dcd1b3ab7f45e10b9ded50f79517114a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-03 14:46:12 +02:00
Damjan Marion
8855386411 dpdk: improve buffer alloc perfomance
This is ~50% improvement in buffer alloc performance.
For a 256 buffer allocation, it was ~10 clocks/buffer, now is < 5 clocks.

Change-Id: I97590e240a79a42bcab5eb26587fc2d11e6eb163
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-03 12:01:12 +00:00
Neale Ranns
e8d7ff5f87 Interface Tag: memset field in VOM, clear the tag in VPP on interface delete
Change-Id: Id97de732b5952d5d86202e7749c9e81cf8dbed87
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-06-03 02:21:26 +00:00
Damjan Marion
ba614d63a8 AVF input node rework
Change-Id: Ib121b24935d5c706cfba6e4b6d321086a38cad91
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-06-02 11:50:23 +02:00
Andrew Yourtchenko
4bc1796b34 acl-plugin: multicore: session management fixes
- implement a 1us purgatory for the session structures
  by adding a special connection list, where all connections
  about to be deleted go.

- add per-list-head timeouts updated upon the list enqueue/dequeue
  for connection idle management

- add a "unused" session list with list ID#0, which should
  never be used unless there is a logic error. Use this ID
  to initialize the sessions.

- improve the maintainability of the session linked list
  structures by using symbolic bogus index name instead of ~0

- change the ordering of session creations - first reverse, then
  local. To minimize the potential for two workers competing for
  the same session in the corner case of the two packets
  on different workers creating the same logical session

- reduce the maximum session count to keep the memory usage the same

- add extra log/debug/trace to session cleaning logic

- be more aggressive with cleaning up sessions - wind up the
  interrupts from the workers to themselves if there is more
  work to do

Change-Id: I3aa1c91a925a08e83793467cb15bda178c21e426
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-06-02 06:01:42 +00:00
Florin Coras
b2371c25fe session: improve disconnect handling
If the caller is the session owning thread or the main thread with a
worker barrier sync (cli/api) add an event to the pending disconnects
vector in the session node and entirely avoid using the event queue.
Useful for bursts of disconnects (like an app detach).

If disconnects come from a processes, be willing to retry enqueueing the
disconnect to the event queue multiple times.

Change-Id: Ieece1f1091b713f94c41c703b6e805bc8498816a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-06-01 21:18:45 +00:00
John Lo
7dbd7265da Improve L2FIB delete entry handling and "show l2fib" CLI options
Improve deletion of L2FIB MAC entry using l2fib_add_del API. If
sw_if_index param specified in th API is non-zero, check that its
value match that of the MAC entry to proceed with deletion.

Improve "show l2fib" CLI to allow display of all entries, learned
entries only, or added ovia CLI/API entries only. For added entry,
show "no" under the age column to indicate entry does not age.

Change-Id: I0bd2582c2b6bac268e551e4f8ca6dab2be4400ad
Signed-off-by: John Lo <loj@cisco.com>
2018-05-31 23:30:19 +00:00
Rui Cai
a059a000f8 dpdk: Decoupling the meaning of xd->device_index in dpdk_plugin
Prior to the change, dpdk plugin assumes xd->device_index is
used both as index for internal dpdk_main->devices array
and DPDK port index to call into DPDK APIs.

However, when running on top of Failsafe PMDs,
DPDK port index range may no longer be contiguous (as noted:
http://dpdk.org/ml/archives/dev/2018-March/092375.html
for related changes in DPDK). Because this, dpdk plugin can
no longer iterate through all available DPDK ports
with a for 0->rte_eth_dev_count() loop and the assumption of
device_index no longer holds.

This is part of initial effort to enable vpp running over
dpdk on failsafe PMD in Microsoft Azure(3/4).

Change-Id: I416fd80f2d40e12e139f8f3492814da98343eae7
Signed-off-by: Rui Cai <rucai@microsoft.com>
2018-05-31 22:01:15 +00:00
Ping Yu
cb91e603bc Fix TLS issue to load certification and key
Change-Id: If1ef2d4bc6f90a4d4b6a345c63723117834c6504
Signed-off-by: Ping Yu <ping.yu@intel.com>
2018-05-31 18:44:17 +00:00
qchang
aa8f63ca4b fix socket send() return size check
Change-Id: I098c671607c75cb34d04f421b4d16b73f7b47392
Signed-off-by: qchang <qing.chang1@huawei.com>
2018-05-31 13:27:15 +00:00
Zhiyong Yang
462072a1fc fix missing void pointer explicit type cast
Change-Id: I5098e5d966abc44db045783883424b63083f08ee
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2018-05-31 09:16:42 +00:00
Ole Troan
c4f2ef7d7e VPP-1299: Reset uid/gid on shared memory segment if client starts first.
Change-Id: I2b5bc7d864f8829e1dff63fec3c9484078601309
Signed-off-by: Ole Troan <ot@cisco.com>
2018-05-31 07:50:44 +00:00
Damjan Marion
c0c919c6fa Add src/vlib/config.h.in template
Change-Id: I9b81dcb9250cab09b88f161366da9475a7ee5dd6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-05-31 00:02:24 +00:00