Commit Graph

1990 Commits

Author SHA1 Message Date
ahdj007 28c2631c3c when deleting l3 static mapping with addr_only,
lb session with the same user maybe deleted.

Change-Id: Ie58579cf4f8babb594f3c44aa185720134c58c3d
Signed-off-by: ahdj007 <dong.juan1@zte.com.cn>
2018-04-10 10:35:15 +00:00
Radu Nicolau 5aaea1186e CSIT-895 dpdk/ipsec: add locks on session data hash updates
Change-Id: I6400b77de388c01e85209e5dc5f11ccafb79a459
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
2018-04-10 10:32:25 +00:00
Francois Clad 380e3daaaf srv6-ad: fixing cache size issue
Change-Id: Iaadfbc75832e37ae52511b25448da14116214fc1
Signed-off-by: Francois Clad <fclad@cisco.com>
2018-04-10 10:31:44 +00:00
Matthew Smith 537eeeca36 Make IPsec tunnel intf work with IPv4 output features
With no IPv4 output features on an IPsec tunnel inferface,
when packets are forwarded to that interface, they reach
the ipsec-if-output node via the output_node_index on the
hw interface and they are handled correctly.

When an IPv4 output feature (e.g. output ACL, outbound
NAT) is enabled on an IPsec tunnel interface, outbound
IPsec stops working for that interface. The last node in
the ip4-output feature arc is interface-output. From there
a packet is sent to ipsec<N>-output, and then ipsec<N>-tx.
The tx function for an IPsec tunnel interface that is
called by ipsec<N>-tx is a dummy that doesn't do anything
except write a warning message.

Enable a feature on the interface-output feature arc for
an IPsec tunnel interface so the ipsec-if-output node is
reached from the interface-output node.

Change-Id: Ia9c73d3932f5930ec7ce0791a0375b1d37148b01
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2018-04-10 10:30:11 +00:00
Damjan Marion 13adc3d48d features: don't break linked list, create separate one for arc
We need to keep original linked list so destructire can remove entries.

Change-Id: I5ff5ca0e1a417d88707255207725bba46433c943
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-09 21:09:21 +02:00
Neale Ranns 87dad11c87 L2: no-flood interface type in the Bridge-Domain
Change-Id: I50ff0cacf88182f8e0be19840c50f4954de586e2
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-04-09 17:34:09 +00:00
Damjan Marion 72d2c4f371 plugins: unload plugin if early init fails
Change-Id: I32f68e2ee8f5d32962acdefb0193583f71d342b3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-09 16:06:20 +00:00
Matus Fabian f13a878736 NAT44: don't add static mapping to resolution vector if failed (VPP-1225)
Change-Id: I71660eb327124179ff200763c4743cc81dc6e1c6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-04-09 14:09:40 +00:00
Damjan Marion 67d4c24b0a Autodetect plugin path
dpdk plugin self-disables if there are no hugepages available

Change-Id: Ib286e1a370deeb21248e6e961573ef9c68759b4c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
2018-04-09 13:33:06 +00:00
Neale Ranns 7bf3f9f70e DVR: save the rewrite length in packet meta-data for features
Change-Id: I0efd03bdb84bc9ff2334d398bfdb82486228114a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-04-09 13:32:12 +00:00
Neale Ranns 18075a0519 BIER coveroty fix for unintialised return value on error
Change-Id: I2b1d1035f810cb58356626cf081d46eb289265b4
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-07 21:06:06 +00:00
John Lo 9a719298c3 Change l2-fwd node to allow possible feature before UU-FLOOD
If l2-fwd node does not find an L2FIB entry for DMAC of packet,
use input feature bitmap to find next node instead of always
sending packet to l2-flood node to perform unknow unicast flood.
It provides possibilty of using other feature to forward unknow
unicast packet instead of flooding the BD.

Change-Id: I56b277050537678c92bd548d96d87cadc8d2e287
Signed-off-by: John Lo <loj@cisco.com>
2018-04-06 07:35:57 +00:00
Mohsin Kazmi 47cca9b0f2 VOM: Get vhost-user type from name
Adopt nova naming convention for vhost-user interfaces.

Change-Id: If70f0828106bf594eb11d4f0ed2898a35ec0af15
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-04-05 14:10:12 +00:00
Neale Ranns 79aafa142c IPIP: version.h is not needed
Change-Id: I78a4176f98c2b4630a57ac5ddb7faf58ba0c4ee1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-05 13:28:34 +00:00
Damjan Marion 4d72b17237 memif: bug fixes
Change-Id: Id775efb2e85d850e510d00f1b48bb711a3342397
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-05 12:32:25 +00:00
Mohsin Kazmi 1e583111eb VOM: Add sub_interface in specific routing table
Change-Id: I3700fc1d140e30da783e41762670618f0298c7db
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-04-05 09:46:04 +00:00
Jon Loeliger 16aa7f83c7 DSLite: Implement new API call DSLITE_ADDRESS_DUMP.
Change-Id: I92ca28d3007f7ea43cd3e8b20659e400dfa6c75c
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-04-05 06:47:48 +00:00
Chris Luke 7c6df39b50 Bump package version
Change-Id: I81d870ab9fc0b1f0e1b777d56ca7870ff99c7c2c
Signed-off-by: Chris Luke <chrisy@flirble.org>
2018-04-04 16:41:56 -04:00
Chris Luke 546ad855a6 Doc updates prior to branch
Change-Id: Ibcffee7d20dbb79720199bcd82d2353f39d5544f
Signed-off-by: Chris Luke <chrisy@flirble.org>
2018-04-04 14:13:50 -04:00
Damjan Marion cef1db9c13 memif: zero copy slave
Change-Id: I65306fb1f8e39221dd1d8c00737a7fb1c0129ba8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-04-04 16:52:15 +02:00
Neale Ranns 871dc4287d Detailed stats collection feature
Use device-input and interface-output feautre arcs to collect unicast, multicast
and broadcast states for RX and TX resp. Since these feature arcs are present only
for 'physical' interfaces (i.e. not su-interfaces) counter collection is supported
only on parent interface types.

Change-Id: I915c235e336b0fc3a3c3de918f95dd674e4e0e4e
Signed-off-by: Neale Ranns <nranns@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-04-04 13:40:39 +00:00
Neale Ranns 6df19030f2 NAT added FIB entries have a preference lower than API/CLI
Change-Id: Ia99490180683e8649784f7d9d18c509c3ca78438
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-04-04 13:31:56 +00:00
Matus Fabian 36a62702c5 NAT44: prohibit multiple static mappings for a single local address (VPP-1224)
Change-Id: I32b30210c2f1aec10a1b614d04f427662326a3d2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-04-04 13:05:05 +00:00
Matus Fabian 4772e7ad53 NAT44: fix static mapping for DHCP addressed interface deleting (VPP-1223)
Change-Id: Ifb4d23059b7989c32a52eaf0c25c275b35e83010
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-04-04 00:38:43 -07:00
Eyal Bari eb4f74a54f dpdk:fix checksum handling of l2 interfaces
dpdk-input was dropping packets with bad ip-checksum on l2 interfaces

Change-Id: Ife5b52766bb71e878b1da6e94ae7b8a1e59fc478
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-04-04 07:02:43 +00:00
Klement Sekera 3ecc221162 reassembly: bug fixes
This change fixes a bug which would corrupt features infra by making
feature infra resistant to double-removal. It also fixes 'out of memory'
issue by properly initializing the bihash tables.

Change-Id: I78ac03139234a9a0e0b48e7bdfac1c38a0069e82
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-04-03 19:56:37 +00:00
Florin Coras a46b4c9b5e session: use fib index in ip local test
Change-Id: I148cb40c8bea55dabe54fa6a662d46862e571640
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-04-03 19:34:03 +00:00
Steven 074f698be5 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>
2018-03-30 22:26:40 -07:00
Andrew Yourtchenko 17ddc0fee1 acl-plugin: implement an optional session reclassification when ACL is (re-)applied
There were several discussions in which users would expect the sessions to be deleted
if the new policy after the change does not permit them.
There is no right or wrong answer to this question - it is a policy decision.

This patch implements an idea to approach this. It uses a per-interface-per-direction counter to designate
a "policy epoch" - a period of unchanging rulesets. The moment one removes or adds an ACL applied to
an interface, this counter increments.
The newly created connections inherit the current policy epoch in a given direction.
Likewise, this counter increments if anyone updates an ACL applied to an interface.

There is also a new (so far hidden) CLI "set acl-plugin reclassify-sessions [0|1]"
(with default being 0) which allows to enable the checking of the existing sessions
against the current policy epoch in a given direction.

The session is not verified unless there is traffic hitting that session
 *in the direction of the policy creation* - if the epoch has changed,
the session is deleted and within the same processing cycle is evaluated
against the ACL rule base and recreated - thus, it should allow traffic-driven
session state refresh without affecting the connectivity for the existing sessions.

If the packet is coming in the direction opposite to which the session was initially
created, the state adjustment is never done, because doing so generically
is not really possible without diving too deep into the special cases,
which may or may not work.

Change-Id: I9e90426492d4bd474b5e89ea8dfb75a7c9de2646
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-03-30 20:48:01 +00:00
Maciek Konstantynowicz 6091d230e3 Updated sample startup.conf with supported plugin config options.
Change-Id: Id2884a4c2208b4382fce56019b11e4b7fdc4275b
Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
2018-03-30 20:47:32 +00:00
Chris Luke 76981eedcd Add missing stdint.h
Coverity has started whining about uint32_t missing in this .h

Change-Id: I57992121c0593d6a0ada35917802d0300cf91259
Signed-off-by: Chris Luke <chrisy@flirble.org>
2018-03-30 20:45:36 +00:00
Steven dd4889e21c lacp: faster convergence for slow-rate config option
Do fast-rate if we are not yet synchronized with the partner.

Stop sending LACP updates as a flash in the worker thread. Just expire the
timer and let the lacp_process handle sending LACP PDU.

Change-Id: I8b36fe74e752e7f45bd4a8d70512c0341cc197a1
Signed-off-by: Steven <sluong@cisco.com>
2018-03-30 20:44:56 +00:00
Steven 70488ab7f8 bond: show trace causes a crash if the interface is deleted
For the debug image, if the interface is removed and the trace was
collected prior to the interface delete, show trace may cause a crash.
This is because vnet_get_sw_interface_name and vnet_get_sup_hw_interface
are not safe if the interface is deleted.

The fix is to use format_vnet_sw_if_index_name if all we need is to
get the interface name in the trace to display. It would show "DELETED"
which is better than a crash.

Change-Id: I912402d3e71592ece9f49d36c8a6b7af97f3b69e
Signed-off-by: Steven <sluong@cisco.com>
2018-03-30 20:43:49 +00:00
Steve Shin c1613a72a7 dpdk: fix crash due to incorrect xd->flags value with slave's link toggling
xd->flags is set incorrectly when a slave link is down in bonded interface mode.
This can result in VPP crash when data traffic flows to the interface.

Change-Id: Ideb9f5231db1211e8452c52fde646d681310c951
Signed-off-by: Steve Shin <jonshin@cisco.com>
2018-03-30 13:33:40 +00:00
Chris Luke 30684ac044 Coverity fixes (VPP-1204)
Minor bug fixes

CID 183000: double close
CID 180996: dead code
CID 180995: NULL deref
CID 181957: NULL deref
CID 182676: NULL deref
CID 182675: NULL deref

Change-Id: Id35e391c95fafb8cd771984ee8a1a6e597056d37
Signed-off-by: Chris Luke <chrisy@flirble.org>
2018-03-29 15:23:56 -07:00
Florin Coras f3a3bad800 ip6: fix ip6-local urpf checking
Use sw_if_index[VLIB_TX] if set as fib index when doing the urpf check.

Change-Id: I5ec3e7f7a54c6782704d91e9a5614fd0f7f9e3de
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-29 19:26:49 +00:00
Eyal Bari 109139eed6 l2_input:optimize counter access
only one counter update per frame (was updated per iteration)
only access ethertype for casts (was always accessing ethertype)

Change-Id: I3a3c3219ec63e975cf5bd8cf2d93103932a4aaa3
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-03-29 15:14:48 +00:00
Florin Coras 56b39f6a9e tcp: fix fib index buffer tagging
Change-Id: I373cc252df3621d44879b8eca70aed17d7752a2a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-03-29 11:23:58 +00:00
Dave Barach cc5677b496 No need for this routine to be global
Causes subtle misbehavior elsewhere

Change-Id: I3a0ade26e8e03b8c5dc8e722f6a01fb99ec7a1e0
Signed-off-by: Dave Barach <dave@barachs.net>
2018-03-29 08:10:53 +00:00
Mohsin Kazmi 691abf6f33 vom: Fix the error handling for already existing itf
Change-Id: I5695d51dd4f6daff472877fe1cce3ddcb924b187
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-28 17:25:23 +02:00
Steven b3caf55730 bond: cli rename
rename "enslave interface <slave> to <BondEthernetx>" to
"bond add <BondEthernetx> <slave>

"detach interface <slave>" to
"bond del <slave>"

Change-Id: I1bf8f017517b1f8a823127c7efedd3766e45cd5b
Signed-off-by: Steven <sluong@cisco.com>
2018-03-28 13:40:27 +00:00
Marco Varlese e17bb715cf SCTP: use custom fib
Following TCP fixes from Florin (11430), this patch follows the same
approach to indicate a fib (not just using the default one).

Change-Id: Ib883aa0e9a1c6157acfea69c44426ba07d6c932a
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-03-28 13:40:04 +00:00
Matus Fabian ea2600ae6a NAT44: make 1:1NAT for DHCP addressed interface persistent
Static mapping is not deleted from resolution vector after address is set on
interface.

Change-Id: Ib7c45ca2e307123d101248c5a1b17d130ac32cd0
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-28 04:20:21 -07:00
Damjan Marion d4ac4bb266 avf: keep input node in disabled state unless needed
Change-Id: I9a0105aa2373bd4db218851b1bbee50c6b6dfc7d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-28 08:09:02 +00:00
Matus Fabian 4888b50bb4 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:24 +00:00
Eyal Bari aa0180b9e0 vxlan:refactor add del command function
Change-Id: I33ba5a011100baf1c786f9a63a0cf3d2e1020493
Signed-off-by: Eyal Bari <ebari@cisco.com>
2018-03-27 20:48:29 +00:00
Damjan Marion 2d207bcde2 vlib: gcc-7 -O3 uninitialized values
Change-Id: I59b4142daab439d60a1ebd48b2c1366df0160288
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-27 20:15:54 +00:00
Damjan Marion be3f4d5a30 vlib: make cloned structures cacheline aligned
This address crash with gcc-7 observed when -o3 is used.

Change-Id: I10e87da8e5037ad480eba7fb0aaa9a657d3bf48d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-27 21:06:21 +02:00
Andrew Yourtchenko 82f2e6e50d acl-plugin: autosize the ACL plugin heap and fix the heap size types and parsing
- autosize the ACL plugin heap size based on the number of workers
- for manual heap size setting, use the proper types (uword),
  and proper format/unformat functions (unformat_memory_size)

Change-Id: I7c46134e949862a0abc9087d7232402fc5a95ad8
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-03-27 17:43:37 +00:00
Neale Ranns f756401ddd VOM: Fix connection state
Change-Id: I4851b2245f81bcf3cf5f40909c4d158a51af7068
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-03-27 09:19:04 -07:00