4417 Commits

Author SHA1 Message Date
Andrew Yourtchenko
f74b4d2b55 acl-plugin: VPP-1400: fix crash when removing a session entry
bihash deletion operation may in turn do underlying memory operations,
so ensure it is using the correct (private) heap.

Change-Id: Ibef7ad7f9db6fa83da02316bf7509072ce579bc0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-06 11:08:30 +00:00
Marco Varlese
eabe79ca28 sctp: reduce the number of clients and mbytes (VPP-1396)
Reducing the number of clients and mbytes transferred to make the test a
functional test rather than a stress one.

Change-Id: I715ab5db087b96c40da37d4221f3030b10519fd0
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
(cherry picked from commit 038d2614bffae707582703f116e52c516f51b26b)
2018-09-05 16:54:05 +00:00
Ed Warnicke
9a9ab594e8
Correct DPDK version in release notes
Change-Id: Ie4c86373fef7583276f68a8be125d372d4603a23
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
2018-09-04 11:48:48 -05:00
Andrew Yourtchenko
1edc406da3 acl-plugin: VPP-1400: VPP may crash when performing ACL modifications on applied ACLs
The partition_split() did not increment the refcount when using a mask type index,
thus subsequent modifications potentially resulted in double frees and in the best case
immediate crash, in the worst case delayed crash in another place.

Introduce the lock_mask_type_index() and call it, move the mask type index
related functions closer to the top of the file.

Make the assignment of the new mask type indices
for the tuplemerge case to use the assign_mask_type_index().

Keep some debugs in case we need to investigate this further at some point.

Change-Id: Iae370f5cd92e1fe1442480db34656a8a3442dbc0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-03 16:08:02 +00:00
Andrew Yourtchenko
d039281e11 acl-plugin: fix the memory leak with colliding entries storage
Change-Id: I634971f6376a7ea49de718ade9139e67eeed48e5
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-09-03 16:03:20 +00:00
Matus Fabian
e0fe0fd090 NAT44: fix nat44_ed_not_translate_output_feature for multiple VRF (VPP-1404)
Change-Id: I44acc5aeff59dc25d18369e29618bbe39d30a1b3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit f96d0a105d357a6b7bb4252b271fbcbab45bc9bd)
2018-09-02 11:37:15 +00:00
shubing guo
86f6d3e291 VPP-1387:foreach outside address vector to find correct index when free outside address and port
Change-Id: Ie5452350a8ebe2c1b62085fcab50dbc0138d3ae2
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
(cherry picked from commit 762a4938900abeedd42676ab2582fcceabdc07fa)
2018-09-02 11:37:03 +00:00
Yichen Wang
6b4b20318b vhost: Fix VPP crash when reloading VM with mixed-type ports [VPP-1406]
When VM is having mixed type of vhost-user and SRIOV ports, QEMU (RedHat
v2.10) will not send disconnect signal to VPP, and just gives the new
memory region directly. VPP is not able to handle new memory region
mapping without disconnect signal first, which will result in a SEGV.
The fix will handle the VM reboot scenario without explict disconnect
signal from QEMU.

The fix is to invalidate the avail, desc, and used pointers in the txvq
when the new memory regions are received. This is because these pointers
are not valid anymore with the new memory regions. In the input node, check
to make sure the avail pointer is valid and punt if not.

Change-Id: Ieb8b427b202f4442a58907dab1661d63a03650de
Signed-off-by: Yichen Wang <yicwang@cisco.com>
2018-09-02 11:36:31 +00:00
shubing guo
2a12fb231b VPP-1381: Fix the incorrect if condition when delete session for static mapping
-- The session should not be deleted when either ip address or port doesn't same with static mapping.

Change-Id: I09ab7379947654d2780a8c40c5340ce430541b12
Signed-off-by: shubing guo <guo.shubing@zte.com.cn>
(cherry picked from commit 060c3a7e5a2d23189a8c6348e767cd2018a58dd6)
2018-08-31 16:01:38 +00:00
Matus Fabian
bd8b4f1a84 NAT44: fix next_src_nat (VPP-1384)
Use rx_fib_index instead of sm->inside_fib_index for session lookup key.

Change-Id: I2d6cce5b9376fa8ac4d75a9bbfa8498be0fd1493
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit 182e37e33f80cc65f3cf27b69e74d855dd858a7e)
2018-08-31 10:23:31 +00:00
Neale Ranns
2da975c4dd SR-MPLS: fixes and tests
- the FIB path takes a vector of type fib_mpls_label_t not u32 so the untype safe vec_add did not work
- write som eSR-MPLS tests
- allow an MPLS tunnel to resolve through a SR BSID

Change-Id: I2a18b9a9bf43584100ac269c4ebc286c9e3b3ea5
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 7c922dc404c2c0a2d67d53ca05db1c1ae1598f44)
2018-08-31 09:03:07 +00:00
Steven
fe47e29fc6 lacp: issue with slave interface admin up after it is added to the bond group [VPP-1409]
When the slave interface is admin up after it is added to the bond group,
lacp does not send lacp pdu's to the interface because its periodic timer
is not running.

The issue was the slave interface's variables got reset after the state
machines were initialized.

Change-Id: I2942556ce29a4acc97db3be40293e69bed7b6679
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit bf21dc85053931bc597e0fab1112061aa60e986b)
2018-08-31 05:16:42 +00:00
Neale Ranns
ead8eb34e3 SR-mpls: do not pass empty label stack to fib
Change-Id: Ib1601d01a54296e72be3bbfa057fce965549b02b
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-08-29 21:54:51 +00:00
Matthew Smith
19d4ecddeb backport mlx patch for DPDK >= 18.05
Memory allocation changed in DPDK 18.05. The mlx4 and mlx5
PMDs did not support using externally allocated memory.

The patch for mlx5 was generated by Mellanox. That patch was
modified to apply to the mlx4 PMD and tested on Microsoft
Azure.

Patches were originally tested and used with VPP master
(prerelease 18.10). Then backported to VPP stable/1807.

Change-Id: I883e0d796e59702731bec06c96210f0b134188db
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-08-29 13:30:37 -05:00
Neale Ranns
270e190085 Consolidate table->index conversion in fib-path CLI processing
Change-Id: I221cebddc45efbfdec428b7df2af96e2aedff2dd
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 77eb9073b178e8d4375bf0ef274246586f018ddc)
2018-08-29 12:06:41 +00:00
Neale Ranns
6da5d8d237 Adjacency walks protected by 'walk in progress' flag
Change-Id: I3281f65f7dec792d56de48afb39efcc2fed8578b
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 30d53645ded750db3cc84f6fb4a97df038b143a1)
2018-08-28 09:30:59 +00:00
Neale Ranns
ff83ce7b94 MPLS: allow 16 as a valid output label
Change-Id: I7e6045514d58010258889cadd220b7efcef7c1b9
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 9514fab0423725fddcb0a4f5ec070ac8d2764ac8)
2018-08-28 07:35:29 +00:00
Neale Ranns
2506190ab4 IPIP and SIXRD tunnels create API needs table-IDs not fib-indexes
Change-Id: Ifaef196a24fa9b6924f2b9692318f69763cee5e1
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-22 21:52:13 -07:00
Ole Troan
d1bf43c2aa VPP-1392: VXLAN fails with IP fragmentation
Not only is it wasteful to send all fragments back through ip4-lookup, but
it doesn't work with tunnel mechanisms that don't have IP enabled on their
payload side.

Change-Id: Ic92d95982dddaa70969a2a6ea2f98edec7614425
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit b3655e5592e3e8e48eb087632f3fa71915891a9f)
2018-08-17 21:40:02 +00:00
Florin Coras
4280bfc8c0 tcp_echo: fix server rx buffer
Change-Id: I7bb81259008f5d2da6e26405fd0774294181dc6b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-08-13 15:21:02 +00:00
Yi He
332cc5a60b Fix undefined symbol: fformat_append_cr in vat plugins loading
Several test plugins report undefined symbol while being loaded
by load_one_vat_plugin. Fix this by adding VPP_API_TEST_BUILTIN
into CFLAGS for building these plugins.

Change-Id: I908720fd0d01da1ead30ba17027ba10358f6bdf1
Signed-off-by: Yi He <yi.he@arm.com>
(cherry picked from commit d05ce97724ed8681e80c32a948564d0163994365)
2018-08-09 17:26:02 +00:00
Matus Fabian
6c2dc9bab1 NAT44: fix bug in snat_interface_add_del (VPP-1380)
Should not enable nat44-hairpinning node in deterministic mode

Change-Id: I5790323a6842ee71a62c6c91c49166a2839eac12
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-08-09 13:45:05 +00:00
Dave Barach
21076e5d47 Fix dangling reference in l2fib_scan(...)
Deleting a bihash kvp frees the bucket's backing storage when the
bucket reference count reaches zero. l2fib_scan MUST check for that
condition, and stop scanning the bucket if it occurs. One of the L2
FIB extended "make test" vectors caused this issue 100% of the time.

Change-Id: I250bcc4c1518e16042120fbc4032227a759a602e
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 28374cada08df61180044e24cb758fa570e73c9d)
2018-08-07 18:10:35 +00:00
Dave Barach
ab955b1b44 fix dangling reference in foreach_key_value_pair
When the user deletes the last entry in a bihash bucket, the bihash
infra frees the bucket's backing storage. If this happens under
clib_bihash_foreach_key_value_pair - and the freed bucket happens to
be the bucket being traversed - the resulting dangling reference can
easily make the wheels fall off.

Simple fix: if (bucket-is-now-empty) double-break.

Change-Id: Idc44247a82ed5d0ba548507b4a53d4c8503ba8bb
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit ca45ee73d7c49c7f659c5cd690d3403d440e50f9)
2018-08-06 11:28:38 -04:00
Neale Ranns
374819dd58 loop counter to prevent infiinte number of look ups per-packet
Change-Id: I59235d11baac18785a4c90cdaf14e8f3ddf06dab
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-08-03 09:15:28 -04:00
Neale Ranns
78c7077634 fix 'sh vxlan tunnels'
this receipe:
  /* Get a line of input. */
  if (!unformat_user (input, unformat_line_input, line_input))
    return 0;
only works if there is more data following the registered command name.
So it is not so good for show commands...

Change-Id: I54249865a44526ade4b40e2d6207138a2d056e40
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
(cherry picked from commit 16be62e3846750b5b7921c0b4d6408477be434f7)
2018-08-01 07:38:16 +00:00
Ed Warnicke
db6d6b3058
Update Release Notes for 18.07 Release
Change-Id: I2b58bca6d360badb4fd17022121e244aee5713b8
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
v18.07
2018-07-30 14:29:08 -05:00
Rajesh Saluja
17ee6f08d4 Reverse the logic of flagging malformed packet in fragmentation code to allow padding
Change-Id: I051c137ae18fd436a798a12a56a9d12f8eaa2e08
Signed-off-by: Rajesh Saluja <rajsaluj@cisco.com>
(cherry picked from commit 1f895c9a40f446ca9f1b7803f350c70ebb3ad0fa)
2018-07-30 11:24:54 +00:00
Juraj Sloboda
3c723f3812 Fix memory leak in processing of ICMPv6 RA event (VPP-1360)
Change-Id: I7c3e5e91391b1c9b36e8ea8bacee9a107da1ae96
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-07-27 11:33:34 +02:00
Lukasz Majczak
c1ebcc4022 VPP-1359 Wrong vl_msg_id
Wrong vl_msg_id set in vl_api_stats_get_poller_delay_t_handler while reporting stats delay.

Change-Id: I7d6ad14359e41c717b976390c58e254e3602e0ff
Signed-off-by: Lukasz Majczak <lma@semihalf.com>
2018-07-26 14:15:56 +00:00
Jakub Grajciar
258a189d18 avf: api fix
avf_create_reply returns software index for the new interface

Change-Id: I8a6b1a1985b072efafa24eb258b1f2cb1bea1110
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
(cherry picked from commit 4e6014fc9e8611eef16d9267151f1039ff00c190)
2018-07-26 08:37:15 +00:00
Eyal Bari
456ded496f fix vector index range checks (VPP-1353)
Change-Id: I63c36644c9d93f2c3ec6606ca0205b407499de4e
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit cd30774fa9280736ffaea3e9a51948593e8eebc2)
Signed-off-by: John Lo <loj@cisco.com>
2018-07-24 15:15:25 +00:00
Matus Fabian
c16a23c596 NAT44: fix forwarding feature bug (VPP-1349)
Change-Id: I5009fcfde5c627d59dea3edda15486b9392134a2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
v18.07-rc2
2018-07-23 19:39:02 +00:00
Neale Ranns
6f9bc4e4d8 QOS: mark/record fix feature ordering c-n-p error
vnet_feature_arc_init:215: feature node 'mpls-qos-mark' not found (after 'vlan-mpls-qos-record', arc 'mpls-input')
vnet_feature_arc_init:215: feature node 'ip6-qos-mark' not found (after 'vlan-ip6-qos-record', arc 'ip6-multicast')
...etc...

Change-Id: I22cb98d57e2480f5978fff315b77b9cbb6a9f9dd
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
(cherry picked from commit 8d753f906ecdd152af1e524919e99bd9ab45de46)
2018-07-23 10:28:43 +00:00
Neale Ranns
9df8ffa0dc QoS: marking and recording for MPLS and VLAN
Change-Id: Icec79aa9039d5d7835d311fde0b7c1a0c76c9eb1
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 0809f6c0300f85cf5cf5d49df1aa8f1e2d080f6c)
2018-07-23 08:34:24 +00:00
Dave Barach
ca23c3ea16 Loopback tx: support multiple tx intfcs per frame
Can happen if code bypasses the per-interface output node, and
dispatches packets directly to the tx node.

Switch to vlib_get_buffers(...) ... vlib_buffer_enqueue_to_next (...),
quad/single loop coding pattern.

Change-Id: Ic0e5d3b9748230f4e545a54186e6e64e7a782bb1
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 78451a6a660cd26a67d2284219f48878a2dfe2c3)
2018-07-22 00:53:04 +00:00
Neale Ranns
2ed681f5b0 ip4-input and ip4-input-no-checksum should be siblings
each edge/arc from these nodes must be the same.

Change-Id: Id5dace61bca0af71ad1df98583425226e81fd0de
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
(cherry picked from commit 8a03e4f97952d84e152f5b17d5325583604c4fd3)
2018-07-19 15:50:28 +00:00
Mohsin Kazmi
d61105656b gbp: Add support for ACL
Change-Id: I7513c41307e62068ab5d9739cac393675c6066f8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 22b3b846822df2701bb6cb508fa4e023526e5717)
2018-07-19 07:51:39 +00:00
Eyal Bari
692250bedf qos mark/record: fix disable-sw_if_index range check
Change-Id: I2abb3ceebae3a32cee9aa2a999bd47c37719d3ac
Signed-off-by: Eyal Bari <ebari@cisco.com>
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
(cherry picked from commit 07f3586c5a9868ccee381af528de39b373d7720a)
2018-07-18 21:17:58 +00:00
Eyal Bari
e4b49c738b loopback:fix delete to check interface class
Change-Id: Ia563b279e85b5da93f79db5a2a4d9b8c04f5be99
Signed-off-by: Eyal Bari <ebari@cisco.com>
(cherry picked from commit b52c034c7d53014e9d5c1dfc3501e9adfb0c6391)
2018-07-18 04:50:38 +00:00
Neale Ranns
ee8b973de9 VOM: support for pipes
Change-Id: I5c381dfe2f926f94a34ee8ed8f1b9ec6038d5fe2
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
(cherry picked from commit 208c29aac523231af2420a95ba7e5d361698780b)
2018-07-18 04:48:34 +00:00
Hongjun Ni
b4b2488202 VPP crash when run "lb set interface nat4 in <intc>" VPP-1343
Change-Id: I23be9c29227e7dd1bb11b5b7fa910bb61c2be6c9
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
2018-07-18 00:17:44 +08:00
Ed Warnicke
e400a6d1a5
Update .gitreview for stable/1807
Change-Id: I6e405e9d729990bb57aaaa4aab01a1d4f54f4ee4
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
v18.07-rc1
2018-07-16 12:11:28 -05:00
Dave Barach
635ec3bdd0 VPP-1341: fix loopback interface graph arcs
Remove broken special case from l2_input.c:set_int_l2_mode(), which
turns out to confuse the graph dispatch engine.

The loopback TX function needs to push packets to either
ethernet-input or to l2-input, based on bridge / BVI
configuration. Rather than overloading a single graph arc - and making
vain attempts to reconfigure it - create both arcs and use the correct
one.

Rewrote the loopback tx function as an idosyncratic multi-arch
quad/single loop fn.

Change-Id: I15b56ce641d90a11e7b3c7d23859f40e168dd7b2
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-15 08:51:15 +00:00
John Lo
0e6f4d6af4 Improve IP4 ARP and IP6 ND Events Notification
For L2 ARP termination, use both brodcast ARP request and reply
packets to provide MAC/IP binding events.

For IP4/IP6 neighbor adress resolution, send resolution events
if there is an address resolution attemp with a static neighbor
entry where both IP and MAC matches. This allow probe of an IP
neighbor with a static entry to confirm it is responding with
a reply matching that of the static entry.

Change-Id: Iffb923bb5aea3f9021436735d5ca06e7b24f966f
Signed-off-by: John Lo <loj@cisco.com>
v18.10-rc0
2018-07-14 15:47:08 +00:00
Igor Mikhailov (imichail)
29b32c2ae3 Add QEDE poll mode driver (librte_pmd_qede)
The driver implements Cavium QLogic FastLinQ QL4xxxx 10G/25G/40G/50G/100G
Intelligent Ethernet Adapters (IEA) and Converged Network Adapters (CNA)
(doc/guides/nics/qede.rst)

Change-Id: If17e8cb572eb8c0585085be1c7cfdfa159eb6e68
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2018-07-13 16:59:09 -07:00
Francois Clad
b02f3b7b8a srv6-as: Adding support for L2 traffic
Change-Id: I72978c5957cb1acf154c9de7ad153092bac37785
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-07-13 19:19:27 +00:00
Francois Clad
0928da903f srv6-as: Adding test cases
Change-Id: I597a88d255c2f7cff552b1fa12ed4a7c4579b91c
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-07-13 19:19:27 +00:00
Damjan Marion
18c458ebcf vppinfra: add missing header file to install list
Change-Id: I1f82c40f9f927296d5d439b0db70a70ef803cf3c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-07-13 18:54:27 +00:00
Dave Barach
9779197f02 Improve the "show version" command
Add "show version cmdline" to display the command line
Add doxygen tags to the source code

Change-Id: I0205b373062fd88f176d9c8086d89d7784a5172f
Signed-off-by: Dave Barach <dave@barachs.net>
2018-07-13 17:58:59 +00:00