summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-08-13udp: fix local node no port error counterFlorin Coras1-9/+6
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie0c5a86aedfa38fdcbb835aee7c9e91d59b222d6 (cherry picked from commit bc1a1a7347d689aa7043d4d7f15a7db657230216)
2020-08-13fib: fix adjacency cli command issueShivaShankarK1-3/+1
Type: fix Signed-off-by: ShivaShankarK <shivaashankar1204@gmail.com> Change-Id: I193023705003e664c50487fdfaa42b813604a078 (cherry picked from commit ae9c45938bdf6e180f83f02aed31113e60db20a9)
2020-08-13misc: fix error handling in punt_replicateDave Barach2-2/+8
If vlib_buffer_clone (...) fails due to a buffer allocation error, update *n_dispatched with the actual number of clones, not the requested number of clones. Punt_replicate(...) should not set *to_next[0] = bi0. The original buffer is enqueued separately in punt_dispatch_node(...) Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I774ad8f8c1a0633de4cf8ae5530629201c229347 (cherry picked from commit 1adc7e78ad3eb7e800d0ce3ace56f53ab7aebffe)
2020-08-13vat: fix vat strncpy stringop-overflowRay Kinsella1-2/+1
Fix GCC 9.0 barf on vat strncpy. Type: fix Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I5e41225d6ac9673a9d953046720df55e7b69c479 Signed-off-by: Dave Barach <dave@barachs.net> (cherry picked from commit b1bb513792fecd735effebbd07d867ea93adc9f6)
2020-08-13vat: fix static analysis warningDave Barach1-2/+3
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ia46f865082dcf0cf06af99a7c958c4a5b02193ce (cherry picked from commit 032a5e3da0f4350390d97d6011160fe0d34a8d6e)
2020-08-13misc: strcpy be goneDave Barach8-30/+30
Causes static analysis "vulnerability" warnings Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I272fa69251d70f62178e6dff0423c16f99937af1 (cherry picked from commit 0250090fc0c24214cb1fa969f6e2f585099ee36b)
2020-08-13misc: sprintf be goneDave Barach14-195/+206
Along with related static analysis warnings... Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2c6949c7a2250b8f76a63508c7c210daecfe0f91 (cherry picked from commit 3e07a4a1e843267892dc291a833d93bd70597011)
2020-08-13misc: fix sonarcloud html issueDave Wallace1-1/+1
Type: fix Change-Id: I3691c310fa6336bf2c103c42bccd94c27aab4878 Signed-off-by: Dave Wallace <dwallacelf@gmail.com> (cherry picked from commit 39aa7a5202a6a875bd6f5d341cb07f19ab0bf51e)
2020-08-13dpdk: VM VHOST tests with rxq>1 failingSteven Luong1-0/+1
DPDK recently added a check in the virtio driver to make sure that rxmode->mq_mode == ETH_MQ_RX_NONE. We were passing ETH_MQ_RX_RSS and the device initialization was not accepted. The reason for the change in DPDK was that there is no controls (algorithm, redirection table, hash function). So they thought ETH_MQ_RX_NONE was the best choice for the value of mq_mode. Type: fix Ticket: VPP-1853 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ifa0fc4206cedc56a851f94f6434a2a7500bbd419 (cherry picked from commit b32436aab9626cb8b7bc4099142135c5c9e19beb)
2020-08-13misc: fix static analysis warningsDave Barach2-4/+4
One actual bugfix. Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Icef25167f97a70cc795c0a481174de319ed79ad5 (cherry picked from commit c35f3e835b4078fedabc1ff5013bc4727f533e16)
2020-08-13session: fix fifos displayAloys Augustin1-5/+2
This prevents a crash with quic listeners, and enables the display of udp fifo status. Change-Id: Ib9f48818ee3e51a3fa43ad8ab175e8aa7750df8f Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com> (cherry picked from commit 6eef40bce3f5ae2b06ba75d5b4cf32f168a801e4)
2020-08-13udp: validate input data lengthFlorin Coras1-4/+7
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3f34011ca61ded310d0411e7b50548982bd164ac (cherry picked from commit 936197467aac08b7620c9cb0614817b90466968e)
2020-08-13ipsec: use id in ipsec_tunnel_protect_detailsMatthew Smith1-4/+6
Type: fix The data populated into an ipsec_tunnel_protect_details message includes an outbound SA and a list of inbound SAs for a tunnel interface. These are populated with SA indices. The values used by an API client to refer to an SA in other messages is the SA id rather than the index. Use the SA id instead of the index. Change-Id: Ifaad32801092a7f87bd0dcf19de418d36613f8dd Signed-off-by: Matthew Smith <mgsmith@netgate.com> (cherry picked from commit 5cee0bca5d0f01d3f26e90dee79780382e843d04)
2020-08-13session: fix coverity warningDave Barach1-1/+1
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ib5da600b7a40f775de7dc5b9aaa8d967e49e8632 (cherry picked from commit 4897d77c6d4d5d04eb7e02bda57dc6c7005a609f)
2020-08-13ip: Adding IP tables is no MP safeNeale Ranns1-2/+0
Type: fix it was marked MP safe in the CLI (which it shouldn't be) but it it not marked MP safe on the API. Change-Id: I4bdea498a510a8b406d13d62a899b6d03656f7e8 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 31d6c738c20d3baa619dbbb08af6125fab32bc08)
2020-08-13avf: fix rx queue refill on buffer alloc failureDamjan Marion1-6/+6
If buffer alloc fails, it may happend that rx queue will be stuck as old code only refills if at least one packet is received. Type: fix Change-Id: I388c4f8a9fb2c208bdc222e31b443cbe6b94af82 Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit e7f7190381c66cca6c1c3c77b3d43148818a5a4e)
2020-08-13vcl: fix ldp recv return on errorFlorin Coras1-1/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0875705d3a0c95f2781b0595ef27a30486438aae (cherry picked from commit 2a6642e95dc18d7c56f87b74a70658b8312b8c08)
2020-08-13vcl: fix ldp writev 0 vecsFlorin Coras1-12/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iec5db8dcf3a019b731e15fd79d0208d6eb10943b (cherry picked from commit eda1b8c32f9857bb749835b0189af002b224927d)
2020-08-13avf: proper promisc handlingDamjan Marion2-7/+27
Type: fix Change-Id: Id20a0fe77372602fd211156ccee01c18d829d8df Signed-off-by: Damjan Marion <damarion@cisco.com> (cherry picked from commit 1839fe165c7ffb834775b8582fe0ee2321ff2ab6)
2020-08-13virtio: vhost gso checksum error when both indirect and mrg_rxbuf are offSteven Luong1-20/+19
Turn on gso, turn off both indirect and mrg_rxbuf caused traffic received and sent with checksum error. The problem is we are not mapping the hdr correctly in the shared memory address. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I7ef3bc2755544167b0e624365988111b17399e89 (cherry picked from commit b232d192f2f77114e26cf7f99b57bcd6140872d0)
2020-08-13dpdk: false link down issue with ixgbe NICLijian.Zhang1-0/+66
This issue is observed with X520-2 NICs on FD.io lab Taishan server. After VPP booting up and bringing up the interfaces with command "set interface state <interface> up", it still shows link down status from the command "show hardware-interfaces". However, the hardware link status is actually up. dpdk_process() cannot get the hardware link status correctly via rte_eth_link_get_nowait(). In ixgbe_dev_link_update_share(), if the media type is fiber and the link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback to ixgbe_dev_setup_link_alarm_handler() is scheduled trying to set up the link and clear the flag afterwards. If the device is started or stopped before the flag is cleared, the scheduled callback is canceled. This causes the flag to remain set and subsequent calls to ixgbe_dev_link_update_share() return without trying to retrieve the link state because the flag is set. When the callback is canceled by either interface start or stop operation, in ixgbe_dev_cancel_link_thread(), after cancelling the callback/thread, unset the flag on the device to avoid this condition. Type: fix Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com> Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com> Change-Id: I04de377dc048307a78a5b7109ebdfaf376d5e029 (cherry picked from commit 1690dcb49527934e83748e7b6db8501b33c3758a)
2020-08-13vlib: complain if workers are configured twiceVladimir Isaev1-1/+10
Right now following configuration leads to crash: cpu { corelist-workers 2 workers 2 } because threads count will be set to 2, but we have only one core in coremask. Type: fix Signed-off-by: Vladimir Isaev <visaev@netgate.com> Change-Id: Ia93b892733971e7c8ddfceaaec5f4eb8bf9063ac (cherry picked from commit 18a4a371646bccfd299e6a509e801a524aeb4c92)
2020-08-13vlib: fix error when creating avf interface on SMP systemJieqiang Wang1-1/+13
On SMP architecture, '/sys/bus/pci/devices/<devices id>/numa_node' file will return -1 as a valid value if it does not have any NUMA node information. Using -1 as a valid node id to access data structures will cause memory issue. Fix the error by setting the value of numa_node to 0 if '/sys/bus/pci/devices/ <devices id>/numa_node' returns -1 and it is a SMP system. Type: fix Change-Id: Ib60e79c3656fe5b17e08fd9011122683e8b08b6f Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com> (cherry picked from commit 76c6159d83c2dfe29f84dc4b05d399cdbbdf2878)
2020-08-13ip: provide extern declaration for ip punt nodesJawahar Santosh Gundapaneni2-0/+2
Type: fix Signed-off-by: Jawahar Santosh Gundapaneni <jgundapa@cisco.com> Change-Id: Ife0f7749a72cc834a3d811f8cf6b5a0840157014 (cherry picked from commit 62ad2aaff3810f4ec0f010700091c2f59fbfe466)
2020-08-13tcp: count dupacks with no sacksFlorin Coras2-1/+3
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia2e29b4776c0f8df666da39a14c5ef2fa1693c21 (cherry picked from commit 7fd59cc79c9fb0cccd0cb5c0b4579d0f0a004f6b)
2020-08-13ethernet: Copy only 6 bytes of mac address into a u64Jon Loeliger1-3/+3
Rather than leaving 2 bytes of junk in the upper word of a mac address represented as a u64, zero them out. That way later compairsons stand a chance of matching when deleting a bridge's arp termination entries. The volatile qualifier shouldn't be needed here, but without it the compiler removes the clib_memcpy() at -O2. Bad compiler. No biscuit. Type: fix commit: faf22cb303b65e2a6bf8dad959d7f5ee6d031c4f Change-Id: Iebcf35fdd421293dccbcaefadef767f7e139438e Signed-off-by: Jon Loeliger <jdl@netgate.com> (cherry picked from commit 6a32ce326495bfe48ebef74dfbb8a9c1cf37a530)
2020-08-13pg: update packet generator test scriptsShivaShankarK23-46/+46
update packet generator test scripts to reflect latest code changes Type: fix Signed-off-by: ShivaShankarK <shivaashankar1204@gmail.com> Change-Id: I048a5e8b9b0506dcb0b664e5549d13f51b2e2ea6 (cherry picked from commit b0f956c255de7aa61fead96b7b94bcf937d92c05)
2020-08-13lb: fix coverity warningDave Barach1-1/+1
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I357eb72d478d8175ab9c7cf502d312ab3112213e (cherry picked from commit a53068905eb3f005a5a6d324c37f51056fb49b3e)
2020-08-13udp: fix UDP socket byte order in lookupAndreas Schultz1-1/+2
The port registry uses host byte order for while the session API uses network order. In a single place the conversion was missing. Type: fix Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Change-Id: Ic8cfe2cb4e0711b3e0614060ff6b4f2fe4ed4391 (cherry picked from commit 49a11cff8e7892858d946d3f93ae19502236c358)
2020-08-13misc: Fix vpp-selinux-policy dependency on CentOS 8Renato Botelho do Couto1-1/+6
policycoreutils-python is now called python3-policycoreutils on CentOS 8. Type: fix Signed-off-by: Renato Botelho do Couto <renato@netgate.com> Change-Id: I46264c66a2a719d546e0926f3bd716e986461963 (cherry picked from commit 1d94ab5f1b4557c9e017af7e9da0f821cae1fa72)
2020-08-13fib: path flag FIB_API_PATH_TYPE_INTERFACE_RX not copied to clientIJsbrand Wijnands1-0/+4
This path flag FIB_API_PATH_TYPE_INTERFACE_RX is not copied to the client bin_api. Type: fix Change-Id: Signed-off-by: IJsbrand Wijnands <ice@cisco.com> Change-Id: I612044d2f564c852f83fceb63ce750a6330e1365 (cherry picked from commit 79437c8dbc707e6f60e7a2425fac15c4153f71b3)
2020-08-13vppapigen: crc is a negative value for some messages when using python 2.7Mark Nelson1-2/+2
Type: fix Signed-off-by: Mark Nelson <manelso2@cisco.com> Change-Id: I4f121e49d3c05c21eed3fed2469bd88fc84e2271 (cherry picked from commit ea2abbaeaf34a4652e970fd1e2f60c0d377ebde4)
2020-08-13ebuild: fix the distclean targetDave Barach1-16/+13
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I32142962cb70ea0d92cda1b0ffaac42b7de15974 (cherry picked from commit 952ec0e0a68ccf5a4c3c00894bb26a25d80910a3)
2020-08-13vppapigen: list imports in JSONOndrej Fabry1-0/+7
Type: fix Change-Id: If50477f2487d8c13f91c119a1492370e6e937904 Signed-off-by: Ondrej Fabry <ofabry@cisco.com> (cherry picked from commit eec5d48040695e45c4880adb59bb18ebacd667c1)
2020-08-13lb: Fix generating illegal key in per-port vipYasuhiro Nakamura1-0/+2
VIP prefix index becomes always 0 when adding a VIP which is already registered different port, causing LB config crash. This change assigns the same VIP prefix index to the same VIP. Ticket: https://jira.fd.io/browse/VPP-1834 Type: fix Signed-off-by: Yasuhiro Nakamura <yanakamu@yahoo-corp.jp> Change-Id: Ib63b3e58db9bd85714d68cd1292aadd0c8580da8 (cherry picked from commit 551775eaaa9c162c73e15690e4d7580935e9a70a)
2020-08-13vat: add ip api types parser definitionsJakub Grajciar5-3/+52
build vat with src/vnet/ip/ip_types_api.c Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Iab0f18bf7a89cf9512beab0629bc3a349edec383 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> (cherry picked from commit 23a386b71b287bc95000a8980856c5dbe7cdaf5a)
2020-08-13map: handle IPv6 extension headers for TCP/UDPVladimir Isaev1-2/+2
Without this patch offset for TCP/UDP headers was not calculated correctly if there is one or more IPv6 extension headers. Type: fix Signed-off-by: Vladimir Isaev <visaev@netgate.com> Change-Id: I04d6f5e42f8f072987192d6236085afbd74a4420 (cherry picked from commit 7d4cd0cf6f1a94953ef97ab885752424dea6948c)
2020-08-13unittest: Skip string test case for sizeof (src) > sizeof (dst)Steven Luong2-4/+19
coverity complains that the subject test may cause dst buffer overrun problem and it is right. The problem is when __builtin_constant_p (n) returns true, memcpy_s_inline skips all the errors checking and does the copy blindly. Please see the code in memcpy_s_inline. The fix is to skip the subject test when the aformentioned builtin function returns true. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I50de91cc0c853a134b3bcf3b0cd8d45d7668b092 (cherry picked from commit 2da39718f560478678caacccd198ee4c0c9673c3)
2020-08-12crypto-openssl: fix coverity warningsFilip Tehlar1-5/+5
Type: fix Change-Id: Ia42ff39a0a33f89901b8333a9e6ca82ca9805cc6 Signed-off-by: Filip Tehlar <ftehlar@cisco.com> (cherry picked from commit 41e831f5588fe5ebfd879f4e570e85e12770b360)
2020-08-12tcp: remove useless predictionSimon Zhang1-3/+1
Type: fix Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> Change-Id: Ie2dc2653baec92347eb2cbcd197a2e5ec6a80c79 (cherry picked from commit 487507f40f4e443ff1e683641206db80875f3477)
2020-08-12gbp: Coverity warnings for unitialized variablesNeale Ranns2-0/+3
Type: fix Change-Id: If74ad528e68f45b00719295388e0e1399452ef93 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit e9a630a5248ee6e234c1bf1fdb2c29fc6239f60d)
2020-08-12fib: Uninitialised pad in the prefix (coverity warning)Neale Ranns1-0/+2
Type: fix Change-Id: Ia61d6fbf6e80977f83f1f6672e5e83b52ddeb0e5 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit ea96e92361b483962fd2a6b027cedc02f3bb6f93)
2020-08-12ipip: Unintialized return variable (coverity warning)Neale Ranns1-0/+1
Type: fix Change-Id: I008f23b5f0c7269ddd35cc747a867240fbe9c49b Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit d057625d499525625d60d2207665eaeb755e380e)
2020-08-12ip: Unintialized variables in prefx setup (coverity warning)Neale Ranns2-0/+2
Type: fix Change-Id: I048c9ed423ca2993d2179cdce364ac98980311bb Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 39a233a0aa21c644c78ddd4ffa0ab3cdb1c10318)
2020-08-12tcp: fix coverity warning in btFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4153a9a377b8b1da1366a94ff791ad99617b7a6d (cherry picked from commit 62a7fe28933b6310b9a4e3a0fab99949587576ac)
2020-08-12lisp: fix coverity warningsFlorin Coras1-0/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie060b25b5e8c85d9b2037e300723a2b6023c65d1 (cherry picked from commit 6ce954f8e4446472689146024126ba42da182aa9)
2020-08-12fib: adjacency midchain teardown (VPP-1841)Neale Ranns3-5/+40
Type: fix Change-Id: I57f8bfbce4feed9d2775875cb8b1b729a47900a4 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 24064d02aa9810ebc64c16dc778a179bb0ef5483) (cherry picked from commit 3ebebc3a2fe47f1222ba035e04ccd8caed0cf58f)
2020-08-12map: honor pre-resolve param in map-tAlexander Chernavin6-30/+153
With this commit, forward the translated packet directly to the specified next-hop if pre-resolve param is enabled in MAP-T. Type: fix Change-Id: Ie26080c7820318c7982599577a4af6e4d01a0574 Signed-off-by: Alexander Chernavin <achernavin@netgate.com> (cherry picked from commit f145c15631ba62e798395499f83a2f8a91ae83c7) Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2020-08-12misc: fix coverity warningsDave Barach11-16/+48
Add an ALWAYS_ASSERT (...) macro, to (a) shut up coverity, and (b) check the indicated condition in production images. As in: p = hash_get(...); ALWAYS_ASSERT(p) /* was ASSERT(p) */ elt = pool_elt_at_index(pool, p[0]); This may not be the best way to handle a specific case, but failure to check return values at all followed by e.g. a pointer dereference isn't ok. Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ia97c641cefcfb7ea7d77ea5a55ed4afea0345acb (cherry picked from commit 47d41ad62c5d6008e72d2e9c137cf8f49ca86353)
2020-08-12tls: remove session lookup operation in TLSYu Ping1-2/+0
Type: fix Change-Id: I50329bda365d98f9f9d56a58187fb4fb2a4eb461 Signed-off-by: Yu Ping <ping.yu@intel.com> (cherry picked from commit 985d9293a08dc3da016fbeeaa3f8fff10e1b504e)