Compare commits

...

49 Commits

Author SHA1 Message Date
Steve Shin
d594711a5d l2-flood: fix restore vnet buffer's flags in the replication routine
When BUM packets are flooded in the l2 domain, some data should be
kept and restored for recycling in the replication routine.
If l2 bridge domain has multiple interfaces mixed with normal and
vlan tagged, the vlan tag value of the vnet buffer can be changed
while flooding the replicated packets. The change is made to store
and restore the original vlan tag in the replication logic.

Change-Id: I399cf54cd2e74cb44a2be42241bdc4fba85032c5
Signed-off-by: Steve Shin <jonshin@cisco.com>
(cherry picked from commit 49806fe252030a4cd993f598ff65a89590d57388)
2017-11-14 03:45:24 +00:00
John Lo
5b99133cff Further fix to SHG handling for ARP/ICMPv6 from BVI in a BD
For ARP/ICMPv6 packets received from a BVI in a BD, allow flood
to all remote VTEPs via VXLAN tunnels irrespective of SHG check
for ARP request or ICMPv6 neighbor solicitation packets only.
All other packets types will flood normally as per SHG check.

Change-Id: I17b1cef9015e363fb684c2b6506ed6c4efe70bba
Signed-off-by: John Lo <loj@cisco.com>
2017-11-10 19:22:41 +00:00
JingLiuZTE
ace9fc92ca lock init
writer_lock must be inited before used.

Change-Id: Ib258aa09b3bccc4de6edba0eb75a7eec20f1a61f
Signed-off-by: JingLiuZTE <liu.jing5@zte.com.cn>
(cherry picked from commit 4c9f2a805038a2d4f663b05a3d08ac4ee1eec3da)
2017-11-09 02:10:15 +00:00
Florin Coras
5ed8774529 vppinfra: make _vec_resize_will_expand read-only
Change-Id: Ibcc20c24f6feb2b91245b0d88830a6c730d704e6
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit ef5d5aa2f168d7964076bcf74b0da249b3e0cd23)
2017-11-08 12:23:00 +00:00
John Lo
c97b4aca0d Fix SHG handling for ARP/ICMPv6 received from BVI in a BD
This change makes sure ARP/ICMPv6 brodcast packets received from
the BVI of a BD can be flooded to all remote VTEPs via its VXLAN
tunnels irrespective of SHG setting. Similar processing was done
for unicast packets already and needs to be extpanded to ARP and
ICMPv6 broadcast packets.

Change-Id: I26ac43ecdbc81a769f742a583a156506f7e70d49
Signed-off-by: John Lo <loj@cisco.com>
2017-11-08 00:11:49 +00:00
Neale Ranns
234301f3c7 Add replicate DPO header to export list for VPPSB
Change-Id: I0b437ac5fecc81c7762d9cad0f33e977fcf3aa27
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 60c1c7c0397eaeb201f0fe300285bda4ae3ef707)
2017-11-07 12:54:22 +00:00
Filip Tehlar
5a9ecce76a LISP: fix negative mapping timeout, VPP-1043
Change-Id: Ie57b81f8743f14182813558887d84d6667c81d43
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 0a62e5a3d817c3400be122c58d0311c298047580)
2017-11-06 07:49:17 +00:00
Chris Luke
e3c13e8b5b Fix for vppctl and interactive commands (VPP-1038)
- Interactive commands like "ping" read extra input from the
  input stream.
- In the case of "ping" it is simply a signal to cease the current
  operation.
- "vppctl", in non-interactive mode, will issue a "quit" immediately
  after the requested command to queue up closing of the session.
- This resulted in "ping" thinking a keypress was seen and returning
  control to the CLI; the "quit" command however is consumed by the
  keypress event handler and thus the session does not close.

- This patch reworks vppctl slightly to only issue "quit" after the
  command has completed. In particular it uses the fact that VPP issues
  NUL bytes as a surrogate prompt between output of commands to signal
  acknowledgement that the command has completed; vppctl now flags
  that the quit should be issued after the next such acknowledgement.
- Since input it still accepted, the user can still terminate the
  "ping" early, if desired.

Change-Id: I7e3dbe767f32f8e364ccb5f81799759b311585df
Signed-off-by: Chris Luke <chrisy@flirble.org>
2017-10-31 08:04:14 +00:00
Ole Troan
088f042400 VPP-1033: Python API support arbitrary sized input parameters.
Dynamically calculate the required buffer size to pack into based on
message definition. Also add input parameter length checking.

Change-Id: I7633bec596e4833bb328fbf63a65b866c7985de5
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit 895b6e8b4408108a9b5cea99dcb378c3524b18b2)
2017-10-27 19:07:08 +00:00
Florin Coras
116af2170e 17.10 Release Notes
Change-Id: I0c2a8412c9946e4d18b37db907735ac0b2ea2f6e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-25 17:13:38 -07:00
Sergio Gonzalez Monroy
84568df69a dpdk/ipsec: fix crypto device placement
VPP-1036

Change-Id: I96dae6a4a40c0142d03bdf750ef23c9ce5b6edfa
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-10-23 15:51:40 +01:00
Sergio Gonzalez Monroy
c47652c50b dpdk/ipsec: fix digest physical address
VPP-1034

Change-Id: Ib13cf0395bc2e42d24de51347e0aeed8a137f2f2
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2017-10-19 12:35:25 +00:00
Dave Barach
fb353ce54e CSIT-844: fix binary api rx pthread heap push/pop
We need to push/pop the rx pthread's heap without affecting other
thread(s).

Search clib_per_cpu_mheaps, locate an unused slot. Duplicate the main
thread heap pointer in that slot, and set __os_thread_index
appropriately.

Don't bail out of vpp_api_test with results pending, e.g. at the end
of a vpp_api_test script. Even though vpp will eventuallly
garbage-collect them, We don't want to leave allocated reply messages
lurking in the api message allocation rings...

This patch is a manual cherry-pick from gerrit 8862

Change-Id: If3c84abe61496905432bfa36767068bad4bd243b
Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-18 22:24:22 +00:00
Dave Barach
7513c8c7d2 VPP-930: add missing ntohl to send_ip6_fib_details(...)
Change-Id: I0c1671f3eaf2dad084e3ac9fb124c9ed78273f50
Signed-off-by: Dave Barach <dave@barachs.net>
2017-10-18 22:22:51 +00:00
Filip Tehlar
c64ef37c82 LISP: fix crash when sending NSH map-request message, ONE-32
Change-Id: Ief8c3d3bec116e9f884981fb52af528f98b5f6ff
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-10-18 07:11:40 -07:00
Dave Barach
50328c9d1e VPP-1031: Fix minor issues in clib_spinlock_unlock()
Change-Id: I20ce799c9dd57332c06003b466ee7c36169bce98
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit fa77e8fb1cc8a87a4a31792698e7200c4195583e)
2017-10-16 18:34:33 -04:00
Filip Tehlar
1999e983c5 LISP: fix map-request counters, ONE-25
Change-Id: I198f58a84c4692408f9205052af24ee22df7aeaa
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2017-10-16 07:02:04 -07:00
Florin Coras
a416ea9f02 ip: avoid arp assert if out of buffers (VPP-1030)
Change-Id: Ia31b978c6c1619c3e0075a84fcbbb6ccbf1c0076
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit d172a62365523427aebd34444736632c9a68a463)
2017-10-16 05:01:04 +00:00
Dave Barach
84db40e02e VPP-1029: Don't call clib_longjmp(...) directly from the SIGTERM handler
It's way too easy to imagine leaving a mutex or a spin-lock held in
the /vpe-api shared-memory segment, or elsewhere. Set a volatile
variable and check it in a safe place...

Change-Id: I9d91c38cffeb921143c272162d055c9c24a6c312
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 903651caf320dfdaabd20a0e6f3cd0ffc843e02f)
2017-10-16 02:33:49 +00:00
Steve Shin
b5518bedd9 dpdk: patch to support bonded interface for MLX NIC
At present, creating bonding devices using --vdev is broken for PMD like
mlx5 as it is neither UIO nor VFIO based and hence PMD driver is unknown
to find_port_id_by_pci_addr().

This DPDK patch fixes parsing PCI ID from bonding device params by verifying
it in RTE PCI bus, rather than checking dev->kdrv.

Change-Id: If575f63ef31733102566610d769ddd212d74736a
Signed-off-by: Steve Shin <jonshin@cisco.com>
(cherry picked from commit 268e64e312257b0ab36e0d5b9124cc3f2a1841a7)
2017-10-14 09:14:11 +00:00
Georgina Sheehan
abc914b7da plugins/dpdk: align memory to avoid potential segfault and false sharing
VPP-1025

Change-Id: I87bb8f38974a7be274c1b1d205f5513e7d068e48
Signed-off-by: Georgina <georgina.sheehan@intel.com>
2017-10-14 09:10:59 +00:00
Jan Gelety
5e62e58e4e Use csit rls1710 operational branch in vpp stable/1710
Change-Id: I6f7cd3e1119ab43a5512df8bcfcbcac53f2dd273
Signed-off-by: Jan Gelety <jgelety@cisco.com>
2017-10-13 13:47:05 +00:00
Matus Fabian
ec0452133a NAT: fix delete of sessions for 1:1 NAT if 1 worker (VPP-1023)
Change-Id: I2446c646de7f227f9438dd7ef93a455ba5af0102
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-10-12 04:17:45 -07:00
Florin Coras
cf6c343710 tcp: update thread time when initializing connection (VPP-1022)
Change-Id: I92b0dbd2d795e3ba9050797ede2b08638e55b6f5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-11 11:30:38 -07:00
Neale Ranns
e0c078aa2a IP neighbour move incorrectly placed jump label
Change-Id: I19fdf13a4848306ee3841d822b832cba96c5bce5
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 8edad036f1f8b920a6643a026f50a5d3aff8cbf1)
2017-10-11 16:06:37 +00:00
Florin Coras
87f1411722 tcp: do not format sb if not established (VPP-1018)
Change-Id: I011dda118f37cb31a37dda270027612d0af57ca0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-11 10:51:46 +00:00
Florin Coras
93b7822ddc lisp: memset to zero mapping delete args (VPP-1017)
Change-Id: If5e0fb8a1b60c7181b5b3d6dd923f52a24dda9b8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-11 01:28:28 -07:00
Dave Wallace
86c0446e28 make test: Copy api_post_mortem.$$ file tmp test dir for archiving. (VPP-1011)
Change-Id: I4baf89ef383dbc2f309081a6b56b13ebcb8fc2df
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit e2efd12b8418558cd8e701368287860409e8d265)
2017-10-11 08:08:55 +00:00
Steven
4ca58265a0 vhost: crash under heavy traffic condition due to memory corruption (VPP-1016)
With heavy traffic, tx code path may crash due to memory corruption

Thread 5 "vpp_wk_2" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff3995c700 (LWP 2505)]
0x00007ffff73675e8 in vhost_user_if_input (vm=0x7fffb5f5bf9c,
    vum=0x7ffff7882a40 <vhost_user_main>, vui=0x7fffb65570c4, qid=0,
    node=0x7fffb6577dac, mode=VNET_HW_INTERFACE_RX_MODE_POLLING)
    at /home/sluong/vpp-master/vpp/build-data/../src/vnet/devices/virtio/vhost-user.c:1610
1610		  bi_current = (vum->cpus[thread_index].rx_buffers)
	                       [vum->cpus[thread_index].rx_buffers_len];
(gdb) p vum->cpus[thread_index].rx_buffers_len
$2 = 793212607
(gdb)

Apparently, some code accidentally wrote the bad value in rx_buffers_len.
rx_buffers_len should never be greater than 1024 since that is how many buffers
we request each time.

After debugging many hours, I discovered that the memory corruption happens
in the tx code path right here on line 2176.

	  {
	    vhost_copy_t *cpy = &vum->cpus[thread_index].copy[copy_len];
	    copy_len++;
	    cpy->len = bytes_left;
	    cpy->len = (cpy->len > buffer_len) ? buffer_len : cpy->len;
	    cpy->dst = buffer_map_addr;
	    cpy->src = (uword) vlib_buffer_get_current (current_b0) +
	      current_b0->current_length - bytes_left;

(gdb) p cpy
$3 = (vhost_copy_t *) 0x7fffb554077c
(gdb) p copy_len
$4 = 1025
(gdb) p &vum->cpus[3].rx_buffers_len
$8 = (u32 *) 0x7fffb5540784

copy_len is picking up the index entry 1024 before it was incremented. copy array has only
1024 members (0 - 1023 are valid).
The assignment here in cpy surely causes memory corruption. It is only discovered later
when the memory location that it corrupted is used.

The condition for the crash is to transmit jumbo frames under heavy volume. Since ring
size is 1024, with one packet taking up one index for frame size (less 2048), it does
not cause overflow. With jumbo frames, it requires multiple indices for one packet,
it can cause the overflow under heavy traffic.

The fix is to do copy out when we have 1000 entries in the array to avoid
overflow.

Change-Id: Iefbc739b8e80470f1cf13123113f8331ffcd0eb2
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit aa5df48cb233b377b5910694e2440a16e5973864)
2017-10-11 08:08:06 +00:00
Thomas F Herbert
dfa0d20405 Deps added to Makefile must also be in spec file.
Deps are required for Fedora too.

This patch should be in version 17.10 because it
fixes breaking rpm builds in some circumstances.

JIRA: VPP-1015

Change-Id: I10807069742cdd6b09a0f34d9d05e9cae4146ec3
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-10-11 07:58:10 +00:00
Thomas F Herbert
8c5bfbcc09 Fix bug with temporary directory when building rpms.
Fixes bug introduced in commit 5349f94d.

JIRA: VPP-1014

Change-Id: Ia18f4c6f5f1124306cce790a36f6de970d186687
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2017-10-09 14:50:38 -04:00
Matus Fabian
dea5881815 NAT: fixed ICMP broken translation for GRE tunnel interface (VPP-1008)
Change-Id: Ie3245b96c511cc30915e70e8c881f445291a38c2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2017-10-09 10:52:39 +00:00
Dave Wallace
76c37d2d84 make test: Create link to failed test dir on timeout. (VPP-1011)
- Also change default coredump configuration from
  "coredump-size unlimited" to "full-coredump"

Change-Id: Iefedc2636f2d9696b7575b34e91dd7be49f601fa
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 981fadf928dadac683d2f629edf738aa91510af3)
2017-10-06 22:59:03 +00:00
Steven
fc7e711003 tuntap: Introduce per thread structure to suport multi-threads (VPP-1012)
https://gerrit.fd.io/r/#/c/8551/ decoupled the global variable,
namely tm->iovecs from TX and RX. However, to support multi-threads,
we have to eliminate the use of this global variable with per thread
variable. I notice that rx_buffers must also be per thread variable.
So, we introduce per thread struct to contain rx_buffers and iovecs.
Each thread will find the per thread struct with thread_index.

Change-Id: I61abf2fdace8d722525a382ac72f0d04a173b9ce
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 4cd257667406d0500a81323ef91f5c7c8c902b25)
2017-10-06 13:44:01 +00:00
Pierre Pfister
67700d4116 fix buffer allocation for sparse jumbo frames in vhost
A bug was reported where a jumbo packet would stay in vhost
queue forever or until a large enough number of other packets
arrived in the queue too.

This is due to a bug in vhost input node buffer allocation.

The fix is to make sure that vhost always allocates at least
enough buffers for one single big packet. '40' is used to
account for 65kB frames.

Change-Id: I1d293028854165083e30cd798fab9d4140230b78
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2017-10-05 20:08:18 +00:00
Klement Sekera
a5081a7ac3 drop python3 dependency (VPP-1010)
Change-Id: I99c2c1d0d5b96f33efdb58dd3a2897a752e65349
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-10-05 20:06:53 +00:00
Dave Wallace
e691345d7a make test: archive failed test data with build logs. (VPP-1011)
- Fix invocation of compress_failed.sh
- Fix compress_failed to copy compressed results
  files to $WORKSPACE/archives and return failure
  exit code.

Failed test case data will be copied to logs.fd.io
and found in the archives/<make test data dir>-FAILED
directory in the build log link in the
vpp-verify-master-ubuntu1604 jenkins job page.

For example:
https://logs.fd.io/production/vex-yul-rot-jenkins-1/vpp-verify-master-ubuntu1604/7353/archives/

Change-Id: Ife9a0737115e69c0a8441e3bb0133af1528d909b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 25dc16715ee3fc0a600e2f58841173249bfae501)
2017-10-05 18:42:42 +00:00
Steven
79bfbae54c memif: crash on slave mode (VPP-1006)
Crash was seen on recent image with this BT on top of the stack

(gdb) bt full
    (mif=0x7fffb6226568) at
    /vpp/build-data/../src/plugins/memif/memif.c:297
        ring = 0x0 <<<<<<<<<<
        i = 0
        j = 0
        buffer_offset = 65792
        r = 0x7fffb5e59f80
        alloc = {flags = 1, name = 0x7fffb449f965 "memif region",
          size = 4260096, numa_node = 0, addr = 0x7fff41dac000,
          fd = 11,
          log2_page_size = 12, n_pages = 1041}
        err = 0x0
        __FUNCTION__ = "memif_init_regions_and_queues"

The crash happened at this line.
      ring = memif_get_ring (mif, MEMIF_RING_S2M, i);
      ring=>head = ring->tail = 0; <=====

Please note that the crash is caused by dereferencing NULL rinng.
Put breakpoint into the function. I notice that
mif->regions[0].shm is not initialized.

(gdb) p mif->regions[0].shm
$8 = (void *) 0x0

It looks like we forgot to set shm after clib_mem_vm_ext_alloc().
Add the missing cide and the crash is fixed.

Change-Id: Ib722a6c241c77acfa8e33962106b57faa50e1ea7
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 9fefa9a697daf0e949ea7a2700ecaf2ba4d1d2cb)
2017-10-05 04:07:59 +00:00
Florin Coras
f3d627dd3c session: fill in bind handle for sock flavored api (VPP-1005)
Change-Id: I492bea060ba5c219ea75e19ebfdad79b1074e04b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-04 22:03:14 +00:00
Jon Loeliger
de6c03c0f1 Propagate duplicate IF addr add/del error up to API.
Identify and complain when the same IP prefix is assigned
to two different SW interfaces:

    vpp# set int ip address TenGigabitEthernet6/0/0 1.2.3.4/32
    vpp# set int ip address TenGigabitEthernet6/0/1 1.2.3.4/32
    set interface ip address: Prefix 1.2.3.4/32 already found on
	interface TenGigabitEthernet6/0/0

Change-Id: I1aee1b6a7ddd00d3109a53d8e1b6ce97bf45e372
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 35ffa3e8f6b032f6e324234d495f769049d8feea)
2017-10-04 18:48:52 +00:00
Neale Ranns
77d7dcba32 Set MAC address needs the HW interface index
Change-Id: I7b175d57b85e626aab00221b6dac0498aebcbeae
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit d867a7cf6baffcebbf1b6e408272ec22dc55dd68)
2017-10-04 17:14:58 +00:00
Neale Ranns
8ec5f4d742 Dump of deag/lookup routes has is_drop=1 (VPP-995)
Change-Id: I58772a83e22885a9ea8a7a981d2bcb4b31a050d2
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 7b7ba572ab486d57b59c12af521175a6bcd7a52b)
2017-10-04 09:53:55 +00:00
John Lo
dab7eb87bc Update L2FIB entry timestamp only if BD aging enabled (VPP-1002)
Change L2 learning path so it update stale timestamp in MAC entry
only if aging is enabled on the BD for the MAC entry.

Change-Id: I7babe986ceef3c030d8ef9185076c42b405f7b0f
Signed-off-by: John Lo <loj@cisco.com>
(cherry picked from commit 5a6508d7269266b4a3ecacdd197ea3514a0c0e28)
2017-10-03 18:59:37 +00:00
Florin Coras
780af45905 ip: fix probing of already resolved destinations (VPP-998)
Change-Id: I3e6276e6829dfee5a7aeae1b4ab4c3d2f2e932a4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-10-03 14:58:12 +00:00
Eyal Bari
bd70c2f2e3 L2-FIB:add mac learn events test
fixes an issue where events were not sent if BD doesn't enable  mac aging

Change-Id: Iddc53cb5c45e560633e6c5cff2731dccfc70ad5b
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit 24db0ec78fb651c4c585ebf30e07108240574045)
2017-10-02 01:30:12 +00:00
Steven
1808f3c00a cdp/lldp: punt for no buffer (VPP-997)
When making a call to vlib_packet_template_get_packet(), it
is possible to get back a NULL if the system runs out of buffer.
This can happen when there is buffer leaks. But don't crash
just because we run out of buffers, just punt.

Change-Id: Ie90ea41f3dda6e583d48959cbd18ff124158d7f8
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 0ff5c563d5048991dbd02a3892dccde8305a7e30)
2017-09-29 18:23:54 +00:00
Steven
3fd57e6753 tun/tap: Bad packets sent to kernel via tun/tap interface
It was observed that under heavy traffic, VPP accidentally sent traffic
with the wrong source and destination to the tun/tap interface. Traffic
appears to be sent to the wrong direction. This problem is only
seen when worker thread is configured.

When worker thread is used, TX and RX may reside in different
core. Yet both TX and RX threads are sharing the same global variable,
namely iovecs without any mutex or memory barrier protection.
This creates a race condition when heavy traffic is blasted to VPP,
like 1000 pps.

We could create a mutex or memory barrier to ensure atomic memory access.
But why bother? It is a lot cheaper to just decouple the iovecs such
that TX and RX have their own iovecs.

Change-Id: I86a5a19bd8de54d54f32e1f0845bae6a81bbf686
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 4ff586d1c6fc5c40e1548cd6f221a8a7f3ad033b)
2017-09-28 02:40:49 +00:00
Chris Luke
d84f2ef54a General documentation updates
- We now have several developer-focused docs, so create an index page
  for them.
- Rework several docs to fit into the index structure.
- Experiment with code highlighting; tweak the CSS slightly to make
  it slightly nicer to look at.

Change-Id: I4185a18f84fa0764745ca7a3148276064a3155c6
Signed-off-by: Chris Luke <chrisy@flirble.org>
(cherry picked from commit 64ebb5ff1338140d94c7f9ee72138fe84d89de2e)
2017-09-28 01:47:14 +00:00
Florin Coras
7ea28045aa 17.10 change default branch in gitreview
Change-Id: Icd2cc7e328719b3964dfe344caf8ed9858283661
Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-27 14:11:15 -07:00
80 changed files with 1071 additions and 395 deletions

View File

@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/1710

View File

@ -81,13 +81,16 @@ endif
RPM_DEPENDS = redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils
RPM_DEPENDS += apr-devel
RPM_DEPENDS += numactl-devel
RPM_DEPENDS += check
RPM_DEPENDS += check check-devel
ifeq ($(OS_ID)-$(OS_VERSION_ID),fedora-25)
RPM_DEPENDS += subunit subunit-devel
RPM_DEPENDS += openssl-devel
RPM_DEPENDS += python-devel
RPM_DEPENDS += python2-virtualenv
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
else ifeq ($(shell if [ "$(OS_ID)" = "fedora" ]; then test $(OS_VERSION_ID) -gt 25; echo $$?; fi),0)
RPM_DEPENDS += subunit subunit-devel
RPM_DEPENDS += compat-openssl10-devel
RPM_DEPENDS += python2-devel
RPM_DEPENDS += python2-virtualenv
@ -110,13 +113,7 @@ endif
RPM_SUSE_DEPENDS = autoconf automake bison ccache chrpath distribution-release gcc6 glibc-devel-static
RPM_SUSE_DEPENDS += java-1_8_0-openjdk-devel libopenssl-devel libtool make openssl-devel
RPM_SUSE_DEPENDS += python-devel python3-devel python-pip python3-pip python-rpm-macros shadow nasm libnuma-devel python3
ifeq ($(filter rhel centos,$(OS_ID)),$(OS_ID))
RPM_DEPENDS += python34
else
RPM_DEPENDS += python3
endif
RPM_SUSE_DEPENDS += python-devel python-pip python-rpm-macros shadow nasm libnuma-devel
ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
STARTUP_CONF ?= $(STARTUP_DIR)/startup.conf

View File

@ -30,10 +30,11 @@ Directory name | Description
build-root | Build output directory
doxygen | Documentation generator configuration
dpdk | DPDK patches and build infrastructure
@ref src | VPP source code
@ref extras/libmemif | Client library for memif
@ref src/examples | VPP example code
@ref src/plugins | VPP bundled plugins directory
@ref src/svm | Shared virtual memory allocation library
src/tests | Unit tests
src/tests | Standalone tests (not part of test harness)
src/vat | VPP API test program
@ref src/vlib | VPP application library
@ref src/vlibapi | VPP API library
@ -43,9 +44,8 @@ Directory name | Description
@ref src/vpp | VPP application
@ref src/vpp-api | VPP application API bindings
@ref src/vppinfra | VPP core library
test | Unit tests
@ref src/vpp/api | Not-yet-relocated API bindings
@ref src/examples | VPP example code
test | Unit tests and Python test harness
## Getting started
@ -95,12 +95,13 @@ for this can be found [on the Setting up Vagrant wiki page]
## More information
Several modules provide documentation, see @subpage user_doc for more
information.
end-user-oriented information. Also see @subpage dev_doc for developer notes.
Visit the [VPP wiki](https://wiki.fd.io/view/VPP) for details on more
advanced building strategies and development notes.
advanced building strategies and other development notes.
## Test Framework
There is PyDoc generated documentation available for the VPP test framework. See @subpage test_framework_doc for details.
There is PyDoc generated documentation available for the VPP test framework.
See @ref test_framework_doc for details.

View File

@ -1,5 +1,6 @@
# Release Notes {#release_notes}
* @subpage release_notes_1710
* @subpage release_notes_1707
* @subpage release_notes_1704
* @subpage release_notes_17011
@ -7,6 +8,251 @@
* @subpage release_notes_1609
* @subpage release_notes_1606
@page release_notes_1710 Release notes for VPP 17.10
More than 400 commits since the 1707 release.
## Features
- Infrastructure
- DPDK 17.08
- IP reassembly
- Bounded-index extensible hash bucket-level LRU cache
- Templated timer wheel improvements
- API
- C/C++ language binding
- API stats
- Host stack
- VPP TCP stack scale/congestion improvements
- VPP Comms Library (VCL)
- Overall performance, scale and hardening
- Network features
- IPSec rework - utilize new FIB
- VPLS and VPWS implementation
- NAT
- Renamed SNAT to NAT
- Performance / Scale
- Destination NAT44 with load-balancing
- In2out translation as an output feature on the outside interface
- Fullback to 3-tuple key for non TCP/UDP/ICMP sessions
- Security Groups/ACLs
- "Replace" semantics for adding a new MacIP acl
- Test suite tests for MacIP ACLs
- ONE-LISP
- Map-server fallback support
- Preemptive re-fetch of active mappings that are about to expire
- ND termination
- PPPoE
- PPPoE Control Plane packet dispatch
- PPPoE decapsulation
- PPPoE encapsulation
## Known issues
For the full list of issues please refer to fd.io [JIRA](https://jira.fd.io).
## Issues fixed
For the full list of fixed issues please refer to:
- fd.io [JIRA](https://jira.fd.io)
- git [commit log](https://git.fd.io/vpp/log/?h=stable/1710)
## API changes
Message Name Result
bridge_domain_add_del definition changed
bridge_domain_details definition changed
connect_session definition changed
connect_sock definition changed
connect_sock_reply definition changed
connect_uri_reply definition changed
create_vhost_user_if definition changed
dhcp_client_config definition changed
ip4_arp_event definition changed
ip6_fib_details definition changed
ip6_nd_event definition changed
ip_add_del_route definition changed
ip_fib_details definition changed
ip_table_add_del definition changed
l2_macs_event only in image
macip_acl_add_replace definition changed
macip_acl_interface_list_details only in image
macip_acl_interface_list_dump only in image
modify_vhost_user_if definition changed
mpls_fib_details definition changed
mpls_route_add_del definition changed
mpls_table_add_del definition changed
mpls_tunnel_add_del definition changed
nat44_add_del_address_range definition changed
nat44_add_del_interface_addr definition changed
nat44_add_del_lb_static_mapping definition changed
nat44_add_del_static_mapping definition changed
nat44_address_details only in image
nat44_address_dump only in image
nat44_interface_add_del_feature definition changed
nat44_interface_add_del_output_feature definition changed
nat44_interface_addr_details only in image
nat44_interface_addr_dump only in image
nat44_interface_details only in image
nat44_interface_dump only in image
nat44_interface_output_feature_details only in image
nat44_interface_output_feature_dump only in image
nat44_lb_static_mapping_details only in image
nat44_lb_static_mapping_dump only in image
nat44_static_mapping_details only in image
nat44_static_mapping_dump only in image
nat44_user_details only in image
nat44_user_dump only in image
nat44_user_session_details only in image
nat44_user_session_dump only in image
nat_control_ping definition changed
nat_det_add_del_map definition changed
nat_det_close_session_in definition changed
nat_det_close_session_out definition changed
nat_det_forward definition changed
nat_det_get_timeouts definition changed
nat_det_map_details only in image
nat_det_map_dump only in image
nat_det_reverse definition changed
nat_det_session_details only in image
nat_det_session_dump only in image
nat_det_set_timeouts definition changed
nat_ipfix_enable_disable definition changed
nat_set_workers definition changed
nat_show_config definition changed
nat_worker_details only in image
nat_worker_dump only in image
one_add_del_ndp_entry definition changed
one_enable_disable_petr_mode definition changed
one_enable_disable_pitr_mode definition changed
one_enable_disable_xtr_mode definition changed
one_get_transport_protocol definition changed
one_map_register_fallback_threshold definition changed
one_map_register_set_ttl definition changed
one_ndp_bd_get definition changed
one_ndp_entries_get definition changed
one_set_transport_protocol definition changed
one_show_petr_mode definition changed
one_show_pitr_mode definition changed
one_show_xtr_mode definition changed
p2p_ethernet_add definition changed
pppoe_add_del_session definition changed
pppoe_session_details only in image
pppoe_session_dump only in image
punt_socket_deregister definition changed
punt_socket_register definition changed
show_one_map_register_fallback_threshold definition changed
show_one_map_register_ttl definition changed
snat_interface_add_del_output_feature definition changed
snat_interface_output_feature_details only in image
snat_interface_output_feature_dump only in image
sw_interface_event only in image
sw_interface_set_flags definition changed
sw_interface_span_dump definition changed
sw_interface_span_enable_disable definition changed
sw_interface_vhost_user_details definition changed
tcp_configure_src_addresses definition changed
vnet_per_interface_combined_counters only in image
vnet_per_interface_simple_counters only in image
want_interface_combined_stats definition changed
want_interface_simple_stats definition changed
want_ip4_fib_stats definition changed
want_ip4_nbr_stats definition changed
want_ip6_fib_stats definition changed
want_ip6_nbr_stats definition changed
want_l2_macs_events definition changed
want_per_interface_combined_stats definition changed
want_per_interface_simple_stats definition changed
Found 103 api message signature differences
Patches that updated the API files:
./src/plugins/pppoe/pppoe.api
62f9cdd8 Add PPPoE Plugin
./src/plugins/acl/acl.api
c29940c5 ACL-plugin add "replace" semantics for adding a new MacIP acl
de9fbf43 MAC IP ACL interface list dump (as an alternative to the get/reply)
./src/plugins/nat/nat.api
704018cf NAT: Destination NAT44 with load-balancing (VPP-954)
2ba92e32 NAT: Rename snat plugin to nat (VPP-955)
./src/vnet/interface.api
831fb59f Stats refactor
d292ab1e No context in SW interface event
a07bd708 Dedicated SW Interface Event
./src/vnet/dhcp/dhcp.api
51822bf0 DHCP client option 61 "client_id"
4729b1ec DHCP complete event sends mask length
./src/vnet/lldp/lldp.api
99a0e60e Add API support for LLDP config/interface set
./src/vnet/lisp-cp/one.api
d630713d LISP: add neighbor discovery and CP protocol separation APIs
111a5cea LISP: Add APIs for enable/disable xTR/P-ITR/P-ETR modes
7048ff1e LISP: Map-server fallback feature
1e553a00 LISP: make TTL for map register messages configurable
./src/vnet/ethernet/p2p_ethernet.api
15ac81c1 P2P Ethernet
./src/vnet/mpls/mpls.api
2297af01 Add a name to the creation of an IP and MPLS table
28ab9cc1 FIB table add/delete API only
da78f957 L2 over MPLS
a0a908f1 FIB path weight incorrect in dump (VPP-922)
57b5860f FIB path preference
./src/vnet/session/session.api
33e002b1 Fix session connect api message handling.
./src/vnet/span/span.api
5b311202 SPAN/API:enable L2 dump
001fd406 SPAN:add l2 mirror
./src/vnet/devices/virtio/vhost_user.api
4ba75f54 vhost: Remove operation mode in the API
./src/vnet/vxlan-gpe/vxlan_gpe.api
04ffd0ad VPP crash on creating vxlan gpe interface. VPP-875
./src/vnet/tcp/tcp.api
3bbcfab1 TCP source address automation
./src/vnet/ip/ip.api
2297af01 Add a name to the creation of an IP and MPLS table
28ab9cc1 FIB table add/delete API only
57b5860f FIB path preference
./src/vnet/lisp-gpe/lisp_gpe.api
af3d9771 Remove unused retval from gpe_native_fwd_rpath type definition
./src/vnet/l2/l2.api
50570ece Update of free text tag patch for BD
48304141 Support for bridge domain free text tag
e531f4cb Increase default MAC learn limit and check it in learn-update path
8d00fff8 Add support for API client to receive L2 MAC events
./src/vpp/api/vpe.api
8a19f12a Allow individual stats API and introduce stats.api
4802632d Punt socket: Fix coverity error for pathname length mismatch between API and sun_path.
f7a55ad7 PUNT socket: External control plane processes connected via UNIX domain sockets.
75e2f2ac API:fix arp/ND event messages - remove context
99a0e60e Add API support for LLDP config/interface set
./src/vpp/stats/stats.api
831fb59f Stats refactor
8a19f12a Allow individual stats API and introduce stats.api
@page release_notes_1707 Release notes for VPP 17.07
More than 400 commits since the 1704 release.

View File

@ -1,2 +1,2 @@
#!/bin/sh
echo oper-170926
echo oper-rls1710-171011

View File

@ -62,7 +62,8 @@ DOXY_INPUT ?= \
$(wildcard $(WS_ROOT)/*.md) \
$(wildcard $(DOXY_DIR)/*.md) \
$(DOXY_SRC_DIRECTORIES) \
$(DOXY_SRC)/plugins
$(DOXY_SRC)/plugins \
extras
# Strip leading workspace path from input names
DOXY_INPUT := $(subst $(WS_ROOT)/,,$(DOXY_INPUT))
@ -73,7 +74,6 @@ DOXY_INPUT := $(subst $(WS_ROOT)/,,$(DOXY_INPUT))
# there's a DPDK equivalent that conflicts.
# These must be left-anchored paths for the regexp below to work.
DOXY_EXCLUDE ?= \
$(DOXY_SRC)/vlib/buffer.c \
$(DOXY_SRC)/vpp-api/lua
# Generate a regexp for filenames to exclude

View File

@ -45,3 +45,9 @@ pre {
a.el {
font-family: Consolas, Courier, monospace;
}
div.fragment {
padding: 2px;
margin-left: 8px;
}

12
doxygen/dev_doc.md Normal file
View File

@ -0,0 +1,12 @@
Developer Documentation {#dev_doc}
=======================
Programming notes for developers.
- @subpage test_framework_doc
- @subpage sample_plugin_doc
- @subpage api_doc
- @subpage vapi_doc
- @subpage acl_hash_lookup
- @subpage acl_multicore
- @subpage libmemif_doc

View File

@ -882,7 +882,8 @@ EXAMPLE_RECURSIVE = NO
# that contain images that are to be included in the documentation (see the
# \image command).
IMAGE_PATH = $(ROOT)/doxygen/assets
IMAGE_PATH = $(ROOT)/doxygen/assets \
$(ROOT)/extras/libmemif/docs
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program

View File

@ -3,5 +3,6 @@ Test Framework Documentation {#test_framework_doc}
PyDoc generated documentation for the "make test" framework is available for the following releases
- [Test framework documentation for VPP 17.10](https://docs.fd.io/vpp/17.10/vpp_make_test/html)
- [Test framework documentation for VPP 17.04](https://docs.fd.io/vpp/17.04/vpp_make_test/html)
- [Test framework documentation for VPP 17.01](https://docs.fd.io/vpp/17.01/vpp_make_test/html)

View File

@ -16,6 +16,4 @@ Several modules provide operational, dataplane-user focused documentation.
- @subpage span_doc
- @subpage srv6_doc
- @subpage srmpls_doc
- @subpage sample_plugin_doc
- @subpage nat64_doc
- @subpage api_doc

View File

@ -25,7 +25,7 @@ DPDK_MLX5_PMD ?= n
B := $(DPDK_BUILD_DIR)
I := $(DPDK_INSTALL_DIR)
DPDK_VERSION ?= 17.08
PKG_SUFFIX ?= vpp1
PKG_SUFFIX ?= vpp2
DPDK_BASE_URL ?= http://fast.dpdk.org/rel
DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)

View File

@ -0,0 +1,63 @@
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index bb634c6..7c65dda 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -61,16 +61,6 @@
unsigned i;
for (i = 0; i < rte_eth_dev_count(); i++) {
-
- /* Currently populated by rte_eth_copy_pci_info().
- *
- * TODO: Once the PCI bus has arrived we should have a better
- * way to test for being a PCI device or not.
- */
- if (rte_eth_devices[i].data->kdrv == RTE_KDRV_UNKNOWN ||
- rte_eth_devices[i].data->kdrv == RTE_KDRV_NONE)
- continue;
-
pci_dev = RTE_ETH_DEV_TO_PCI(&rte_eth_devices[i]);
eth_pci_addr = &pci_dev->addr;
@@ -98,6 +88,16 @@
return -1;
}
+static inline int
+pci_addr_cmp(const struct rte_device *dev, const void *_pci_addr)
+{
+ struct rte_pci_device *pdev;
+ const struct rte_pci_addr *paddr = _pci_addr;
+
+ pdev = RTE_DEV_TO_PCI(*(struct rte_device **)(void *)&dev);
+ return rte_eal_compare_pci_addr(&pdev->addr, paddr);
+}
+
/**
* Parses a port identifier string to a port id by pci address, then by name,
* and finally port id.
@@ -106,10 +106,23 @@
parse_port_id(const char *port_str)
{
struct rte_pci_addr dev_addr;
+ struct rte_bus *pci_bus;
+ struct rte_device *dev;
int port_id;
+ pci_bus = rte_bus_find_by_name("pci");
+ if (pci_bus == NULL) {
+ RTE_LOG(ERR, PMD, "unable to find PCI bus\n");
+ return -1;
+ }
+
/* try parsing as pci address, physical devices */
- if (eal_parse_pci_DomBDF(port_str, &dev_addr) == 0) {
+ if (pci_bus->parse(port_str, &dev_addr) == 0) {
+ dev = pci_bus->find_device(NULL, pci_addr_cmp, &dev_addr);
+ if (dev == NULL) {
+ RTE_LOG(ERR, PMD, "unable to find PCI device\n");
+ return -1;
+ }
port_id = find_port_id_by_pci_addr(&dev_addr);
if (port_id < 0)
return -1;

View File

@ -1,4 +1,4 @@
## Build Instructions
## Build Instructions {#libmemif_build_doc}
Install dependencies
```
@ -49,6 +49,7 @@ commands:
ip-set <index> <ip-addr> - set interface ip address
rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
```
#### Examples
Once the library is build/installed, refer to [Examples](../examples/README.md) and [Getting started](GettingStarted.md) for additional information on basic use cases and API usage.
Once the library is built/installed, refer to @ref libmemif_examples_doc and @ref libmemif_gettingstarted_doc for additional information on basic use cases and API usage.

View File

@ -1,8 +1,8 @@
## Getting started
## Getting started {#libmemif_gettingstarted_doc}
#### Concept (Connecting to VPP)
For detailed information on api calls and structures please refer to [libmemif.h](../src/libmemif.h)
For detailed information on api calls and structures please refer to @ref libmemif.h.
1. Initialize memif
- Declare callback function handling file descriptor event polling.
@ -152,7 +152,8 @@ if (err != MEMIF_ERR_SUCCESS)
#### Example app (libmemif fd event polling):
- [ICMP Responder](../examples/icmp_responder/main.c)
- @ref extras/libmemif/examples/icmp_responder
> Optional argument: transmit queue id.
```
icmpr 1
@ -162,11 +163,14 @@ icmpr 1
#### Example app:
- [ICMP Responder custom fd event polling](../examples/icmp_responder-epoll/main.c)
ICMP Responder custom fd event polling.
- @ref extras/libmemif/examples/icmp_responder-epoll
#### Example app (multi-thread queue polling)
- [ICMP Responder multi-thread](../examples/icmp_responder-mt/main.c)
ICMP Responder multi-thread.
- @ref extras/libmemif/examples/icmp_responder-mt
> Simple example of libmemif multi-thread usage. Connection establishment is handled by main thread. There are two rx queues in this example. One in polling mode and second in interrupt mode.

View File

@ -1,16 +0,0 @@
## Examples
After build, root folder will contain scripts linking binary examples with library (same name as example apps). These scripts can be executed to run example apps without installing the library. Example apps binaries can be found in _libs_ filder. To run binaries directly, make sure that libmemif library is installed.
#### Run in container
ligato/libmemif-sample-service image contains built and installed libmemf. To run different examples, override docker CMD to start container in bash:
```
# docker run -it --entrypoint=/bin/bash -i --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" ligato/libmemif-sample-service
```
Current WORKDIR is set to root repository directory. Example apps can be run from this directory (a script linking binary with library), or browse to ./.libs folder and execute binary directly.
Example app | Description
------------|------------
[icmpr](../examples/icmp_responder/main.c) | Simplest implementaion. Event polling is handled by libmemif. Single memif conenction in slave mode is created (id 0). Use Ctrl + C to exit app. Memif receive mode: interrupt.
[icmpr-epoll](../examples/icmp_responder-epoll/main.c) (run in container by default) | Supports multiple connections and master mode. User can create/delete connections, set ip addresses, print connection information. [Example setup](ExampleSetup.md) contains instructions on basic connection use cases setups. Memif receive mode: interrupt. App provides functionality to disable interrupts for specified queue/s for testing purposes. Polling mode is not implemented in this example.
[icmpr-mt](../examples/icmp_responder-mt/main.c) | Multi-thread example, very similar to icmpr-epoll. Packets are handled in threads assigned to specific queues. Slave mode only. Memif receive mode: polling (memif_rx_poll function), interrupt (memif_rx_interrupt function). Receive modes differ per queue.

View File

@ -1,11 +1,12 @@
## Example setup
## Example setup {#libmemif_example_setup_doc}
#### VPP-memif master icmp_responder slave
> Libmemif example app(s) use memif default socket file: /run/vpp/memif.sock.
> Libmemif example app(s) use memif default socket file: `/run/vpp/memif.sock`.
Run VPP and icmpr-epoll example (default example when running in container).
> Other examples work similar to icmpr-epoll. Brief explanation can be found in [Examples readme](README.md) file.
> Other examples work similar to icmpr-epoll. Brief explanation can be found in @ref libmemif_examples_doc .
VPP-side config:
```

View File

@ -0,0 +1,18 @@
## Examples {#libmemif_examples_doc}
After build, root folder will contain scripts linking binary examples with library (same name as example apps). These scripts can be executed to run example apps without installing the library. Example apps binaries can be found in _libs_ filder. To run binaries directly, make sure that libmemif library is installed.
#### Run in container
`ligato/libmemif-sample-service` image contains built and installed libmemf. To run different examples, override docker CMD to start container in bash:
```
# docker run -it --entrypoint=/bin/bash -i --rm --name icmp-responder --hostname icmp-responder --privileged -v "/run/vpp/:/run/vpp/" ligato/libmemif-sample-service
```
Current WORKDIR is set to root repository directory. Example apps can be run from this directory (a script linking binary with library), or browse to `./.libs` folder and execute binary directly.
Example app | Description
------------|------------
@ref extras/libmemif/examples/icmp_responder | Simplest implementaion. Event polling is handled by libmemif. Single memif conenction in slave mode is created (id 0). Use Ctrl + C to exit app. Memif receive mode: interrupt.
@ref extras/libmemif/examples/icmp_responder-epoll (run in container by default) | Supports multiple connections and master mode. User can create/delete connections, set ip addresses, print connection information. @ref libmemif_example_setup_doc contains instructions on basic connection use cases setups. Memif receive mode: interrupt. App provides functionality to disable interrupts for specified queue/s for testing purposes. Polling mode is not implemented in this example.
@ref extras/libmemif/examples/icmp_responder-mt) | Multi-thread example, very similar to icmpr-epoll. Packets are handled in threads assigned to specific queues. Slave mode only. Memif receive mode: polling (memif_rx_poll function), interrupt (memif_rx_interrupt function). Receive modes differ per queue.

View File

@ -1,5 +1,6 @@
Shared Memory Packet Interface (memif) Library
Shared Memory Packet Interface (memif) Library {#libmemif_doc}
==============================================
## Introduction
Shared memory packet interface (memif) provides high performance packet transmit and receive between user application and Vector Packet Processing (VPP) or multiple user applications. Using libmemif, user application can create shared memory interface in master or slave mode and connect to VPP or another application using libmemif. Once the connection is established, user application can receive or transmit packets using libmemif API.
@ -63,10 +64,11 @@ commands:
rx-mode <index> <qid> <polling|interrupt> - set queue rx mode
```
Continue with [Example setup](examples/ExampleSetup.md) which contains instructions on how to set up conenction between icmpr-epoll example app and VPP-memif.
Continue with @ref libmemif_example_setup which contains instructions on how to set up conenction between icmpr-epoll example app and VPP-memif.
#### Next steps
- [Build instructions](docs/BuildInstructions.md) Instructions on how to build/install libmemif.
- [Examples](examples/README.md) More example apps presenting different features.
- [Getting started](docs/GettingStarted.md) Introduction to libmemif API. Explaining library usage in custom app.
- @subpage libmemif_build_doc
- @subpage libmemif_examples_doc
- @subpage libmemif_example_setup_doc
- @subpage libmemif_gettingstarted_doc

View File

@ -31,6 +31,10 @@ Version: %{_version}
Release: %{_release}
Requires: vpp-lib = %{_version}-%{_release}, net-tools, pciutils, python
BuildRequires: systemd, chrpath
BuildRequires: check, check-devel
%if 0%{?fedora} >= 25
BuildRequires: subunit, subunit-devel
%endif
%if 0%{?fedora} >= 26
BuildRequires: compat-openssl10-devel
BuildRequires: python2-devel, python2-virtualenv
@ -122,7 +126,7 @@ This package contains the python bindings for the vpp api
%prep
# Unpack into dir with longer name as work around of debugedit bug in in rpm-build 4.13
rm -rf %{name}-%{_version}
rm -rf %{_tmpbuild_dir}
rm -rf %{_tmp_build_dir}
/usr/bin/xz -dc '%{_sourcedir}/%{name}-%{_version}-%{_release}.tar.xz' | /usr/bin/tar -xf -
mv %{name}-%{_version} %{_tmp_build_dir}
cd '%{_tmp_build_dir}'

View File

@ -1,4 +1,4 @@
ACL plugin constant-time lookup design
ACL plugin constant-time lookup design {#acl_hash_lookup}
======================================
The initial implementation of ACL plugin performs a trivial for() cycle,

View File

@ -1,4 +1,4 @@
Multicore support for ACL plugin
Multicore support for ACL plugin {#acl_multicore}
================================
This captures some considerations and design decisions that I have made,
@ -20,16 +20,18 @@ at the time of replacing the old ACL being checked, with
the new ACL.
In case an acl_add_replace is being used to replace the rules
within the existing entry, a reallocation of am->acls[X].rules
within the existing entry, a reallocation of `am->acls[X].rules`
vector will happen and potentially a change in count.
acl_match_5tuple() has the following code:
```{.c}
a = am->acls + acl_index;
for (i = 0; i < a->count; i++)
{
r = a->rules + i;
. . .
```
Ideally we should be immune from a->rules changing,
but the problem arises if the count changes in flight,

View File

@ -188,7 +188,7 @@ fill_free_list (vlib_main_t * vm,
/* Always allocate new buffers in reasonably large sized chunks. */
n = clib_max (n, fl->min_n_buffers_each_physmem_alloc);
vec_validate (vm->mbuf_alloc_list, n - 1);
vec_validate_aligned (vm->mbuf_alloc_list, n - 1, CLIB_CACHE_LINE_BYTES);
if (rte_mempool_get_bulk (rmp, vm->mbuf_alloc_list, n) < 0)
return 0;

View File

@ -334,10 +334,6 @@ crypto_op_setup (u8 is_aead, struct rte_mbuf *mb0,
sym_cop->m_src = mb0;
rte_crypto_op_attach_sym_session (cop, session);
if (!digest_paddr)
digest_paddr =
rte_pktmbuf_mtophys_offset (mb0, (uintptr_t) digest - (uintptr_t) mb0);
#if DPDK_NO_AEAD
sym_cop->cipher.data.offset = cipher_off;
sym_cop->cipher.data.length = cipher_len;

View File

@ -236,7 +236,7 @@ dpdk_esp_decrypt_node_fn (vlib_main_t * vm,
u32 cipher_off, cipher_len;
u32 auth_off = 0, auth_len = 0, aad_size = 0;
u8 *aad = NULL, *digest = NULL;
u64 digest_paddr = 0;
u64 digest_paddr;
u8 *iv = rte_pktmbuf_mtod_offset(mb0, void*, sizeof (esp_header_t));
dpdk_cop_priv_t *priv = (dpdk_cop_priv_t *)(sym_cop + 1);
@ -249,6 +249,8 @@ dpdk_esp_decrypt_node_fn (vlib_main_t * vm,
vlib_buffer_get_current (b0) + sizeof(esp_header_t) +
iv_size + payload_len;
digest_paddr = mb0->buf_physaddr + (digest - (u8 *) mb0->buf_addr);
if (is_aead)
{
u32 *_iv = (u32 *) iv;

View File

@ -358,6 +358,12 @@ dpdk_esp_encrypt_node_fn (vlib_main_t * vm,
u32 cipher_off, cipher_len;
u32 auth_off = 0, auth_len = 0, aad_size = 0;
u8 *aad = NULL, *digest = NULL;
u64 digest_paddr;
digest =
vlib_buffer_get_current (b0) + b0->current_length - trunc_size;
digest_paddr = mb0->buf_physaddr + (digest - (u8 *) mb0->buf_addr);
if (is_aead)
{
@ -380,10 +386,6 @@ dpdk_esp_encrypt_node_fn (vlib_main_t * vm,
*((u32 *) & aad[8]) = sa0->seq_hi;
aad_size = 12;
}
digest =
vlib_buffer_get_current (b0) + b0->current_length -
trunc_size;
}
else
{
@ -393,10 +395,6 @@ dpdk_esp_encrypt_node_fn (vlib_main_t * vm,
auth_off = ip_hdr_size;
auth_len = b0->current_length - ip_hdr_size - trunc_size;
digest =
vlib_buffer_get_current (b0) + b0->current_length -
trunc_size;
if (PREDICT_FALSE (sa0->use_esn))
{
*((u32 *) digest) = sa0->seq_hi;
@ -407,7 +405,7 @@ dpdk_esp_encrypt_node_fn (vlib_main_t * vm,
crypto_op_setup (is_aead, mb0, cop, sess,
cipher_off, cipher_len, (u8 *) icb, iv_size,
auth_off, auth_len, aad, aad_size,
digest, 0, trunc_size);
digest, digest_paddr, trunc_size);
if (PREDICT_FALSE (is_ipv6))
{

View File

@ -293,18 +293,12 @@ dpdk_ipsec_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
max_nb_qp = cdev_info.max_nb_queue_pairs;
for (i = 0; i < tm->n_vlib_mains; i++)
for (i = skip_master; i < tm->n_vlib_mains; i++)
{
u8 is_outbound;
crypto_worker_main_t *cwm;
uword *map;
if (skip_master)
{
skip_master = 0;
continue;
}
cwm = vec_elt_at_index (dcm->workers_main, i);
map = cwm->algo_qp_map;

View File

@ -290,6 +290,7 @@ memif_init_regions_and_queues (memif_if_t * mif)
return err;
r->fd = alloc.fd;
r->shm = alloc.addr;
for (i = 0; i < mif->run.num_s2m_rings; i++)
{

View File

@ -523,11 +523,11 @@ snat_in2out_error_t icmp_get_key(ip4_header_t *ip0,
* @param e optional parameter
*/
u32 icmp_match_in2out_slow(snat_main_t *sm, vlib_node_runtime_t *node,
u32 thread_index, vlib_buffer_t *b0, u8 *p_proto,
u32 thread_index, vlib_buffer_t *b0,
ip4_header_t *ip0, u8 *p_proto,
snat_session_key_t *p_value,
u8 *p_dont_translate, void *d, void *e)
{
ip4_header_t *ip0;
icmp46_header_t *icmp0;
u32 sw_if_index0;
u32 rx_fib_index0;
@ -537,13 +537,7 @@ u32 icmp_match_in2out_slow(snat_main_t *sm, vlib_node_runtime_t *node,
clib_bihash_kv_8_8_t kv0, value0;
u32 next0 = ~0;
int err;
u32 iph_offset0 = 0;
if (PREDICT_FALSE(vnet_buffer(b0)->sw_if_index[VLIB_TX] != ~0))
{
iph_offset0 = vnet_buffer (b0)->ip.save_rewrite_length;
}
ip0 = (ip4_header_t *) ((u8 *) vlib_buffer_get_current (b0) + iph_offset0);
icmp0 = (icmp46_header_t *) ip4_next_header (ip0);
sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX];
rx_fib_index0 = ip4_fib_table_get_index_for_sw_if_index (sw_if_index0);
@ -622,11 +616,11 @@ out:
* @param e optional parameter
*/
u32 icmp_match_in2out_fast(snat_main_t *sm, vlib_node_runtime_t *node,
u32 thread_index, vlib_buffer_t *b0, u8 *p_proto,
u32 thread_index, vlib_buffer_t *b0,
ip4_header_t *ip0, u8 *p_proto,
snat_session_key_t *p_value,
u8 *p_dont_translate, void *d, void *e)
{
ip4_header_t *ip0;
icmp46_header_t *icmp0;
u32 sw_if_index0;
u32 rx_fib_index0;
@ -637,7 +631,6 @@ u32 icmp_match_in2out_fast(snat_main_t *sm, vlib_node_runtime_t *node,
u32 next0 = ~0;
int err;
ip0 = vlib_buffer_get_current (b0);
icmp0 = (icmp46_header_t *) ip4_next_header (ip0);
sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX];
rx_fib_index0 = ip4_fib_table_get_index_for_sw_if_index (sw_if_index0);
@ -715,7 +708,7 @@ static inline u32 icmp_in2out (snat_main_t *sm,
echo0 = (icmp_echo_header_t *)(icmp0+1);
next0_tmp = sm->icmp_match_in2out_cb(sm, node, thread_index, b0,
next0_tmp = sm->icmp_match_in2out_cb(sm, node, thread_index, b0, ip0,
&protocol, &sm0, &dont_translate, d, e);
if (next0_tmp != ~0)
next0 = next0_tmp;
@ -2919,11 +2912,11 @@ VLIB_NODE_FUNCTION_MULTIARCH (snat_det_in2out_node, snat_det_in2out_node_fn);
* @param e optional parameter
*/
u32 icmp_match_in2out_det(snat_main_t *sm, vlib_node_runtime_t *node,
u32 thread_index, vlib_buffer_t *b0, u8 *p_proto,
u32 thread_index, vlib_buffer_t *b0,
ip4_header_t *ip0, u8 *p_proto,
snat_session_key_t *p_value,
u8 *p_dont_translate, void *d, void *e)
{
ip4_header_t *ip0;
icmp46_header_t *icmp0;
u32 sw_if_index0;
u32 rx_fib_index0;
@ -2942,7 +2935,6 @@ u32 icmp_match_in2out_det(snat_main_t *sm, vlib_node_runtime_t *node,
ip4_address_t in_addr;
u16 in_port;
ip0 = vlib_buffer_get_current (b0);
icmp0 = (icmp46_header_t *) ip4_next_header (ip0);
echo0 = (icmp_echo_header_t *)(icmp0+1);
sw_if_index0 = vnet_buffer(b0)->sw_if_index[VLIB_RX];

View File

@ -462,7 +462,7 @@ int snat_add_static_mapping(ip4_address_t l_addr, ip4_address_t e_addr,
u_key.addr = m->local_addr;
u_key.fib_index = m->fib_index;
kv.key = u_key.as_u64;
if (sm->num_workers)
if (sm->num_workers > 1)
tsm = vec_elt_at_index (sm->per_thread_data, m->worker_index);
else
tsm = vec_elt_at_index (sm->per_thread_data, sm->num_workers);

Some files were not shown because too many files have changed in this diff Show More