vpp.git
6 years agoacl-plugin: add the support for dumping the ethertype whitelist (VPP-1163) 84/10984/3
Andrew Yourtchenko [Tue, 6 Mar 2018 15:27:55 +0000 (16:27 +0100)]
acl-plugin: add the support for dumping the ethertype whitelist (VPP-1163)

The gerrit 10434 which added the support for whitelist model on ethertypes,
did not include the support to dump the current state.
This patch fills that gap.

Change-Id: I3222078ccb1839dc366140fa5f6b8999b2926fd2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
6 years agovppapigen: require reply/details messages for requests/dumps 77/10977/7
Marek Gradzki [Tue, 6 Mar 2018 11:25:02 +0000 (12:25 +0100)]
vppapigen: require reply/details messages for requests/dumps

Throw exception if details/reply is not defined instead
of logger warning.

Change-Id: I6eb39c51eecca6521e5f563ba09dfd62311b45ec
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoFix Avoid crash in vnet_delete_sub_interface routine 29/11029/1
Steve Shin [Wed, 7 Mar 2018 21:29:29 +0000 (13:29 -0800)]
Fix Avoid crash in vnet_delete_sub_interface routine

vnet_get_sw_interface shoud be called after sw_if_index is validated.

Change-Id: I36f1d90999c740803386404ba9b32703b659cd54
Signed-off-by: Steve Shin <jonshin@cisco.com>
6 years agofix physmem mappings 19/11019/1
Damjan Marion [Wed, 7 Mar 2018 18:25:51 +0000 (19:25 +0100)]
fix physmem mappings

Change-Id: Ie0763e20c36a29a8ef866511903c85027dd133c3
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agofeatures: extend 'feature node not found' warning message 05/11005/2
Damjan Marion [Wed, 7 Mar 2018 12:06:40 +0000 (13:06 +0100)]
features: extend 'feature node not found' warning message

Change-Id: I8f45fdb3865e2e0cbb5162ac622c07fec5e42b9d
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoNAT44: allow to configure one interface only as output or input feature (VPP-1192) 00/11000/2
Matus Fabian [Wed, 7 Mar 2018 11:17:57 +0000 (03:17 -0800)]
NAT44: allow to configure one interface only as output or input feature (VPP-1192)

following is not possible:
set interface nat44 out GigabitEthernet0/3/0 output-feature
set interface nat44 out GigabitEthernet0/3/0

Change-Id: I1592cc18390881fda66f98316700886b8f5295f0
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoGBP: fix the runs before statement against the ACL node 09/11009/2
Neale Ranns [Wed, 7 Mar 2018 12:59:18 +0000 (04:59 -0800)]
GBP: fix the runs before statement against the ACL node

Change-Id: I0ff13962ab6855663b9aec31c95e4a88cc809ff0
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agopacket-generator: use default free list 06/11006/2
Damjan Marion [Wed, 7 Mar 2018 12:21:04 +0000 (13:21 +0100)]
packet-generator: use default free list

Change-Id: I2a34546f9b32edc9bfb86b5492dde34aaef49ccc
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agotls: enforce certificate verification 72/10972/9
Florin Coras [Tue, 6 Mar 2018 00:53:07 +0000 (16:53 -0800)]
tls: enforce certificate verification

- add option to use test certificate in the ca chain
- add hostname to extended session endpoint fields and connect api
  parameters. If hostname is present, certificate validation is
  enforced.
- use /etc/ssl/certs/ca-certificates.crt to bootstrap CA cert. A
  different path can be provided via startup config

Change-Id: I046f9c6ff3ae6a9c2d71220cb62eca8f7b10e5fb
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agotest: disable reassembly tests and system modification script 99/10999/2
Damjan Marion [Wed, 7 Mar 2018 10:48:58 +0000 (11:48 +0100)]
test: disable reassembly tests and system modification script

One of basic requirements from day one for maek test is that it should
run unpriviledged, so modifying system paremeters is unacceptable.

Disabling script and reassembly tests as they need to be done in
different way.

Change-Id: I063c73eb82f2ebd7499e8adb1574a9fd2475fb5b
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVPPAPIGEN: Run tool directly from source tree. 93/10993/2
Ole Troan [Wed, 7 Mar 2018 07:40:58 +0000 (08:40 +0100)]
VPPAPIGEN: Run tool directly from source tree.

This ensures that tool changes do not require re-bootstrap.
Disabled generation of temporary files (gentab / .pyc) to avoid polluting the source tree.

Change-Id: I4d6bc035fbb46550fa8f4e99f4091eef90e2d86c
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoVAPI: Ensure type definitions are generated in same order as .api file. 86/10986/2
Ole Troan [Tue, 6 Mar 2018 16:45:32 +0000 (17:45 +0100)]
VAPI: Ensure type definitions are generated in same order as .api file.

The previous use of a dictionary instead of a list led to typedefs being generated in wrong order.

Change-Id: Iee6ff73f920883ce6e599180c1b47fe997c1702e
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agovlib: avoid crash if fill_free_list returns 0 buffers 88/10988/2
Damjan Marion [Tue, 6 Mar 2018 17:46:54 +0000 (18:46 +0100)]
vlib: avoid crash if fill_free_list returns 0 buffers

Change-Id: If1284696e10df71b4029191b5e3adb32c21c0c5f
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVCL registration handler added to session for polling sessions 83/10983/2
Keith Burns (alagalah) [Tue, 6 Mar 2018 13:55:27 +0000 (05:55 -0800)]
VCL registration handler added to session for polling sessions

Change-Id: I5f0f3b07a7aa3f243c3d44a9a15cf0670dbb2d46
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agoLB plugin: Fix Layer-4 checksum error in L3DSR. 51/10951/2
Yusuke Tatsumi [Mon, 5 Mar 2018 04:01:04 +0000 (13:01 +0900)]
LB plugin: Fix Layer-4 checksum error in L3DSR.

Though dst-IP address would be change in LB plugin with L3DSR method,
layer-4 checksum would not be recomputed after this change.

Related changes:
- L3DSR: https://gerrit.fd.io/r/#/c/10203/

Change-Id: I98de7b8d80186ac77608a68050208c08d90b7c3b
Signed-off-by: Yusuke Tatsumi <ytatsumi@yahoo-corp.jp>
6 years agowhen lb tcp in2out flow, 68/10968/2
ahdj007 [Tue, 6 Mar 2018 08:15:44 +0000 (16:15 +0800)]
when lb tcp in2out flow,
in2out and out2in protocol are not same

Change-Id: I4ce680ad1f088cb079e1f2aeb15ca59225fca0d1
Signed-off-by: ahdj007 <dong.juan1@zte.com.cn>
6 years agoreass frag_n should to be inited to 0 67/10967/2
ahdj007 [Tue, 6 Mar 2018 07:46:54 +0000 (15:46 +0800)]
reass frag_n should to be inited to 0

Change-Id: I8a4a7a85e86acbfe411e6dfa22e3976d7d4c903b
Signed-off-by: ahdj007 <dong.juan1@zte.com.cn>
6 years agoVOM: Fix state reconciliation 37/10837/5
Mohsin Kazmi [Mon, 26 Feb 2018 17:36:17 +0000 (18:36 +0100)]
VOM: Fix state reconciliation

This commit also fixes the acl and arp handle for
inspector to view internal state of VOM.

Change-Id: Ibc8ff6cb51d2a77b4c04993ac7212564b8892337
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agoglibc 2.27 fix 69/10969/2
Marco Varlese [Tue, 6 Mar 2018 07:09:04 +0000 (08:09 +0100)]
glibc 2.27 fix

With glibc 2.27 the memfd_create has been added to the devel libraries.
That's causing the internally defined static function to clash with the
system wide one. This patch addresses that issue on systems with latest
glibc libraries.

Change-Id: I788bf49b23d5b5f1cb1c0374e243d8a429178a71
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agovppapigen: require service definition for singleton messages 76/10976/3
Marek Gradzki [Tue, 6 Mar 2018 10:42:36 +0000 (11:42 +0100)]
vppapigen: require service definition for singleton messages

Change-Id: Ie7b1c5e50588f65657c3c0900e5914ea82ebb50f
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agovppapigen: do not allow to define message as both request and reply 75/10975/2
Marek Gradzki [Tue, 6 Mar 2018 10:10:56 +0000 (11:10 +0100)]
vppapigen: do not allow to define message as both request and reply

Change-Id: I0738fac32dd0c5d927c52d2eb2c1100d14c147cf
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agovppapigen: require reply ID different than caller ID 74/10974/2
Marek Gradzki [Tue, 6 Mar 2018 09:56:26 +0000 (10:56 +0100)]
vppapigen: require reply ID different than caller ID

Change-Id: I316dc99881bce6a36904863d3c1c049b4f5cf658
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoAPI: Add service definitions for events and singleton messages (second attempt) 73/10973/1
Marek Gradzki [Tue, 6 Mar 2018 09:05:44 +0000 (10:05 +0100)]
API: Add service definitions for events and singleton messages (second attempt)

Based on https://gerrit.fd.io/r/#/c/10920/

Updates service definition in stats.api with correct reply message names.

Change-Id: I3282bee5304e667e23bc1fab3f43d967a50d880d
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoRevert "API: Add service definitions for events and singleton messages." 65/10965/2
Ole Trøan [Mon, 5 Mar 2018 21:53:35 +0000 (21:53 +0000)]
Revert "API: Add service definitions for events and singleton messages."

This reverts commit f7b7fa53b7eaec81d8c00c1023fb7d01f1f9761f.

Change-Id: I87496342943248e94f01ada31459f387c0a3a610
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agophysmem: keep only one physmem_main 63/10963/2
Damjan Marion [Mon, 5 Mar 2018 19:08:28 +0000 (20:08 +0100)]
physmem: keep only one physmem_main

We don't need per vlib_main physmem_main, so keep it separatelly instead
of trying to keep them in sync.

Change-Id: I0fbeecf4d9672d31af7a43c640a7d8f05dd6e46f
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVCL async event handler 94/10794/34
Keith Burns (alagalah) [Fri, 23 Feb 2018 18:17:01 +0000 (10:17 -0800)]
VCL async event handler

- provides async handling of events such as accept/connect

Change-Id: Id95947237ef16629371b3c99822059d423e2f918
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
6 years agoSCTP: API to configure some tunables 60/10960/2
Marco Varlese [Mon, 5 Mar 2018 14:12:29 +0000 (15:12 +0100)]
SCTP: API to configure some tunables

This patch adds the possibility to configure some behaviors of the SCTP
stack based on some tunable parameters (mainly ON/OFF). For the time
being, that is limited to the bundling option (multiplexing messages)
and to delaying the SACK message.

Change-Id: I696493e0309e47163c1e119c7d9f82f7d8ee6b87
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoIP6 link-local table 01/10801/4
Neale Ranns [Sat, 24 Feb 2018 10:11:19 +0000 (02:11 -0800)]
IP6 link-local table

- IPv6 link local table is a per-SW interface array of IPv6 unicast FIBs
- the per-interface ocst is sizeof(fib_table_t) which is small,
  w.r.t. the cost of an interface
- FE80::/10 in the 'global' table points to a DPO that performs a lookup in the
  input interface's LL fib.

Change-Id: Ice834b25ebeeacb2e929d7c864d7ec8c09918cbe
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
6 years agoSet DPDK_MLX4_PMD and DPDK_MLX5_PMD compile with default dlopen links 57/10957/3
Amir Zeidner [Mon, 5 Mar 2018 12:32:22 +0000 (14:32 +0200)]
Set DPDK_MLX4_PMD and DPDK_MLX5_PMD compile with default dlopen links

dlopen linkage allow more transparent use for Mellanox nics.
Mellanox shared library librte_pmd_mlx5/4_glue.so* placed in LD_LIBRARY_PATH
At run time Mellanox code will be loaded only when Mellanox nics explicty used.
i.e if VPP is used with other vendor Mellanox code is not loaded.

Change-Id: Ib05bdbfc4cbb6e447c67186c98361f9c5b447140
Signed-off-by: Amir Zeidner <amirzei@mellanox.com>
6 years agoAPI: Add service definitions for events and singleton messages. 20/10920/3
Ole Troan [Thu, 1 Mar 2018 13:53:12 +0000 (14:53 +0100)]
API: Add service definitions for events and singleton messages.

Change-Id: I7de987c30b263d43521e6280c5273f30b5f6e11c
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agovlib: add functions to dynamically open/close PCI device 58/10958/3
Damjan Marion [Mon, 5 Mar 2018 13:08:33 +0000 (14:08 +0100)]
vlib: add functions to dynamically open/close PCI device

Old code was only allowing PCIdevices to be scanned during startup,
now driver can open and close device without restart of vpp.

Change-Id: I1a06511e3f16f896101b43dac2bad420b6e6c35e
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoSCTP: retransmission in INIT/SHUTDOWN phase 56/10956/2
Marco Varlese [Mon, 5 Mar 2018 11:31:45 +0000 (12:31 +0100)]
SCTP: retransmission in INIT/SHUTDOWN phase

This patch addresses the need to handle timers timeouts (e.g. sent
chunks not being acked) for both the INIT and SHUTDOWN phases.
The INIT phase requires the handling of two timers the T1-init and
T1-cookie timers whilst the SHUTDOWN phase requires the handling of the
T2-shutdown timer only for the retransmission case.
Left to be implemented is the handling of the DATA chunks retransmission
(e.g. T3-rxtx expiration) but that will be submitted with a separate
patch.

Change-Id: I2b2e13dce11000aea3c7d965f02b27b76c97e605
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agovlib: vlib_buffer_free_internal optimizations 52/10952/2
Damjan Marion [Mon, 5 Mar 2018 08:36:31 +0000 (09:36 +0100)]
vlib: vlib_buffer_free_internal optimizations

Change-Id: Ia819b630b824002c59680836a8833df7e5af90e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovlib: vfio code rework 48/10948/5
Damjan Marion [Sun, 4 Mar 2018 16:19:08 +0000 (17:19 +0100)]
vlib: vfio code rework

Change-Id: I99cf3e7cc991aa7d32385a155c707a6516516117
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovlib: rework PCI INTx support 53/10953/2
Damjan Marion [Mon, 5 Mar 2018 09:18:50 +0000 (10:18 +0100)]
vlib: rework PCI INTx support

Change-Id: I6df5a01416993c213e06645a6d9b48dfe77c8227
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agotls: add stop listen handler 50/10950/4
Florin Coras [Sun, 4 Mar 2018 15:24:30 +0000 (07:24 -0800)]
tls: add stop listen handler

Change-Id: I233d02a669b6a0504cd54590c6c8e4fefadc4713
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agoNAT44 - unknown protocols work with forwarding 40/10940/2
Matthew Smith [Fri, 2 Mar 2018 17:31:26 +0000 (11:31 -0600)]
NAT44 - unknown protocols work with forwarding

If forwarding is enabled, inbound packets on an outside
interface should not be dropped and instead pass on to
the FIB lookup. This works for TCP and UDP but not other
IP protocols. Enable it for unknown protocols.

Change-Id: I1da84b5633a36b3e5e64079754db2fcc50f29819
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agovlib: add PCI MSI-X interrupt support (vfio only) 49/10949/1
Damjan Marion [Sun, 4 Mar 2018 18:35:23 +0000 (19:35 +0100)]
vlib: add PCI MSI-X interrupt support (vfio only)

Change-Id: Iae2ddf93d1705354175e3dcae26b66e6f98a5c32
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovlib: map pci region by using vfio FD when vfio is used 47/10947/3
Damjan Marion [Sun, 4 Mar 2018 16:37:15 +0000 (17:37 +0100)]
vlib: map pci region by using vfio FD when vfio is used

Change-Id: Ib94e9e9e9fcdad9cdb0e3402b3de7d78bd644abe
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovlib: fix vlib_pci_get_device_info on when not running as root 46/10946/2
Damjan Marion [Sun, 4 Mar 2018 15:44:26 +0000 (16:44 +0100)]
vlib: fix vlib_pci_get_device_info on when not running as root

While comment properly says that only first 64 bytes can be read, actual
code was returning error instead being happy with 64 bytes received.

Change-Id: I09c0d1d5c9fc8e1f6c59c093d81bb1ce1924281b
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovppinfra: fix clib_mem_vm_ext_alloc non-shared allocations 45/10945/2
Damjan Marion [Sun, 4 Mar 2018 15:41:35 +0000 (16:41 +0100)]
vppinfra: fix clib_mem_vm_ext_alloc non-shared allocations

Change-Id: I6d049c0875b91f67f008dc04ae7efe2f8ddc276e
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoVPPAPIGEN: Improve output module finding for out-of-tree builds. 15/10915/2
Ole Troan [Thu, 1 Mar 2018 12:33:39 +0000 (13:33 +0100)]
VPPAPIGEN: Improve output module finding for out-of-tree builds.

Change-Id: I3b646d84586dd61018f71cbf21c971c97fda75c1
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agonetlink: Use nl_pid 0 to play nice with others. 42/10942/2
Jon Loeliger [Fri, 2 Mar 2018 19:05:12 +0000 (13:05 -0600)]
netlink: Use nl_pid 0 to play nice with others.

While the netlink field is named nl_pid, and typically
contains a process id, setting it to a pid value directly
prevents other modules from also using a netlink socket.
On the other hand, setting it to 0 allows multiple modules
to use a netlink socket by letting the kernel assign the
nl_pid a value.

This allows the verito tap code to interact nicely with
the router plugin's librtnl after, say, tap-inject has
been enabled.

Change-Id: I9771929f34d15497a5f7b8c5fd78dac28e31383b
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agotls: clib_mem_alloc context to avoid dangling references 44/10944/1
Florin Coras [Fri, 2 Mar 2018 17:23:42 +0000 (09:23 -0800)]
tls: clib_mem_alloc context to avoid dangling references

Change-Id: I1e3b48dfd21c9dbebdbcc0af0d6e888b416b3ac5
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agomake test: VCL extended test cases 38/10938/2
Dave Wallace [Fri, 2 Mar 2018 18:19:30 +0000 (13:19 -0500)]
make test: VCL extended test cases

- Add VCL cut thru uni-direction test over multiple sockets
- Add VCL cut thru bi-direction test over multiple sockets
- Add LDP cut thru uni-directional test over multiple sockets
- Add LDP cut thru bi-directional test over multiple sockets
- Add VCL thru host stack uni-direction test over multiple sockets
- Add VCL thru host stack bi-direction test over multiple sockets
- Add LDP thru host stack uni-directional test over multiple sockets
- Add LDP thru host stack bi-directional test over multiple sockets
- Fix validateResults to ensure worker_server process is killed if
  it still exists after running the test.

Change-Id: I77ea9acef172667558dbcec23af1e4c72b29f376
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agomake test: add "EXTENDED_TESTS" to help output. 39/10939/2
Dave Wallace [Fri, 2 Mar 2018 18:33:45 +0000 (13:33 -0500)]
make test: add "EXTENDED_TESTS" to help output.

Change-Id: I89540e93f3c8839bf6fc4363f4736e9c01d91927
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agogitignore: negate "No core files" pattern in 'vpp-api/java' 17/10917/3
Marek Gradzki [Thu, 1 Mar 2018 12:54:22 +0000 (13:54 +0100)]
gitignore: negate "No core files" pattern in 'vpp-api/java'

The 'vpp-api/java' includes 'core' subdir which should be tracked.

This patch adds .gitignore for 'vpp-api/java'
to negate pattern that matches 'core' files/dirs,
introduced by https://gerrit.fd.io/r/#/c/9848/.

Change-Id: I4e10ca10a891a2d95d6b45e479ee8d2196749132
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoAdd RPM buildtime dependency on mbedtls-devel 36/10936/2
Matthew Smith [Fri, 2 Mar 2018 14:39:17 +0000 (08:39 -0600)]
Add RPM buildtime dependency on mbedtls-devel

Update RPM spec to know about it

Change-Id: I61c7c1ce96071e3b84d792c18ff8880217b14fce
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agojvpp: object model for jvpp generator (VPP-1184) 28/10928/2
Marek Gradzki [Fri, 9 Feb 2018 12:42:12 +0000 (13:42 +0100)]
jvpp: object model for jvpp generator (VPP-1184)

Introduces JSON parser which builds object model of Java API.

Also rewrites JNI translation of typedefs
to use per type translation functions
instead of code inlining.

Not covered:
- integrate with vappigen plugin (VPP-1154) or vapi parser (VPP-1155)
- use better templating engine (VPP-480)
- improvements of generator structure (e.g. VPP-1186)

Change-Id: I9e12d76c2f3c6ee041669f58e8a37917f656aa90
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agosession: first approximation implementation of tls 68/10768/27
Florin Coras [Wed, 21 Feb 2018 20:07:41 +0000 (12:07 -0800)]
session: first approximation implementation of tls

It consists of two main parts. First, add an application transport type
whereby applications can offer transport to other applications. For
instance, a tls app can offer transport services to other applications.
And second, a tls transport app that leverages the mbedtls library for
tls protocol implementation.

Change-Id: I616996c6e6539a9e2368fab8a1ac874d7c5d9838
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agotapv2: CLI and binary API fixes 25/10925/2
Steven [Thu, 1 Mar 2018 17:36:01 +0000 (09:36 -0800)]
tapv2: CLI and binary API fixes

1. When interface create encouners an error (see test below),
the same id cannot be used again.
This is due to hash_set is called too early in the function. After the
hash entry is set, there are different errors may cause the interface
create to be aborted. But we didn't remove the hash entry when error is
encountered. The fix is to move the hash_set call near the end which has
no more "goto error"

DBGvpp# create tap id 1 rx-ring-size 1021 tx-ring-size 1021
create tap id 1 rx-ring-size 1021 tx-ring-size 1021
create tap: ring size must be power of 2
DBGvpp# create tap id 1 rx-ring-size 1024 tx-ring-size 1024
create tap id 1 rx-ring-size 1024 tx-ring-size 1024
create tap: interface already exists
DBGvpp#

2. multiple issues exist with api_format.c with the below command

binary-api tap_create_v2 id 4 hw-addr 90:e2:ba:76:cf:2f rx-ring-size 1024 tx-ring-size 1024

- hw_addr is not taken due to the test for random mac is inverted
- id is an integer, not a string
- integer values were not converted to network format

Change-Id: I5a669d702a80ad158517df46f0ab089e4d0d692e
Signed-off-by: Steven <sluong@cisco.com>
6 years agoNAT44: interface output feature and service host direct access (VPP-1176) 19/10919/3
Matus Fabian [Thu, 1 Mar 2018 12:48:33 +0000 (04:48 -0800)]
NAT44: interface output feature and service host direct access (VPP-1176)

forwarding mode:
session initiaded from service host - translate
session initiaded from remote host - do not translate

Change-Id: I48170ee8e4ad14d3d3083ee31a40ef8d10d6ff32
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 years agoChange tcp config to reflect some recent changes. 26/10926/1
John DeNisco [Thu, 1 Mar 2018 20:05:22 +0000 (15:05 -0500)]
Change tcp config to reflect some recent changes.

Change-Id: Ic151be9ff7114c1fdec22d5ad056654960cf12b2
Signed-off-by: John DeNisco <jdenisco@cisco.com>
6 years agoSCTP: API to delete a sub-connection 18/10918/2
Marco Varlese [Thu, 1 Mar 2018 13:01:46 +0000 (14:01 +0100)]
SCTP: API to delete a sub-connection

This patch adds an API to delete a sub-connection following a SRC/DST IP
mapping as required by the RFC4960.

Change-Id: I7673dd07352557442ffeed6c6c00da274b24953d
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years ago6RD: Rewritten 6RD RFC5969 support. 09/10509/26
Ole Troan [Mon, 12 Feb 2018 17:14:39 +0000 (18:14 +0100)]
6RD: Rewritten 6RD RFC5969 support.

Change-Id: Ic30fbcb2630f39e45345d7215babf5d7ed4b33a0
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoSTN: Fix stn_rules_dump/details to follow API convention 16/10916/2
Ole Troan [Thu, 1 Mar 2018 12:49:00 +0000 (13:49 +0100)]
STN: Fix stn_rules_dump/details to follow API convention

Change-Id: I94f6c35bf751d25ca7fe7c67054e676a3ad2241b
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agoFix ERSPAN encap to set EN bits in the header and add test case 49/10849/3
John Lo [Tue, 27 Feb 2018 21:35:03 +0000 (16:35 -0500)]
Fix ERSPAN encap to set EN bits in the header and add test case

For ERSPAN encap, both bits in the EN field of the header should
be set to indicate any VLAN tag in the original Ethernet frame is
preserved.
Added SPAN L2 test case where the mirrored packet output is a GRE
ERSPAN tunnel.

Change-Id: Ie7a40992a9278469c24aa6fa9e122b4505797d10
Signed-off-by: John Lo <loj@cisco.com>
6 years agoSCTP: API to add a sub-connection 11/10911/4
Marco Varlese [Thu, 1 Mar 2018 10:19:59 +0000 (11:19 +0100)]
SCTP: API to add a sub-connection

This patch adds an API to add a sub-connection following a SRC/DST IP
mapping as required by the RFC4960.
At the same time, it changes the way the next available sub-connection
is being calculated: rather than having an index in the parent
connection which is prone to many issues at run-time, the next available
sub-connection is being calculated by looking at the state of the set
sub-connections and if marked as DOWN it means that is an available slot
to be used.

Change-Id: I662be6a247bfbbe8bf9aaf3f485183c07ef862fe
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoPAPI: pycodestyle on vpp_papi.py 64/10864/2
Ole Troan [Wed, 28 Feb 2018 13:55:20 +0000 (14:55 +0100)]
PAPI: pycodestyle on vpp_papi.py

Change-Id: I15cf4a9fd2d2518df4bfffc1ba3c556a87ca5afa
Signed-off-by: Ole Troan <ot@cisco.com>
6 years agosession: zero out ips in local endpoint lookup only if local 53/10853/4
Florin Coras [Tue, 27 Feb 2018 18:05:57 +0000 (10:05 -0800)]
session: zero out ips in local endpoint lookup only if local

Change-Id: I3425b1533b3d31210166e7b3798685464ad1c489
Signed-off-by: Florin Coras <fcoras@cisco.com>
6 years agomake test: Add VCL LD_PRELOAD tests 10/10910/4
Dave Wallace [Wed, 28 Feb 2018 22:55:23 +0000 (17:55 -0500)]
make test: Add VCL LD_PRELOAD tests

- Refactor test code into VclTestCase object.
- Add LDP cut thru and thru host stack tests.

Change-Id: I2b16473df108004c79cc86fe1b7a789485b2dc5b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoAdjust vpp-selinux-policy postinstall 82/10782/3
Matthew Smith [Fri, 23 Feb 2018 03:12:11 +0000 (21:12 -0600)]
Adjust vpp-selinux-policy postinstall

Only run semodule command on hosts where selinux
is enabled.

Change-Id: I7bcfc758e44bb0f41ec657ad395352ddb92766eb
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agotapv2: abort in tap_create_if (VPP-1179) 08/10908/2
Steven [Wed, 28 Feb 2018 19:00:34 +0000 (11:00 -0800)]
tapv2: abort in tap_create_if (VPP-1179)

The following command sequences cause the crash:

create tap id 0 rx-ring-size 1024 tx-ring-size 1024
create tap id 1 rx-ring-size 1024 tx-ring-size 1024
set interface state tap0 up
set interface state tap1 up
delete tap tap0
delete tap tap1
create tap id 0 rx-ring-size 1024 tx-ring-size 1024

0: /home/sluong/vpp2/vpp/build-data/../src/vnet/interface_funcs.h:46
 (vnet_get_hw_interface) assertion `! pool_is_free (vnm->interface_main.hw_interfaces, _e)' fails

The reason for the crash is because when the tap interface is deleted,
the code does not remove the entry from the device queue. But the interface
is deleted anyway from vnet_main.interface_main.hw_interfaces.
When an interface is created again, it may encounter
the deleted entry in the device queue and crash. Notice create and delete a
single entry does not cause a crash. Need to create and delete 2 interfaces
to create a "hole" in the device queue.

Change-Id: I42ce0b7943d73b3eab32a16751a0a3183de62d9f
Signed-off-by: Steven <sluong@cisco.com>
6 years agoat af_packet input, drop partial packets to prevent l4 checksum deadloop at ouptut 07/10907/1
Chaoyu Jin [Wed, 28 Feb 2018 18:15:53 +0000 (10:15 -0800)]
at af_packet input, drop partial packets to prevent l4 checksum deadloop at ouptut

Change-Id: I6f75b7328fd0aa71d00a701e36c8b4ad06bff3c4
Signed-off-by: Chaoyu Jin <chjin@cisco.com>
6 years agoFix SELinux capabilities. Creating a tap interface with 'tap connect' was returning... 52/10852/2
Victor Nguyen -T (victong2 - OTHERWISE PORTAGE at Cisco) [Tue, 27 Feb 2018 17:20:03 +0000 (18:20 +0100)]
Fix SELinux capabilities. Creating a tap interface with 'tap connect' was returning an error when VPP was launched as a service (tested on CentOS 7.3). Adding 'net_admin' to SELinux capabilities for VPP solves the issue.

Change-Id: Icd0529b49adb86e7b371283a6f39af03816951c5
Signed-off-by: Victor Nguyen <victong2@cisco.com>
6 years agoSCTP: handle COOKIE while in SHUTDOWN phase 31/10831/2
Marco Varlese [Tue, 27 Feb 2018 08:38:31 +0000 (09:38 +0100)]
SCTP: handle COOKIE while in SHUTDOWN phase

This patch address the requirement to handle a COOKIE chunk whilst in
SHUTDOWN phase. The COOKIE shouldn't just be dropped but an OPERATION
ERROR chunk shall be sent to the peer to inform about the current
situation.

Change-Id: I1a47652402d49cfee3b0c810304d7902f3a62f40
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agovnet/interface: vnet_(put|get)frame_to_sw_interface is not worker thread aware 51/10851/2
Steven [Tue, 27 Feb 2018 22:43:40 +0000 (14:43 -0800)]
vnet/interface: vnet_(put|get)frame_to_sw_interface is not worker thread aware

When heavy traffic is running using worker threads, it may crash here

DBGvpp# 0: /home/sluong/vpp3/vpp/build-data/../src/vlib/main.c:1128 (dispatch_pending_node) assertion `f->flags & VLIB_FRAME_PENDING' fails

Thread 1 "vpp_main" received signal SIGABRT, Aborted.
0x00007ffff5d50428 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb)

No crash was observed if only main thread was used.

Change-Id: I96f8b02ec23accc85c0f1ddecfeff6043b5e3c2b
Signed-off-by: Steven <sluong@cisco.com>
6 years agomemif: Fix a message initialization problem in VAT 48/10848/2
Jon Loeliger [Tue, 27 Feb 2018 19:58:47 +0000 (13:58 -0600)]
memif: Fix a message initialization problem in VAT

The VAT calls to MEMIF_SOCKET_FILENAME_ADD_DEL erroneously
cleared the message memory after the M() macro call and
thus lost their message id.  Don't do that.

While in the neighborhood, prevent a string copy from
referencing data that doesn't belong to the filename string.

Change-Id: Ib4309608ed617ef4f193880ecf4a0b35fda65e51
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agosctp: sctp_output.c failed to compile when VLIB_BUFFER_TRACE_TRAJECTORY is enabled 47/10847/2
Steven [Tue, 27 Feb 2018 18:29:32 +0000 (10:29 -0800)]
sctp: sctp_output.c failed to compile when VLIB_BUFFER_TRACE_TRAJECTORY is enabled

Fixed a typo in sctp_push_header(). It was inherited from tcp_output.c

Change-Id: I810fcb4c24cfd3d54f15da72a5184cfc4df24592
Signed-off-by: Steven <sluong@cisco.com>
6 years agoVOM: interface: Fix the vhost user interface 38/10838/2
Mohsin Kazmi [Tue, 27 Feb 2018 13:05:15 +0000 (14:05 +0100)]
VOM: interface: Fix the vhost user interface

Change-Id: I38904dafb4110322ec0138f7a5b3a65c96426b2b
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agomake test: refactor vcl test cases 27/10827/4
Dave Wallace [Mon, 26 Feb 2018 19:40:13 +0000 (14:40 -0500)]
make test: refactor vcl test cases

- Reduce replicated code in test cases
- Configure separate namespace secrets for thru hoststack
  test case to validate namespace secret functionality.
- Pass per-instance environment variables to Worker class
  init function.

Change-Id: I3cd5d4538f105cbfb09671c4d761541b40714b8f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoSRv6: API uses table-IDs not FIB indicies 07/10807/2
Neale Ranns [Sun, 25 Feb 2018 20:39:37 +0000 (12:39 -0800)]
SRv6: API uses table-IDs not FIB indicies

Change-Id: Iacbf7593ef9c03000db502e68335ac3ae18995d7
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoAdded u8x16,u32x4,u64x2 variants of _zero_byte_mask(x) for ARM/NEON platform. VPP... 88/10788/4
Adrian Oanca [Fri, 23 Feb 2018 15:27:41 +0000 (16:27 +0100)]
Added u8x16,u32x4,u64x2 variants of _zero_byte_mask(x) for ARM/NEON platform. VPP-1129

Change-Id: I954acb56d901e42976e71534317f38d7c4359bcf
Signed-off-by: Adrian Oanca <adrian.oanca@enea.com>
6 years agoSCTP: Handle a COOKIE ECHO/ACK when a TCB Exists 22/10822/2
Marco Varlese [Mon, 26 Feb 2018 15:33:54 +0000 (16:33 +0100)]
SCTP: Handle a COOKIE ECHO/ACK when a TCB Exists

This patch addresses the requirements depicted in section 5.2.4 of the
RFC 4960. It also takes care of handling the ERROR chunk and obviously
the STALE COOKIE error.

Change-Id: I6b88a9371546b18a52abac22f7c593a5f16be838
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoSCTP: handle INIT corner-case handling 20/10820/2
Marco Varlese [Mon, 26 Feb 2018 13:52:25 +0000 (14:52 +0100)]
SCTP: handle INIT corner-case handling

As per RFC4960 the INIT chunk could be received in unexpected scenarios
and - depending on the state of the internal state-machine - the INIT
chunk requires different treatment.
This patch addresses section 5.2.1 and 5.2.2 of the RFC4960.

Change-Id: Ib23ef490c6a5ca3da6c46a9584b75e7577cb7042
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoFix current data offset to use vlib_buffer_get_current in input/output ACL 28/10828/1
Steve Shin [Mon, 26 Feb 2018 19:43:31 +0000 (11:43 -0800)]
Fix current data offset to use vlib_buffer_get_current in input/output ACL

vlib_buffer_get_current() should be used for current data offset in ACL.
This is required for output ACL where packets are decoded through a vxlan tunnel rx node.

Change-Id: I6f739f251c3eb0d59ee4ae0da97aa04ddf667468
Signed-off-by: Steve Shin <jonshin@cisco.com>
6 years agovlib: use vfio fd for accessing PCI config space 12/10812/4
Damjan Marion [Sun, 25 Feb 2018 22:26:22 +0000 (23:26 +0100)]
vlib: use vfio fd for accessing PCI config space

Change-Id: Id5c76a529ab9969334207790babcdc420a9c58ad
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoPython: addressing PEP8 deprecation 00/10800/2
Marco Varlese [Sun, 25 Feb 2018 10:28:52 +0000 (11:28 +0100)]
Python: addressing PEP8 deprecation

PEP8 has been deprecated and python users are being asked to migrate to
pycodestyle.

Change-Id: I52d5f7b2bf72156216a9966e8322ec58763f24d4
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoupdate BIER scapy patch to match the scapy repo PR 05/10805/2
Neale Ranns [Sun, 25 Feb 2018 18:52:12 +0000 (10:52 -0800)]
update BIER scapy patch to match the scapy repo PR

Change-Id: I4953b8444b49d1ad445c98a199ae8fd1635e24a5
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agoIPv6 MLD; pointer address used as hash key 04/10804/2
Neale Ranns [Sun, 25 Feb 2018 18:39:02 +0000 (10:39 -0800)]
IPv6 MLD; pointer address used as hash key

Change-Id: I7b2f52b2b2ce13f27bddc8750b8fc564bf6ab73e
Signed-off-by: Neale Ranns <nranns@cisco.com>
6 years agovnet: add 25G interface speed flag 10/10810/2
Damjan Marion [Sun, 25 Feb 2018 21:55:03 +0000 (22:55 +0100)]
vnet: add 25G interface speed flag

Change-Id: I1d3ede2b043e1fd4abc54f540bb1d3ac9863016e
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovlib: add vlib_buffer_free_from_ring 08/10808/2
Damjan Marion [Sun, 25 Feb 2018 21:50:39 +0000 (22:50 +0100)]
vlib: add vlib_buffer_free_from_ring

Change-Id: I63f7b14cd63eac9e64cace5d941190096ad148dc
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovnet: add vnet_device_input_have_features function 09/10809/2
Damjan Marion [Sun, 25 Feb 2018 21:52:07 +0000 (22:52 +0100)]
vnet: add vnet_device_input_have_features function

Change-Id: I28cfa7f7f5e4938146478c4a5cc5ad18612aadaa
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agovlib: fix formatting in pci_config.h 11/10811/2
Damjan Marion [Sun, 25 Feb 2018 21:59:11 +0000 (22:59 +0100)]
vlib: fix formatting in pci_config.h

Change-Id: I5ce40f82e42be19f0f4d882ab194e5a25980adc1
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoFix bug in dpdk_crypto_session_disposal() 02/10802/2
Matthew Smith [Sun, 25 Feb 2018 02:51:53 +0000 (20:51 -0600)]
Fix bug in dpdk_crypto_session_disposal()

The expression to determine whether to delete a session
from the disposal list only evaluates true if some,
but not all, of the sessions in the list were freed.
When all sessions in the list are freed, it evaluates
false and the sessions are left in the list to be freed
again later, which can result in a session pool element
that was reallocated to a different SA being freed,
breaking crypto for the newer SA.

Add an 'else' that handles the case where all sessions
were freed.

Change-Id: I3ae54d5b3bfc3658bf406caa50646924baaae589
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agovapi: handle more magic 03/10803/2
Klement Sekera [Sun, 25 Feb 2018 17:48:04 +0000 (18:48 +0100)]
vapi: handle more magic

Change-Id: I25cbf947d6aabadbf637387497104cb301762def
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agoSCTP: fix connection memory corruption 91/10791/3
Marco Varlese [Fri, 23 Feb 2018 16:43:06 +0000 (17:43 +0100)]
SCTP: fix connection memory corruption

A bug was found when multiple SCTP connections were being opened to the
same SCTP server. This patch addresses that problem, removing the use of
the 'parent' pointer approach for sub-connection and saving instead
within the sub-connection itself the ID representing its position. That
facilitates pointer-arithmetic to be computed in the
get_connection_from_transport().

Change-Id: Iaa1f4efc501590be1c93e42fd6fe3d6e02f635eb
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agodpdk: Add option to specify cache line size for dpdk build 99/10799/1
Damjan Marion [Sat, 24 Feb 2018 18:21:14 +0000 (19:21 +0100)]
dpdk: Add option to specify cache line size for dpdk build

Change-Id: Ib3361eded05babfc17ead28af7d252e7503ce141
Signed-off-by: Damjan Marion <damarion@cisco.com>
6 years agoFix crypto session deletion crash 93/10793/2
Matthew Smith [Thu, 22 Feb 2018 05:32:05 +0000 (23:32 -0600)]
Fix crypto session deletion crash

When using a DPDK cryptodev with IPsec, deleting a
session often results in a SEGV. A bad pointer
is being passed to rte_cryptodev_sym_session_free().

Put the correct value on the crypto disposal list and
add a check to determine whether the call to free the
session is going to result in a crash before doing
it.

Change-Id: I8a6b0a594585ebcfa56b555ede7ef7d67e5e2b33
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agoLDP: Refactor epoll_ctl wrapper. 69/10769/4
Dave Wallace [Fri, 23 Feb 2018 06:09:11 +0000 (01:09 -0500)]
LDP: Refactor epoll_ctl wrapper.

- Add AF_UNIX transaction to sock_test_client/server
  echo test to verify mixed epoll ldp implementation.
- Misc cleanup / refactoring of ldp code.
- Fix LDP_DEBUG in test/socket_test.sh

Change-Id: Ib524c824728f109007d8c4d07d74603b6c687902
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agou8x16_compare_byte_mask - optimize to use 128bit registers as suggested by Nintin 71/10571/3
Adrian Oanca [Thu, 15 Feb 2018 14:44:51 +0000 (15:44 +0100)]
u8x16_compare_byte_mask - optimize to use 128bit registers as suggested by Nintin

Change-Id: I88aabd34ef385d620695ac17ec3fe2f4a5177ada
Signed-off-by: Adrian Oanca <adrian.oanca@enea.com>
6 years agoVXLAN: Instance numbers now properly freed upon delete. 95/10795/1
Jon Loeliger [Fri, 23 Feb 2018 23:02:41 +0000 (17:02 -0600)]
VXLAN: Instance numbers now properly freed upon delete.

Fixes a small bookkeeping oversight where the VXLAN instance
numbers were being freed erroneously by their device_instance
number rather than the correct user_instance number.

Change-Id: I08f6b2089c7a14cc8a8cb91f04f850f60ecec43b
Signed-off-by: Jon Loeliger <jdl@netgate.com>
6 years agoVCL/LDP: Suppress trace output unless debug is enabled. 66/10766/2
Dave Wallace [Thu, 22 Feb 2018 21:22:09 +0000 (16:22 -0500)]
VCL/LDP: Suppress trace output unless debug is enabled.

Change-Id: Iaef2fe4b8c6b57d54ef6309423c9a0acba8a2f89
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 years agoConvert a pcap file to a set of C initializers 92/10792/1
Dave Barach [Fri, 23 Feb 2018 17:09:41 +0000 (12:09 -0500)]
Convert a pcap file to a set of C initializers

Change-Id: Ieb6b7a75fa23c8142ae15f42cd3a703253f39e10
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoDPDK: disabling DPAA since broken for 18.02 57/10757/2
Marco Varlese [Thu, 22 Feb 2018 15:03:35 +0000 (16:03 +0100)]
DPDK: disabling DPAA since broken for 18.02

Change-Id: I1e0cea8e7ea6d8a777ca38abb61f4c093f29c722
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
6 years agoDisable scatter-gather for ENA 67/10767/2
Matthew Smith [Thu, 22 Feb 2018 20:44:03 +0000 (14:44 -0600)]
Disable scatter-gather for ENA

ENA doesn't support scatter-gather. The PMD started
failing rte_eth_dev_rx_queue_config() in DPDK 18.02
if the flag to enable it is set. Turn the flag off in
dpdk_lib_init().

Change-Id: Ifdd9f188c89b46efe82412c75fb935a92436da1c
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agoAdd prefetch inlines, update bi-hash doc tags 80/10780/1
Dave Barach [Fri, 23 Feb 2018 12:45:36 +0000 (07:45 -0500)]
Add prefetch inlines, update bi-hash doc tags

Change-Id: I2e9d01ccba5288e89b886464436097d3cb7d2d18
Signed-off-by: Dave Barach <dave@barachs.net>
6 years agoVOM: vhost-use interfaces 19/10719/3
Neale Ranns [Tue, 20 Feb 2018 16:10:44 +0000 (08:10 -0800)]
VOM: vhost-use interfaces

Change-Id: Iee1574d1f0f081ccc4a90fd9825a0b5e254aa642
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
6 years agomake test: tidy worker subprocess output 64/10764/2
Klement Sekera [Thu, 22 Feb 2018 18:21:27 +0000 (19:21 +0100)]
make test: tidy worker subprocess output

Change-Id: I362765a67762a59775863af12b712abb47445b3a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
6 years agobihash table size perf/scale improvements 58/10758/2
Dave Barach [Thu, 22 Feb 2018 14:48:45 +0000 (09:48 -0500)]
bihash table size perf/scale improvements

Directly allocate and carve cache-line-aligned chunks of virtual
memory. To a first approximation, bihash wasn't using
clib_mem_free(...).

We eliminate mheap object header/trailers, which improves space
efficiency. We also eliminate the 4gb bihash table size limit. An 8_8
bihash w/ 100 million random entries uses 3.8 Gbytes.

Change-Id: Icf925fdf99bce7d6ac407ac4edd30560b8f04808
Signed-off-by: Dave Barach <dave@barachs.net>