Commit Graph

4348 Commits

Author SHA1 Message Date
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
Dave Barach 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
Neale Ranns 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
Damjan Marion 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
Dave Barach 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
Dave Barach 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
Ole Troan 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
Neale Ranns 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
Neale Ranns 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
Neale Ranns 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
Neale Ranns 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
Guoao Sun 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
Filip Tehlar 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
Damjan Marion 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
Dave Barach 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
Paul Vinciguerra 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
Florin Coras 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
Florin Coras 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
Florin Coras 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
Vratko Polak 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
Damjan Marion 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
Zhiyong Yang 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
Filip Varga 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
Florin Coras 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
Neale Ranns 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
jialv01 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
Zhiyong Yang 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
Florin Coras 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
Florin Coras 4e116fb56f tcp: allow registration of new cc algo types
Type: feature

Change-Id: I83e21b508a19df1beb207d961c8f2b52347deca0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-11 00:24:05 +00:00
Florin Coras 5368bb016f svm: improve fifo segment show
Type: refactor

Change-Id: I6933205cfb04bc31cabe6e3b1a8044cace93f84c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-09 09:25:24 -07:00
Dave Barach 7681b1c469 mactime: add per-mac allow-with-quota feature
Specify a data limit during specified time ranges. Outside of the
specified time ranges, data will be allowed.

Clean up "show mactime" output.

Type: feature

Change-Id: Iddd6678e7ded1d0f9cb88d69c656de8d87d5694c
Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-08 19:39:57 +00:00
dongjuan 8875248f5e trace frame-queue on trigger out of memory
FRAME_QUEUE_NELTS is 64 in thread.c

Change-Id: Ie7e5962afe05dfc7f38e3d597dabc74dcc2dab8d
Signed-off-by: dongjuan <dong.juan1@zte.com.cn>
2019-06-08 16:43:17 +00:00
Florin Coras d567a8d51b tcp: send challenge ack for in wnd syn
Type: fix

Per rfc793, in window syns for established connections should lead to
connection resets. As a mitigation for blind reset attacks, rfc5961
requests that such syns be replied to with challange acks.

Change-Id: I75e4972bbb515e48d9cf1bda32ea5d9891d670f0
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-08 16:41:42 +00:00
Florin Coras 548f757449 tcp: close connection if not recovered after max tries
Type: feature

Change-Id: Ia8af6a62a2be2265bc42955d90e8c2222bdb8f50
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-08 01:36:00 +00:00
Florin Coras d9a145f42e tcp: add cc cleanup function
Type: feature

Change-Id: I54521078cf96e459d041c86297c6ca80045bf0a3
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-06-07 09:35:20 -07:00