Commit Graph

6755 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
c898a4f5ba api: add mp-safe/barrier-sync indication to elogs
Costs nothing, and leaves nothing to the imagination.

Type: fix

Change-Id: I7c9f9fb9325475c268eca062da7bbbf014438cfc
Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-14 17:30:30 -04:00
d83c4a8d70 ipsec: Display user specified SPI ID not VPP's index
Type: fix
Fixes: 8d7c502002

Change-Id: Ia6de250f20200c17937d9d7b2aab17ccd81d7823
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-14 19:33:16 +00:00
72280f817a avf: update known issues section in README.md
Type: docs
Change-Id: I09f6984b74ebb7ee743881b4ad496618542eeaa5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-14 19:31:38 +00:00
b00b510cd0 g2: clean up compile/link errors
Many missing "extern" declarations, it's hard to imagine why the
related compile/link errors just showed up.

Type: fix

Change-Id: I0878bf5fdb10ffdd8e0c49c9e5153cddaf3bc1fd
Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-14 19:30:44 +00:00
9c8ca8dd31 vppinfra: optimize elog_string
Add a string hash to make sure that strings in the string table are
unique. This optimization has been coded piecemeal in multiple places,
we should have made the underlying function do the work years ago.

Type: fix

Change-Id: I5010fd4926b9b80ce3a168748f6de64e333ef498
Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-14 12:15:28 -04:00
b63dbc537c stats: add version field to stat segment base header
Add a version in the base header of the stat segment
To make support for multiple reader implementations safer.

Change-Id: I6816e2a51a98c2df1e621e80d4ef0b4ba4e9f47b
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
2019-06-14 11:52:50 +00:00
a6bee0a11a ipsec: Correctly rewind the buffer to the IP header when punting UDP encapped SPI-0 packets
Type: fix
Fixes: b71fa75d48

Change-Id: I2d81b373f7659e702759939c096b315afa36f621
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-14 11:19:01 +00:00
f5b017615d interface: interface dump API check validity of sw_if_index
Type: fix
Fixes: 6407ba56

Change-Id: I6d3ce68962986921e04aa00c989d8afa157ebcb8
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-14 10:15:58 +00:00
ff34b916a9 misc: Update MAINTAINERS to include interface common
Type: feature

Change-Id: I72f35444c73c6a7099d34f7d5031cbe82cbdd383
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-14 09:28:29 +00:00
d0efdeb602 crypto-ia32: fix typo in ifdef for avx512 version
Type: Fix
Fixes: dd2423ef

Change-Id: I76f0ed5027161c396186845043f5afe395c20280
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-13 20:33:41 +00:00
fb341b87a9 ipsec: remove spurious warnings
Type: fix
Fixes: 999c8ee6d6

Change-Id: Idcdddbe45f2e0adfd375b07199bb30f77c28702d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-13 20:28:08 +00:00
8062caebf8 tcp: fix tcp_do_fastretransmits failure.
Type: fix

vpp would fail 'tcp_in_fastrecovery (tc)' if tcp_connection_get returns 0.

Change-Id: I512cba5234b3777f1737bec9451940e7e7975f15
Signed-off-by: Guoao Sun <guoao.sun@intel.com>
2019-06-13 15:41:20 +00:00
6230eeabb4 ipsec: ah_decrypt rework
This patch refactors AH decrypt node in such way that it calls crypto
backend only once per node call.

Type: refactor
Change-Id: I0dc72ff699042a151e64d44f76f791c5136ec009
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2019-06-05 20:50:49 +00:00
b59eb8f3e3 avf: add README.md section about spoofing check
Type: docs
Change-Id: I4ae65ed22275abf0d15045f3b09625d6aaa3b67b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-12 21:58:43 +00:00
f35a07273f infra: fix minor memory leak in "api trace..."
Build api trace message print fns into the built-in copy of api_format.c
Optimize memory allocator behavior when the api trace wraps.

Type: Fix

Change-Id: If799d8784a459f981fc9ee3a3ca03d3f63b2bcd0
Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-12 21:58:33 +00:00
0f87dfeec6 static_http: Typo in short_help.
Type: fix.

Change-Id: I48587c5eba6de6de820d348177b6733d0b048013
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-12 20:43:09 +00:00
87d6633379 session: use session handles as app listener handles
Type: refactor

Change-Id: I421750147a8a821bd0b522daf6c2b7239e551f12
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-12 20:18:45 +00:00
87a9bf8c03 tcp: better estimate snd space for rxt with no sacks
Type: refactor

Use tcp_available_cc_snd_space instead of sack scoreboard
last_delivered_bytes to estimate available space when retransmitting
with no sack support

Change-Id: I938c637279eaf8c5634c4e97f0633fa2d0054fac
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-12 11:39:43 -07:00
3417d08700 tcp: add cc stats plotting tools
Type: feature

cc_plot.py can plot cc stats collected via elogs from tcp connections.
To enable the collection of cc stats, tcp must be compiled with
TCP_DEBUG_CC_STAT turned on.

Once the tests have been carried out, and elogs have been saved with "ev
save log <file>", the logs can be converted to txt format with the
convert_evt script. The resulting file can be used as input to the
cc_plots script.

Change-Id: I16df2993fa09cab9ad35f91825eab7df4da6428b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-12 17:14:39 +00:00
26ce6ca1fe misc: add check_commit_msg.sh script
Type: feature
Change-Id: I5e04991afd7500673db121e4529275e9aff15e65
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-12 17:04:40 +00:00
c83311ddff papi: make socket disconnect more robust
Previusly, read error could happen before message_thread starts,
so do not attempt to join in that case.

Change-Id: Ie119916831e320e38eb02e48515b4c6a9cb937e5
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-06-12 16:34:30 +00:00
7a99823c0b tests: filter sw_interface_dump in tests.
Type: test

Change-Id: I92921444ef6b0e574701398cf57971c9ecc1cc91
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-06-12 16:15:42 +00:00
33035c7830 maintainers: add vcl
Change-Id: I29545cadcf0b764b931d14b0c3ec51d728d29504
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-12 08:57:40 -07:00
5fed42ad7b buffers: fix vlib_buffer_free_no_next
Type: fix
Fixes: 910d369
Change-Id: I0e8380cd2b0dc038a028d9cf2568741059de460f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-12 14:31:58 +00:00
ee09f2de68 misc: update MAINTAINERS file
Type: make
Change-Id: I082ae7af9a8d10d6caddf401d3fa843844503b26
Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-06-12 16:17:14 +02:00
91c5129136 lacp: cleanup unnecessary pointer cast
Change-Id: Idc3a7588dc73e7180a15b6ace3684d3c12986b9d
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-06-12 08:17:10 +00:00
16ad61735e NAT: interface fib fix (VPP-1691)
Change-Id: I2d1e2addb2e440c23c255ac7709169f7909cb0be
Signed-off-by: Filip Varga <fivarga@cisco.com>
2019-06-12 07:42:59 +00:00
cab4733a7f vlib: avoid retrieving freed file in epoll
Type:fix

Change-Id: Id7f4f6e2a2f844085f511a33aa1db3968f5d97bb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-11 14:33:03 -07:00
4f3c104266 ip: punt coverity fix of CLI input
Type: fix

Change-Id: Ia73cbe2fba0a364d966daed0b5d5d2ac7499f86d
Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-06-11 09:52:28 +00:00
54ee6d1c13 fix compiling error with marvell pp2 plugin
fix compile issue
"src/plugins/marvell/pp2/pp2.c:247:62: error: 'vm' undeclared (first use in this function)"

Change-Id: Ia23e21b07c29faefa6e363816a220e312adba81c
Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
2019-06-11 09:52:09 +00:00
5c5ffe16cf lacp: remove duplicated code
Change-Id: I0fb646c350b392d69658ba4188ae25e0f0a6cdc1
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-06-11 01:08:20 -04:00
f0b68a55a6 ssvm: disable private segment expand
Change-Id: I893621d9a6520c6e24026a9bbaf44e9e69f60bcb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-11 00:24:28 +00:00