Commit Graph

3392 Commits

Author SHA1 Message Date
Damjan Marion
9b554f31d7 fix issue with missing sample_main in sample plugin
Change-Id: Ia17511e3997cdcf1d0991e62e8e2d3fb8812d133
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-05 01:59:04 +00:00
Dave Wallace
540b31ac8f Release 18.01.2: update jvpp version
Change-Id: I46229d50de4f8892551041be7fee2bba5581da63
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
v18.01.2
2018-05-17 14:47:21 -04:00
Ed Kern
7ea3975d1f Makefile: 1801 only change to revert its clang version
Base build image now uses clang 5 as default but this new version
throws errors that the older 3.8 did not.

Change-Id: I938ffc4464bf45dd52bc3ca4270db52e21865fc6
Signed-off-by: Ed Kern <ejk@cisco.com>
2018-05-17 17:34:03 +00:00
Dave Wallace
e6b21b1127 18.01.2 Release Notes
Change-Id: I7f5704d023009a5226ca2b08a0be975ae0cf4884
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-05-16 13:17:24 -04:00
Steven
ca33d08caf tapv2: Sporadic SIGABRT in ethernet_input [VPP-1183]
virtio_free_rx_buffers uses the wrong slot in the vring to get
the buffer index. It uses desc_next. It should be last_used_idx
which is the slot number for the first valid descriptor.

Change-Id: I6b62b794f06869fbffffce45430b8b2e37b1266c
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 074f698be5)
2018-03-31 14:38:12 +00:00
Marco Varlese
213831192d 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>
(cherry picked from commit 3f6ede3ab3)
2018-03-28 08:20:29 +00:00
Matus Fabian
ae33579bef NAT44: fix nat44_user_session_dump and nat44_del_session crash with one worker (VPP-1213)
Change-Id: I8e0c7ed2ff462b9ab59c233f56be262ec03c29ff
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-28 07:05:12 +00:00
Matus Fabian
dd2f9865c1 NAT44: interface output feature and dst NAT (VPP-1200)
Do not translate packet which go out via nat44-in2out-output and was tranlated
in nat44-out2in before. On way back forward packet to nat44-in2out node.

Change-Id: I934d69856f0178c86ff879bc691c9e074b8485c8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit 4d023c8c93)
2018-03-26 22:27:54 -07:00
Matus Fabian
ef25e1d0da 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: I0e3733361de4b85068b9be02f953154a478ce8cc
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-26 04:53:47 -07:00
Lee Roberts
828244c44f Assign correct NUMA node for DPDK crypto QAT devices (VPP-1210)
DPDK rte_cryptodev_socket_id() is returning zero for QAT devices.
Apply DPDK patch where correct NUMA node can be obtained with pci_dev->device.numa_node.

Change-Id: Ifaf35c7ac292627ea7cfb44a35b1e1c617811e80
Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
2018-03-26 11:23:58 +00:00
Lee Roberts
1b8e8252b0 Correct address calculation for VPP-1168
Use (u64) cast to ensure proper address calculations.

Change-Id: Ifbbe66072eb94bfe33ac04eaa4416abceeb7245e
Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
2018-03-26 11:23:26 +00:00
Matthew Smith
487f5474fe User session counters stay <= per-user limit
When a user session is allocated/reused, only increase
one of the session counters for that user if the counters
are below the per-user limit.

THis addresses a SEGV that arises after the following
sequence of events:

- an outside interface IP address is put in a pool
- a user exceeds the number of per-user translations by
an amount greater than the number of per-user translations
(nsessions + nstaticsessions > 100 + 100)
- the outside interface IP address is deleted and then added
again (observed when using DHCP client, likely happens if
address changed via CLI, API also)
- the user sends more packets that should be translated

When nsessions is > the per-user limit,
nat_session_alloc_or_recycle() reclaims the oldest existing
user session. When an outside address is deleted, the
corresponding user sessions are deleted. If the counters were
far above the per-user limit, the deletions wouldn't result
in the counters dropping back below the limit. So no session
could be reclaimed -> SEGV.

Change-Id: I940bafba0fd5385a563e2ce87534688eb9469f12
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-03-26 11:22:57 +00:00
Marco Varlese
e545457796 IPSEC_AH: broken initialization (VPP-1208)
The init-path for IPSEC_AH where the CTX gets initialized is broken
since the for-loop never executes due to the wrong usage of
tm->n_vlib_mains which being subtracted by 1.

Change-Id: I4d967f52cd3ca061aa60d824d65f446e06162403
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
(cherry picked from commit 4631610a20)
2018-03-26 06:04:56 +00:00
Matus Fabian
ae389bc4a1 NAT44: fix ICMP checksum update crash (VPP-1205)
Change-Id: I3e4bbfe205c86cb0839dd5c542f083dbe6bea881
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit 3f2dd30b0b)
2018-03-23 12:36:45 +00:00
Matus Fabian
cddbcdb666 NAT44: fix nat_not_translate_output_feature in dual loop (VPP-1194)
Change-Id: Icb858414145db0e5fef495e155903b3b935e50ba
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit 3c2a416c42)
2018-03-23 11:32:58 +00:00
Matus Fabian
265640ce76 NAT44: fix removal of LB static mappings with same local address and port pair (VPP-1199)
Change-Id: Iad8c626e83bbc58d5c85b6736f5a3dd5bc9ceafb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit e877d68407)
2018-03-23 10:49:54 +00:00
Dave Barach
f8fda2a98a VPP-1123: cherrypick to 18.01.02
Change-Id: Iaf959d7636907cec54d83b3f14244153fbf19fa2
Signed-off-by: Dave Barach <dbarach@cisco.com>
2018-03-21 17:10:36 +00:00
Matus Fabian
add7cb0ca7 Revert "NAT44: interface output feature and service host direct access (VPP-1176)"
This reverts commit d30c94afe4.

Change-Id: Ic076f6c116e1d816c492eb8e03e50cf95cedae77
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-21 09:09:03 -07:00
Matthew Smith
fb5148b4df 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>
(cherry picked from commit 03f942a1cc)
2018-03-14 18:47:11 +00:00
Matus Fabian
d30c94afe4 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>
(cherry picked from commit 204591d1bd)
2018-03-14 18:46:45 +00:00
Matus Fabian
341b469c4d NAT44: fix nat_not_translate_output_feature for ICMP (VPP-1191)
Change-Id: I1552e1418b704fdf1f1fa2c0174313b9b82a37a3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-14 18:45:50 +00:00
ahdj007
dadcc84913 when lb tcp in2out flow,
in2out and out2in protocol are not same

Change-Id: I4ce680ad1f088cb079e1f2aeb15ca59225fca0d1
Signed-off-by: ahdj007 <dong.juan1@zte.com.cn>
(cherry picked from commit 9691cf2d08)
2018-03-14 18:44:55 +00:00
ahdj007
648ae391b6 when exceed max reass,
frag packet can't get reass.

adding bihash,it can rewrite new hash value.
so need to delete hash after compare hash value.

Change-Id: I83b5c47890110e9a598b78cfbe8fcd27bbe291bb
Signed-off-by: ahdj007 <dong.juan1@zte.com.cn>
(cherry picked from commit 5e85c54d22)
2018-03-14 18:44:27 +00:00
Chaoyu Jin
651dc0c5eb At AF_PACKET socket create, do intf bind before rx ring cfg to avoid receiving pkts from other interfaces
Change-Id: Ie40ee9129edaac717e716b469f4d10f3c29a4932
Signed-off-by: Chaoyu Jin <chjin@cisco.com>
2018-03-14 10:42:44 -07:00
Matus Fabian
9449a8acba 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>
(cherry picked from commit e4e34c23fe)
2018-03-14 16:41:24 +00:00
ahdj007
308ed5c9e3 reass frag_n should to be inited to 0
Change-Id: I8a4a7a85e86acbfe411e6dfa22e3976d7d4c903b
Signed-off-by: ahdj007 <dong.juan1@zte.com.cn>
(cherry picked from commit 9f06d0eccf)
2018-03-09 13:14:17 +00:00
Chun Li
f70cd9bdc6 memif: fix crash caused by zero pkt len in memif and clear dirty cache while interface reconnect.
Change-Id: Ifc7eb2494a22c334d8899422545fca1a4bba4d05
Signed-off-by: Chun Li <chunl2@cisco.com>
2018-03-08 09:21:03 +00:00
Chaoyu Jin
156084b325 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>
2018-03-08 07:53:52 +00:00
Chun Li
91fa7d3387 ip4_forward: set pkt error in case potential memory corrupt
Change-Id: Ib9eb65d2ba166f5883a8ce8d37298c696113f2be
Signed-off-by: Chun Li <chunl2@cisco.com>
2018-03-08 07:53:41 +00:00
Chun Li
4298ab41db libmemif: cleanup queue info while memif connecting
Change-Id: I4265fd0606f87f80f43f7f59ced1c3a73de82776
Signed-off-by: Chun Li <chunl2@cisco.com>
2018-03-07 22:13:15 +01:00
Steven
a3daf77e4c 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>
(cherry picked from commit 0b8567331c)
2018-02-28 21:45:05 +00:00
Matus Fabian
ebbb56fad6 NAT: replace format_vnet_sw_interface_name with format_vnet_sw_if_index_name (VPP-1149)
Change-Id: I860468bdc21c6ee07f63c8854592c46ca631ebc2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-02-27 06:09:49 +00:00
Matus Fabian
4f4964fab4 NAT44: in2out output feature skip translation for already translated packets (VPP-1156)
Change-Id: I5395245c9e49f741a949ada1f725c34f9379c249
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit f7ad5cbe81)
2018-02-27 06:09:20 +00:00
Matus Fabian
e57f4480fb NAT44: fix ICMP error translation for endpoint dependent sessions (VPP-1150)
Change-Id: Iae15d15b470bdde759d08201de9d6dc5afef0ee9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-02-27 06:08:35 +00:00
Matus Fabian
38c16f87d9 NAT44: run NAT nodes after ACL (VPP-1160)
NAT input features run after acl-plugin-in-ip4-fa
NAT output features run after acl-plugin-out-ip4-fa

Change-Id: I1e4487a0d6fdb99a90b8db640d9ad0e0eb7347a5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit 16f0546cad)
2018-02-26 05:42:01 +00:00
Damjan Marion
eed6a2b22f virtio: add missing tx lock when running multithreaded
Change-Id: I373f429c53c6f66ad38322addcfaccddb7761392
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-25 11:56:46 +00:00
Damjan Marion
c17f55d31f virtio: reset vnet header on tx
Change-Id: Ib04a8787038fb536470a04d99fdc165102edfb5a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-02-24 18:59:38 +01:00
Matthew Smith
fdb47ad887 Fix DHCP client crash with worker threads
Crash occurring With a worker thread configured and dhcp
client active on an interface. When a DHCP reply packet
is received, call to ethernet_get_main() from
dhcp_proxy_to_client_input() was causing a crash.
Replaced with a call to vnet_get_ethernet_main().

Once that was resolved, calling dhcp_client_acquire_address()
from a worker thread also caused a crash. Changed so the main
thread will do the address/route configuration.

Change-Id: Ib23984787102dea8cf6cfcde86188a751f15c1e1
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-02-22 04:36:00 -08:00
Dave Barach
b704f49bb6 VPP-1169: reenable dhcp client detect when lease expires
We disable the client detect feature when we bind a DHCP address. Turn
it back on again when the lease expires.  Otherwise, if the DHCP
server replies after an outage, we'll never see the reply.

Add dhcp packet tx counters, by packet type

Change-Id: Id54b05647d5d7bd8d3ab99e6584ee86d9e4ff7f9
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 4941fcc23a)
2018-02-15 11:59:07 +00:00
Jan Gelety
f13bac295d Use CSIT release branch rls1801 in vpp stable/1801 branch
Change-Id: I6b00e7cd172709c1de4c700dbec29875bdc67fdb
Signed-off-by: Jan Gelety <jgelety@cisco.com>
v18.01.1
2018-02-08 01:15:56 +00:00
Igor Mikhailov (imichail)
67d7825149 Provide page-aligned length to ftruncate.
For some files such as hugepages files, ftruncate() fails with the error
"Invalid argument" if the 'length' parameter is not on a page boundary.

Change-Id: I42a9cde98707da15e3c5d1653046e2277fc7a424
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
(cherry picked from commit 7d25415a93)
2018-02-08 01:04:18 +00:00
Dave Wallace
0eacf49ffa Release 18.01.1 jvpp version update.
Change-Id: I000d842e969b838ad5fbcd18186ac7e1b39b4c46
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-06 21:00:15 -05:00
Dave Wallace
1247ece8d2 18.01.1 Release Notes
Change-Id: I2a6826a388cdd4c6b38f53f0e9bcb8b199714d29
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-05 17:32:27 -05:00
Matus Fabian
1c986cb3b8 NAT64: Run nat64-expire-worker-walk only when NAT64 is configured (VPP-1162)
Change-Id: Ic5e8d74bf5ac84cce5661de44778c89541c67636
Signed-off-by: Matus Fabian <matfabia@cisco.com>
(cherry picked from commit e71eb5922a)
2018-02-05 16:22:29 +00:00
John Lo
5e150a06a8 Improve tunnel interface creation performance
Modify interface creation to allow creation of tunnel interfaces
without dedicated per tunnel output and tx nodes which are not
used for most tunnel types. Also changed interface-output node
function vnet_per_buffer_interface_output() so it does not rely
on hw_if_index as the next node index which is not flexible nor
efficient for large scale tunnel interfaces.

The improvenemts are done for VXLAN, VXLAN-GPE, GENEVE and GTPU
tunnels. GRE tunnel is still using per tunnel output nodes which
will be changed in a separate patch with other GRE enhencements.

Change-Id: I4123c01c0d2ead814417a867adb8c8a407e4df55
Signed-off-by: John Lo <loj@cisco.com>
(cherry picked from commit e5453d0fa2)
2018-02-02 17:34:00 +00:00
Florin Coras
cba3675fab lisp-cp: fix handling of ndp without source link addr VPP-1159
Change-Id: Idddb60bbc7fcc701d39212f6422a6b2f6dc75221
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-30 23:53:02 -08:00
Steven
a7effa1b07 vlib: allocating buffers on thread-x and freeing them on thread-y causes
a crash on debug image (VPP-1151)

In debug image, there is extra code to validate the buffer when it is
freed. It uses the hash table to lookup the buffer index with spinlock
to prevent contention. However, there is one spinlock for each worker
thread. So allocating the buffer on thread-x and freeing the same buffer
on thread-y causes the validation to fail on thread-y. The fix is to
have only one spinlock, stored in vlib_global_main.

Change-Id: Ic383846cefe84a3e262255afcf82276742f0f62e
Signed-off-by: Steven <sluong@cisco.com>
2018-01-29 20:20:47 -08:00
Dave Wallace
92b15bcea4 Add link to 18.01 test framework documentation.
Change-Id: I030602391ea3b612ac9a6780399cc30b427cc3a5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-25 14:27:54 -05:00
Dave Wallace
a1a382bb2b Update 18.01 Release Notes
Change-Id: Id2f13c59c6f4e7bc79f6e77d6dab752bf6dfb06a
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-24 09:37:59 -05:00
Dave Wallace
9d21268d0a 18.01 Release Notes
Change-Id: I2493a6135aecb4e2eead20a71dcb9ca16834cd63
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
v18.01
2018-01-24 06:22:24 +00:00