Commit Graph

6787 Commits

Author SHA1 Message Date
Steven Luong b98dbb1f2f lacp: convert clib_warning to event logger
Replace clib_warning with event logger. The messages for the latter are
stored in the event buffers which can be viewed with debug CLI anytime.

Type: fix

Change-Id: I5ede4d1f1f9f0ab8d66394f49383fc1838d397ae
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-06-22 12:57:41 +00:00
Neale Ranns dd7736b515 misc: update maintainers to include VOM
Type: feature

Change-Id: I324127934f1a129c23f232940b991fd1455891c8
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-21 08:03:30 -07:00
Lijian.Zhang 107aa83630 vppinfra: add u64x2_gather/u32x4_gather
Add u64x2_gather/u32x4_gather in vector_neon.h. u64x2_gather/u32x4_gather
gathers data from scattered memory locations to a SIMD register.

Type: feature

Change-Id: I1dd27e38af28b9bed85143014c86197ee549fede
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
2019-06-21 11:27:33 +08:00
Florin Coras 07beadedea tcp: add option to pass opaque to next node
Type:feature

Change-Id: I0b72954a6ae6a05abe0761cb4f227072863f127b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-21 00:57:08 +00:00
Ole Troan 2a688c0120 vppapigen: allow negative number in NUM token
Change-Id: I964cb44f8604187390009dcef7dd766b3804c3ca
Type: make
Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-20 22:09:12 +00:00
Andrew Yourtchenko 4f740c8f00 interface: fix the incorrect sizes/offsets in the tso segmentation
The copying of the first segment copied too small amount of data.
The copying of the second and subsequent segments used the wrong
data offset - for the case of GSO enabled it starts from 12 bytes
earlier.

Change-Id: I3adc532c175babc1ca1e121c7e12e6cafbdb9974
Type: fix
Ticket: VPP-1700
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-06-20 20:07:49 +00:00
Dave Barach 49648de6c0 ipsec: add ipsec api custom-dump routines
Type: feature

Change-Id: I637ca85bb0c5c3e9704e242747b1174bfcd74e02
Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-20 13:46:59 -04:00
Nathan Skrzypczak e4a1a32835 quic: remove session flags identifying Q/S sessions
Type: refactor

Change-Id: Id68c5ae6d57df0fc556bbf583a66e538e641ffb1
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-20 14:43:19 +00:00
Ole Troan ff55c816c9 vat: vec_free/errmsh copy paste error
Change-Id: I808ae95666b82f04979b57cfe237a8f83bb68264
Type: fix
Fixes: 283cd2e9af
Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-20 11:53:33 +02:00
Paul Vinciguerra 2f5fd365e0 tests: move output from CI results and put in log
NAT session details are output to the test results.

Twice NAT44                                                              OK
Acquire twice NAT44 addresses from interface                             OK
21:10:42,661 NAT44 sessions:
-------- thread 0 vpp_main: 1 sessions --------
  172.16.1.2: 0 dynamic translations, 1 static translations
    i2o 172.16.1.2 proto tcp port 8080 fib 0
    o2i 10.0.0.3 proto tcp port 80 fib 0
       external host o2i 172.16.2.2:4567 i2o 10.0.1.3:42296
       index 1869
       last heard 97.99
       total pkts 2, total bytes 80
       static translation
       load-balancing
       twice-nat

Twice NAT44 local service load balancing                                 OK
NAT44 translate packet with unknown protocol                             OK

Type: test

Change-Id: I932a4a1133d597bb82da6e04f2ea833094a481da
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-20 07:29:36 +00:00
Paul Vinciguerra 48664591c4 misc: papi - add __repr__ to FuncWrapper
Eases troubleshooting.

Changes:
   <FuncWrapper object at 0x7fa7402de790>
to
  <FuncWrapper(func=<want_ip6_ra_events(u16 _vl_msg_id, u32 client_index, u32 context, u8 enable_disable, u32 pid)>)>

Type: refactor
Change-Id: I3a893090e024a63a0b3b0de51cb3bb2d2a1678c5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-20 07:29:06 +00:00
Paul Vinciguerra 9dd9434fb7 api: fix return code in vxlan_gbp_tunnel_add_del
Return VNET_API_ERROR_INVALID_VALUE intead of 1.

Type: fix

Change-Id: Ie5465cad9ca07b9147306a808e8b13d0c4867913
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-20 07:28:41 +00:00
Mohsin Kazmi 5e1794dc93 tap: fix the total length of packet for stats byte
Type: fix
Fixes: 8389fb9

Change-Id: I31076db78507736631609146d4cca28597aca704
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-20 03:43:28 +00:00
Mohsin Kazmi 97d54ed43e tap: add support to configure tap interface host MTU size
This patch adds support to configure host mtu size using
api, cli or startup.conf.

Type: feature

Change-Id: I8ab087d82dbe7dedc498825c1a3ea3fcb2cce030
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-20 03:39:31 +00:00
Paul Vinciguerra 3a9f11e6d9 tests: add sudo to gdb commands
Prepend sudo to the gdb command line.

Type: test

Change-Id: I09013c3ca512e26de0c46c02f643b21064ba499c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-20 03:37:54 +00:00
Klement Sekera c09b7fd051 buffers: fix crash
this change is being made to fix a crash when current_data < 0 in buffer
linearization function

Ticket: N/A
Type: fix
Fixes: f883f6a113

Change-Id: Ia4ede823f673780e0c30d075b091db42e183650d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-06-20 03:36:54 +00:00
Florin Coras d314963d0f vppinfra: fix rbtree node delete
Type:fix

Make sure tnil color is black and that the right node colors are
updated.

Change-Id: Ibd9d7ea9438df4dab977202955957824723a865d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-19 16:50:30 -07:00
Mohsin Kazmi 6ac96762dc gbp: Add support for arp unicast forward in gbp bridge domain
Type: feature

Change-Id: Id487fe46194d0a89bd5ac53a9f4ff78b5ff6de60
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-19 19:39:22 +00:00
Neale Ranns bc764c8bc2 l2: BD ARP termination entry API update
Type: refactor

Change-Id: I492b6e88acadf0ab0e4d7b1c0c5d1cab84c1726f
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-19 15:56:18 +00:00
Paul Vinciguerra 6a69b24831 api: fix typos in api error descriptions
Type: style

Change-Id: I81c281c7277dbaea499f3072e01e7f59bf646825
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-19 14:17:19 +00:00
Klement Sekera 4515545eef ipsec: fix l2 header handling in ah encrypt
Use proper length for copying l2 layer in ah encrypt code. Previously
code assumed that there is alywas just one ethernet header preceding IP
header, which might not be true always.

Change-Id: I176fd93b25cf1b9d9c2dc4e420ad48a94d5f4fb8
Ticket: VPP-1539
Type: fix
Fixes: N/A
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-06-19 14:03:47 +00:00
Mohsin Kazmi dac1edbbbf interface: Fix the tso segmentation
ASSERT (b[0]->current_length > 0) fails in single loop of
function vnet_interface_output_node_inline_gso.

Under 'do_segmentation' condition, there are two places in code
which execute "continue" in while-loop without incrementing the
pointer to next buffer which is wrong behavior. In fact, at one
place, current buffer is also freed. In which case, during next
iteration buffer ptr still points to free buffer which current
length is 0 and triggers the above assert.

Type: fix

Change-Id: Ic9d540748c1d00a54e18acc2b0f23730728d7460
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-06-19 13:33:17 +00:00
Steven Luong 13d3354880 misc: add bonding, lacp and vmxnet3 to MAINTAINERS
Type: make

Change-Id: I8a28707a14ca6bcaf44b2a26dfc30ef2f2dbe749
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-06-19 08:01:08 +00:00
Paul Vinciguerra 7d7e3e807c tests: send packet output to log - test_punt.py
Move output to log.txt.
11:51:58,111 Verifying against 3 packets in verify_udp_pkts.
11:51:58,111 ###[ Ethernet ]###
  dst       = 02:fe:4c:62:06:e5
  src       = 02:01:00:00:ff:02
  type      = 0x800
\###[ IP ]###
     version   = 4
     ihl       = 5
     tos       = 0x0
     len       = 128
...

Type: test

Change-Id: Iebaf34c2ac16e7fa8dffbdeadf18ab6c5f4c7494
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-19 07:57:32 +00:00
Benoît Ganne c257e07621 mpls: fix header offset overflow
rw_len (MPLS rewrite string length) is declared as unsigned but is used
as -rw_len with vlib_buffer_advance(), resulting in a wrong, huge
offset.

Type: fix
Fixes: 734d430f37
Ticket: VPP-1705
Change-Id: I7357249f7e50b7d30fd61f5be4858a26e43df85d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-06-19 06:52:45 +00:00
Vladimir Kropylev f867cf1656 session: call session_dequeue_notify after svm_fifo_dequeue_drop
Type: fix

dequeue_notify callback at app-layer needs to know available space in fifo,
so, session_dequeue_notify should be called after svm_fifo_dequeue_drop

Change-Id: I136675d29ec32bea9b33a05deb6710f72ce8d5b1
Signed-off-by: Vladimir Kropylev <vladimir.kropylev@enea.com>
2019-06-19 02:25:58 +00:00
Steven Luong c79b32deb0 tests: fix checkstyle failure in test_stats_client.py
New job submitted to Jenkins reported checkstyle failure in
test_stats_client.py. It needs a blank line in one place and line is
too long in another place.

Type: fix

Change-Id: I9b18df1df449a287570d614d6c5b514ceb88480c
Signed-off-by: Steven Luong <sluong@cisco.com>
2019-06-18 16:14:43 -07:00
Florin Coras 540a8dacbe tcp: allow custom output next node
Type: feature

Change-Id: If9804d3685d2a52efa06e412ae1ebb39c6a44b8b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-18 19:18:53 +00:00
Florin Coras b54a599f38 ipsec: fix ipv6 tunnel protect tests
Type: fix

Change-Id: I1f8007ae659097152046aa1396cc23f126e29018
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-18 19:18:33 +00:00
Paul Vinciguerra 03624bbd6b build: update MAINTAINERS
Type: make

Change-Id: If82324f27163ab4ea270aac909c48a95dd1621ec
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-18 18:49:55 +00:00
Lijian.Zhang b6d61e347a session: fix memory out of bound issue
Ring data space is following ring vec_header_t and ring elements immediately.
Add verification code in session_test.

Type: fix

Change-Id: I0bfa096a9f459128a588821d99b5cdb4f10ede38
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <Sirshak.Das@arm.com>
2019-06-18 14:34:13 +00:00
Florin Coras badf38a2b7 vppinfra: rbtree custom insert/search/del
Type: feature

Add support for insert/search/del with custom compare function.

Change-Id: Ibb740afc224d8adc29d3e1b51b46cdd738d1bd93
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-18 13:55:59 +00:00
Neale Ranns c87b66c862 ipsec: ipsec-tun protect
please consult the new tunnel proposal at:
  https://wiki.fd.io/view/VPP/IPSec

Type: feature

Change-Id: I52857fc92ae068b85f59be08bdbea1bd5932e291
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-18 13:54:35 +00:00
Neale Ranns 097fa66b98 fib: fib api updates
Enhance the route add/del APIs to take a set of paths rather than just one.
Most unicast routing protocols calcualte all the available paths in one
run of the algorithm so updating all the paths at once is beneficial for the client.
two knobs control the behaviour:
  is_multipath - if set the the set of paths passed will be added to those
                 that already exist, otherwise the set will replace them.
  is_add - add or remove the set

is_add=0, is_multipath=1 and an empty set, results in deleting the route.

It is also considerably faster to add multiple paths at once, than one at a time:

vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11
100000 routes in .572240 secs, 174751.80 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12
100000 routes in .528383 secs, 189256.54 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13
100000 routes in .757131 secs, 132077.52 routes/sec
vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14
100000 routes in .878317 secs, 113854.12 routes/sec

vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14
100000 routes in .900212 secs, 111084.93 routes/sec

Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-18 13:31:39 +00:00
Ole Troan 39baa32186 stats: off by one error in /sys/node/{calls,clocks,...}
Fixes: 58492a8372
Change-Id: Ia2eeebc2488b57e57f8d5e52f9948d1cced7b6fc
Type: fix
Ticket: VPP-1698
Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-18 13:01:42 +00:00
Ole Troan 92e3082199 stats: fix memory leakage when adding / deleting interfaces
This fixes two leaks in registering errors in the stats segment.
- The error name created by vlib_register_errors() was not freed.
- Duplicate error names (when interface readded) was added to the vector.

This fix also adds memory usage statistics for the statistics segment
as /mem/statseg/{used, total}

Change-Id: Ife98d5fc5baef5bdae426a5a1eef428af2b9ab8a
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-18 13:01:15 +00:00
Paul Vinciguerra ae8819f0a4 misc: vpp_papi- add tests, clean up pep8
Type: test

Change-Id: Ic81bd4a9eba3c89a746e7a9b9e471b59cd87fa40
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-18 12:19:55 +00:00
Ole Troan 283cd2e9af api: string type to convert to vector
Previous use of strndup() required user to remember to call free().
Now return a vector pointing directly to the API message string.
Of course user must remember to copy the string out if lifetime
is longer than API message lifetime.

Change-Id: Ib5e2b3d52d258e1a42ea9ea9a9e04abbe360e2bf
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-18 11:47:21 +00:00
Lijian.Zhang a8c0b62a88 dpdk: check result of rte_mempool_create_empty
Check the returned pointer, report error and return in case of failure.
This avoids crashing without any useful clues or debug messages.

Type: fix

Change-Id: I15d0735a531c2d9a8b6f67b7d6fe326b98c963c3
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
2019-06-18 10:11:02 +00:00
Nathan Skrzypczak 376efe5df2 quic: fix handling of stream reset & close
Type: refactor

Change-Id: I4981704e3c886d90d482a1deba42633e92626743
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-18 10:10:03 +00:00
Klement Sekera e849865fb8 ip: reassembly-separate feature and custom code
This change is made fix a crash, because is_feature flag semantics turn
out to be different from "custom app code" semantics. Introduce a flag
which custom plugins/apps can use to instead of tying that code to
is_feature flag.

Change-Id: Ief5898711e68529f9306cfac54c4dc9b3650f9e3
Ticket: N/A
Type: fix
Fixes: 21aa8f1022
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-18 08:45:30 +00:00
Damjan Marion 3860a77e9f vppinfra: add format_hex_bytes_no_wrap
Type: feature
Change-Id: I53e1f05b2b048925fca3b2f6b0499ff9c3e6ee12
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-18 02:09:20 +00:00
Damjan Marion 39488c8d30 avf: fix adminq enqueue errors
Type: fix
Fixes: b4ff07a

Change-Id: I2578ae3e093961fa8765568b5fedcf75ae9487f6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-18 02:08:27 +00:00
Damjan Marion 217e7c9741 avf: add logging macros and improve logging
Type: feature
Change-Id: I3d7009505ddbb2c41d8619d9195c6a5373fa9a04
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-18 02:08:21 +00:00
Jon Loeliger dfa47ddf85 ip: consolidate IPv6 link-local-address functions.
Two codes diverged in the packet processor
And sorry I could not use them both
Long I stood being but one developer
And studied one as far as I could
To where the code said bitwise OR

Then took the other, as just could see,
And having perhaps the better bit,
Because it followed the RFC
And used the cryptic XOR in C,
Had run them both a fair bit.

And both equally ran that morning
With packets dropped and flowing.
Oh, I flagged the first for dropping!
Yet knowing bug leads to debuging
I hoped I'd never be returning.

I shall be commiting this with a sigh
Somewhere ages and ages hence:
Two codes diverged by a bit, and I,
I made the packets flow on by,
And that has made all the difference.

Type: fix
Change-Id: If2698726d5501fde76211994f8efc37119345352
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2019-06-17 16:03:33 -05:00
Neale Ranns 72f2a3acb7 ipsec: One DPO per SA
An SA can be used only for ESP or AH nver both, so it needs only one
coresponding DPO.

Type: refactor

Change-Id: I689060f795ee352245a0eaed0890a6b234c63d71
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-17 20:24:52 +00:00
Neale Ranns 2f0522008c ipsec: return original SA create error for tunnel create
rather than SRC/DST address error which is not so helpfull

Type: fix
Fixes: af3f0783

Change-Id: Ie2143e4e29de87d93e79bd96284c041bdbffd98e
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-17 15:15:30 +00:00
Nathan Skrzypczak 2f0f96b9db session: use listener_handle instead of listener_index
Type: refactor

Change-Id: I97fa59a0ba0b6b7a98698926020ffffcf6ae6ba3
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-06-17 14:05:37 +00:00
Paul Vinciguerra 8a2fa3b482 misc: vpp-api - add __repr__ to VPPApiClient.
Show the constructor of the object instead of the memory location.

api client: <VPPApiClient apifiles=None, testmode=False,
async_thread=True, logger=<logging.Logger object at 0x7f35d1bd2590>,
read_timeout=1, use_socket=False,
server_address='/tmp/vpp-unittest-TestGbpApi-pOKbWg/api.sock'>

vs.

api client: <vpp_papi.vpp_papi.VPPApiClient object at 0x7fa0003df750>

Type: feature

Change-Id: I1460d76f6796776dd525c0844e9e426ec2d52398
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-17 01:56:06 +00:00
Dave Barach d67a428b3b vlib: add "memory-trace stats-segment"
Type: feature

Change-Id: Ie020fd7e2618284a63efbeb9895068f27c0fb9ab
Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-16 10:24:43 -04:00