6344 Commits

Author SHA1 Message Date
Steven Luong
82c5dda455 lacp: passive mode support [VPP-1551]
By definition, passive mode means the node does not start sending lacp pdu until
it first hears from the partner or remote.

- Rename ptx machine's BEGIN state to NO_PERIODIC state.
- Put periodic machine in NO_PERIDOIC state when the interface is enabled for
lacp. ptx machine will transition out of NO_PERIODIC state when the local node
hears from the remote or when the local node is configured for active mode.
- Also add send and receive statistics for debugging.

Change-Id: I747953b9595ed31328b2f4f3e7a8d15d01e04d7f
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-04-03 16:32:37 +00:00
Neale Ranns
5ae793ac4e IPSEC: correctly size per-thread data
Change-Id: Idfc05cd0e09b50a26eaf747b7c49f720b009159a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-03 15:12:19 +00:00
Mohsin Kazmi
09a3bc50b5 virtio: Add support for multiqueue
Change-Id: Id71ffa77e977651f219ac09d1feef334851209e1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-03 14:42:37 +00:00
Mohsin Kazmi
692f9b1205 pci: Fix the crash on deleting the pci device
clib_file_index is 0 if it is not initialized result in
following assertion on deleteing the pci device.

vpp/src/vppinfra/file.h:122 (clib_file_del_by_index) assertion `! pool_is_free (um->file_pool, _e)' fails

This patch fixes the issue by initializing the clib_file_index to -1.

Change-Id: I51d23f18e7ccf3143a4765d05aafc1363a007737
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-04-03 14:42:37 +00:00
Benoît Ganne
211ef2eb24 rdma: tx: fix stats and add batching
Tx stats are no longer counted twice.
Submit tx packets as a single batch per vector instead of per-packet

Change-Id: I26820b21f23842b3a67ace0b939095f3550d3856
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-04-03 14:41:12 +00:00
Neale Ranns
b294f1099e IPSEC: show CLI improvements
Change-Id: I48a4b0a16f71cbab04dd0955d3ec4001074b57ed
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-03 14:40:52 +00:00
Neale Ranns
2b600184f3 GBP: iVXLAN reflection check
packets should not egress on an iVXLAN tunnel if they
arrived on one.

Change-Id: I9adca30252364b4878f99e254aebc73b70a5d4d6
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-03 13:48:19 +00:00
Aloys Augustin
7cae003a68 QUIC: Build system update
Download a single tarball with the sources of quicly and its dependencies from github instead of cloning submodules.

Change-Id: Id9955565d46f595b3a14ba3408c24045d4acd296
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-04-03 13:27:31 +00:00
Florin Coras
02ad5bc0a8 session: allow more fifos in preallocated segments
Change-Id: I335c092a8965c5dbec58603e9f5063dc8e3fc3ed
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-03 08:19:53 +00:00
Florin Coras
509028ab5d session: fix cli for sessions in created state
Change-Id: Ie154afdc20000b905ff71e39823154db4d23eea4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-03 08:19:34 +00:00
Florin Coras
6575a9a5ac session: do not enable pre-input node with 0 workers
Change-Id: I5c9e27b664ff1a8a74a6c1388f98af63571db7a5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-03 02:10:04 +00:00
Neale Ranns
fe269f3c6f stat-segment: scaling improvement
don't walk the entire list of entries each time a new one is added

approximate/indicative numbers recorded on a VM:
after:
  50000 tunnels in 1.124443 secs, 44466.45 tunnels/sec
before:
  50000 tunnels in 5.202779 secs, 9610.25 tunnels/sec

Change-Id: Ie1155416be76f55f2a0a88360ce53e15aeace785
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-02 21:15:29 +00:00
Florin Coras
096f2f83f6 session: remove session logic from io rx evt sender
Change-Id: I54fff6986ea6455aff25e0cf1b83117860859e10
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-02 21:13:07 +00:00
Florin Coras
69b68ef1a9 session: use app cb function wrappers
Change-Id: I77ad9eb4d4c7699397aa4be6a973ef37c60db4c5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-02 21:12:56 +00:00
Damjan Marion
f6adf1f8db vppinfra: add u32x4 min / max sse4.2 inlines
Change-Id: I38e0be777199654ece286fdd1a42931ed99bbe8a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-04-02 19:07:02 +02:00
Florin Coras
f65074e4df tcp: improve rcv process ack processing
- Avoid doing cc in closing states.
- Rest connections closed with unread data

Change-Id: I97d46b0459f03ea5439eeb0f233b6c17d3e06dfd
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-02 16:48:39 +00:00
Filip Tehlar
c6c4394dbd lisp: use crypto lib instead of openssl directly
Change-Id: I9667ed16939dede55b24959045737742d1c7c449
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-04-02 15:55:24 +00:00
Neale Ranns
f05e732e4a IPSEC-GRE; tests
failing test disabled on ARM

Change-Id: I6b7535cd8f51fdaf9786ba77f9f61a7d8d049bbd
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-02 14:10:28 +00:00
Neale Ranns
2b5ba9501c IPSEC: tunnel scaling - don't stack the inbould SA
Change-Id: I0b47590400aebea09aa1b27de753be638e1ba870
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-02 14:10:10 +00:00
Neale Ranns
ea5bb7761d IPSEC: remove pointless feature ordering
Change-Id: Ic1b657794d23cb4d1664fc749ad2468339e376df
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-04-02 05:43:34 -07:00
Matthew Smith
72491e2a17 dpdk: fix build error when mlx support enabled
When building with environment variables set to enable mlx PMD
support in DPDK, an error occurs:

CMake Error at plugins/dpdk/CMakeLists.txt:104 (vpp_plugin_find_library):
  vpp_plugin_find_library Macro invoked with incorrect arguments for macro
  named: vpp_plugin_find_library

Update a call to vpp_plugin_find_library() to include the right
number of parameters.

Change-Id: Ia0d66f93c6f94fdf822e2c3c4fe3f0ad01a90d57
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-04-02 06:55:11 +00:00
Andrew Yourtchenko
d1a12ef820 vppinfra: fix sparse_vec_index() returning non-zero index for some nonexistent elements
If we are testing for an index whose membership bitmask happens to sit in LSB of uword,
and there is nothing else set in that uword in the member bitmask, the shortcut path
returning the valid index is taken even if the element with a given index doesn't
exist in the sparse vector. This happens because the count of leading zeroes on the
value of 0 is zero, which is equal to the value taken modulo bitsize uword.

Take care of that case.

Also add unittests showing the problem and verifying that sparse_vec_index2 does not
have the same issue.

Change-Id: I19117e13817c3e5de579b9250bb741de42491985
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-04-02 06:54:43 +00:00
Chenmin Sun
a4b10e5e86 dpdk 19.02: fixed speed capability error issue
Device speed capability should be specified based on different phy types
instead of a fixed value, this patch fix the issue.

Change-Id: Ia76231aefbcb0fe8370867b6e86a0d3bb9e169a0
Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
2019-04-02 02:01:31 +00:00
John Lo
f545caada9 Enhance vlib_buffer_clone to change headroom space for packet
Add function vlib_buffer_clone_at_offset() so that the cloned
packets' 1st buffer will have the original packet header copied
at the specified offset (instead of current_data). This can be
used to increase headroom in the cloned packet to allow large
header encaps in case the stdandard 128B predata is not enough.
The original vlib_buffer_clone() still works the same as before.

Change-Id: I3b50c8ad7e3952568bc141710567c99a3dacddce
Signed-off-by: John Lo <loj@cisco.com>
2019-04-01 11:30:07 -04:00
Dave Barach
ac3b113957 VPP-1576: fix a class of spurious warnings
Change-Id: I52198e97397bb6f3b5c0c30c44aac34c17650d4d
Signed-off-by: Dave Barach <dave@barachs.net>
2019-03-30 18:14:44 +00:00
Damjan Marion
65ec33bd00 vppinfra: add few more cpuid flags
Change-Id: Ic2a61c45face18b6dd23d5509d75367d3b2441e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-30 12:57:02 +01:00
Igor Mikhailov (imichail)
2d6fc6b082 SPAN: Add pending frame on current thread, not on main
Previously, all frames were put for next node on the main thread,
even if the execution was happening on a worker thread.

Also, refactor to use API function vnet_get_main()

Change-Id: Ibefb1b3871563a78aa30352a37b9216537e15bf7
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
2019-03-29 19:25:15 -07:00
Dave Barach
19e540f73e Convince Coverity that s = format (0, ...) is OK
Change-Id: Ia88c7228a46e251b8a7815240da6ddbbcde08bc7
Signed-off-by: Dave Barach <dave@barachs.net>
2019-03-29 19:47:30 -04:00
Dave Barach
26dc58bfa7 Minor bug fixes
Drop the session reader lock across vlib_process_suspend(...) calls.
Fix the debug CLI command.

Change-Id: Ic0266dda1fdfa90971f2cb935248941317c01205
Signed-off-by: Dave Barach <dave@barachs.net>
2019-03-29 22:42:39 +00:00
Damjan Marion
d93638e128 revert quicly related build/external changes
We dont't want git pull there, there is simple way to grab tarball
from github for every single commit

Change-Id: I7a98cab7660750e48084279d8b9892cdf229bceb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-29 21:23:30 +01:00
Neale Ranns
e524d45eff IPSEC-GRE: fixes and API update to common types.
Change-Id: Icdcbac7453baa837a9c0c4a2401dff4a6aa6cba0
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-29 19:57:39 +00:00
Paul Vinciguerra
95c0ca42f2 tests: test/vpp_l2.py fix missing name.
test/vpp_l2.py:213:26: F821 undefined name 'L2_VTR_OP'
        self.itf.set_vtr(L2_VTR_OP.L2_DISABLED)

Move L2_VTR_OP enum to vpp_sub_interface.py where the VTR code is found.

Change-Id: I9eb9a3a2c679813c221ce1d0c4fa8aac6076c443
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-29 19:33:33 +00:00
Florin Coras
63d3ac6789 vls: add pthread check on vls_attr
Change-Id: I455d108dfe52d45d040167fecb37b33e9d630c3c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-29 17:43:36 +00:00
Paul Vinciguerra
3593a9174a tests: refactor vpp_object.py
Move __str__ to super for all subclasses of VppObject
Implement __repr__ in VppObject
Implement __hash__ and __eq__

Change-Id: Ibd4ea37b84b17f499ab86630fb5b9ed9c8b4b1c2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-29 16:02:27 +00:00
Nathan Skrzypczak
60f3e6547a Integrate first QUIC protocol implementation
Currently supports on single stream exposed through standard internal APIs
Based on libquicly & picotls by h2o

Change-Id: I7bc1ec0e399d1fb02bfd1da91aa7410076d08d14
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-03-29 15:57:30 +00:00
Neale Ranns
db4cae5d43 VOM: recurive route update fix
Change-Id: Iff61904804d8218c4e02897521368f696002343d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-29 15:17:11 +00:00
Neale Ranns
d2a4194dc7 BVI: coverity error fix
Change-Id: Idc1e1747035638777240b7ea9afcf675b22be7f1
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-29 13:53:12 +00:00
Dave Barach
efd0d29353 Update MAINTAINERS
Change-Id: I1b041edb6f20a9f9c867fb243922985398485054
Signed-off-by: Dave Barach <dave@barachs.net>
2019-03-29 08:17:49 -04:00
Damjan Marion
b4fff3a397 ipsec: esp-decrypt rework
Change-Id: Icf83c876d0880d1872b84e0a3d34be654b76149f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-29 12:04:35 +00:00
Neale Ranns
d7603d97e0 IPSEC: tunnel fragmentation
Change-Id: I63741a22bc82f5f861e1c0f26a93b5569cc52061
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-29 11:10:33 +00:00
Florin Coras
74b7437bd1 tcp: remove sent rcv wnd 0 flag
Change-Id: If6c672d1caa8884eb5d819311606a79a3de81200
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-29 09:31:48 +00:00
Matthew Smith
d4bdd93f07 dhcp: only register UDP ports that are needed
When configuring a DHCP client, both the UDP ports for DHCP client
and server are registered. Packets to the server port end up being
dropped unless you have also configured a DHCP proxy.

This breaks a common home/office gateway use case where the WAN
interface gets configured using a DHCP client and devices attached
to a LAN interface attempt to configure themselves using DHCP. If
you try to punt to an external DHCP daemon to handle the LAN client
requests, the packets never make it to the external daemon because
of the server port being registered.

Modify dhcp_maybe_register_udp_ports() to accept a parameter that
controls which ports get registered. For a DHCP client, only the
client port is registered. For a DHCP proxy, both client and server
ports are registered.

Change-Id: I2182d9827e4c7424b03ebb94952c3d2dc37abdb6
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-03-29 08:19:25 +00:00
Florin Coras
f20fd1ac90 tcp: improve updating of rcv wnd
Change-Id: I0b8a311979d3ccd15f3854e7ac44ca9951dc6ce4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-29 07:56:26 +00:00
Damjan Marion
96d4e53363 rdma: add option to specify inteface name
Change-Id: Ic6244511b88bdd42756f74e3163a70b8014e8547
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-29 00:23:57 +00:00
Damjan Marion
a03d182383 crypto: add vnet_crypto_op_init (...)
Change-Id: I2018d8367bb010e1ab30d9c7c23d9501fc38a2e5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-28 23:29:22 +00:00
Damjan Marion
1e3aa5e213 ipsec: USE_EXTENDED_SEQ_NUM -> USE_ESN
Change-Id: Ib828ea5106f3ae280e4ce233f2462dee363580b7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-28 22:23:08 +00:00
Damjan Marion
9fd24793a4 cmake: add vpp_plugin_find_library macro
Change-Id: I0b996460e05c40e74766563fb2a94c62a65063ce
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-28 20:59:04 +00:00
Neale Ranns
76b5649d07 Punt Infra
A punt/exception path that provides:
 1) clients that use the infra
 2) clients can create punt reasons
 3) clients can register to recieve packets that are punted
    for a given reason to be sent to the desired node.
 4) nodes which punt packets fill in the {reason,protocol} of the
    buffere (in the meta-data) and send to the new node "punt-dispatch"
 5) punt-dispatch sends packets to the registered nodes or drops

Change-Id: Ia4f144337f1387cbe585b4f375d0842aefffcde5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-03-28 20:51:32 +00:00
Damjan Marion
1f4e1cbf57 ipsec: anti-replay code cleanup
Change-Id: Ib73352d6be26d639a7f9d47ca0570a1248bff04a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-28 19:59:04 +00:00
Florin Coras
b38ee66425 session: remove unused tx context field
Change-Id: I4a119937842eb188f5e5a7706cbe70e91ae4def8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-28 19:32:16 +00:00