summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-08-18g2: fix the g2 build for Ubuntu 20.04Dave Barach1-2/+1
Shut off deprecated declaration warnings Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I65ea4bbc4d5ee5a11d4e8f554f414f57944c7e1c (cherry picked from commit 18a86c6e6069cbc9a0d2294ebb7f7cca5f616f84)
2020-08-18vcl svm: fix rx event losshanlin1-2/+5
When vcl_epoll_wait_handle_mq handles rx events exceeding maxevents, VPP will not signal because cursize > 0, and the remaining rx events cannot be triggered because the eventfd event has been read. Therefore, we should dequeue all events until cursize = 0. And then handle msg up to maxevents with vcl_epoll_wait_handle_mq_event and those beyond with vcl_handle_mq_event. Type: fix Signed-off-by: hanlin <hanlin_wang@163.com> Change-Id: I8a0c87cb41c837deb8284b40f668cc3c7d9d6e56 Signed-off-by: hanlin <hanlin_wang@163.com> (cherry picked from commit d0e646f6892e9c85278c9538760a8940c86dcdbb)
2020-08-18vlib: fix unix cli commands crash without sessionBenoît Ganne1-15/+23
If a cli command is run while there are no cli session, then cm->cli_file_pool will not be initialized and we should not try to operate on it. Type: fix Change-Id: Iaea15a23f7efd5b17fab13e6c1cbb3a9a34080e0 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit a58be82dda89d6496f92e451b42eee31f0cf47b4)
2020-08-18dpdk: fix crash with chelsio pmdBenoît Ganne1-6/+12
cxgbe PMD initializes its control channel as part of dev_configure(), and trying to get link status prior to it will lead to a crash. DPDK documentation loosely hints that we should not call any device function before dev_start(), call link_state() only for the relevant PMDs. From DPDK API documentation: The functions exported by the application Ethernet API to setup a device designated by its port identifier must be invoked in the following order: rte_eth_dev_configure() rte_eth_tx_queue_setup() rte_eth_rx_queue_setup() rte_eth_dev_start() Then, the network application can invoke, in any order, the functions exported by the Ethernet API to get the MAC address of a given device, to get the speed and the status of a device physical link, to receive/transmit [burst of] packets, and so on. Type: fix Change-Id: I12d2ab4d84e6bd72a9f695447e86f3222929c804 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 31eb471d0cb0105ab74ee637028f4ab3cc00cf2a)
2020-08-18sr: fix srv6/srv6-ad/srv6-as promisc mode switchJohn Lo3-22/+32
Calling ethernet_set_flags() to switch interface to/from promiscuous mode must use use hw_if_index instead of sw_if_index. Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I72da286b913893227e32193ee11fbbc56e04804d (cherry picked from commit 5b960c60f61c937d0f862be8a7573922b616de75)
2020-08-18misc: remove useless assignmentDave Barach1-1/+0
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I7708587804bc979fa9c46fb11f96d264821e2357 (cherry picked from commit 9a099b6e503659473cbdb8585f823c3c3d83f34e)
2020-08-18vcl: de-init vcl on destroyFlorin Coras1-0/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If3372e3edd403240c2c9da746246170549a3e644 (cherry picked from commit 69d97256d5ca5b06b4399d8369a7a4c3b544a94d)
2020-08-18tcp: avoid rcv wnd less than mssFlorin Coras1-6/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I84ec1c91a3a7b2195aad58923fa6f17f551444cb (cherry picked from commit f2fe353cc829f2074d63ebba9bb3b25e5ceb20af)
2020-08-18lacp: missing endian conversions for trace packet formatSteven Luong1-2/+2
Fix a couple endian conversions for displaying Marker Protocol packet in the trace Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I746a67fb6143b5ad52bc4af9604ff8760dbdec9b (cherry picked from commit 9a244b0a29b3ed517fc3442c9358d79907f67a24)
2020-08-18vlib: fix u64 error counter cli printingFlorin Coras1-3/+3
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie35dc623394cfb6c358740361fd85aa0924ab187 (cherry picked from commit 1ae16c8f3bebe33b2404ad845a2f09f910a06390)
2020-08-18vppinfra: set explicit found in search_free_list loopSteven Luong1-2/+6
While https://gerrit.fd.io/r/c/vpp/+/26948 fixed avoid using -1 to index into h->free_lists[b][l] by changing the loop counter, the check for the value of the loop counter (l < 0) cannot be trusted to decide whether we've found a large enough object within the bin or not. When the loop is terminated, the value of the variable l could be ambiguous if it equals to 0 and it is never less than 0, ie, when we bail out of the loop, we don't know if it was due to the breaking out of the condition in if ((s = f_size - size) >= 0) break; or while (l > 0); The fix is to explicitly set a variable when we have found a large enough object inside the loop to be used to test whether the loop was prematurely terminated (found == 1) or the loop just ran exhausted (found == 0) Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I0161813fbd44dcba8982a767eac2e0930e9d77e3 (cherry picked from commit a5436ae2516edc955f26c6aa4103f5946ee8653c)
2020-08-18ethernet: fix coverity warningDave Barach1-1/+1
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I20daa023eed50f8b42e8dc2d17e47a54aa16ae31 (cherry picked from commit 13f64ce2272539d97b8c499e8e298a053fb3c9e2)
2020-08-18dpdk: fix compiling issue with clangLijian.Zhang1-1/+2
When building vpp image with below command, clang reports warnings/errors on the unused option '-L', as it's not linking stage, and does not require linking libraries. In dpdk.mk, the linking library path should be attached to DPDK_EXTRA_LDFLAGS, instead of DPDK_EXTRA_CFLAGS $ make build-release CC=clang V=1 clang -Wp,-MD,./.ark_ddm.o.d.tmp -fPIE -fPIC -pthread -I/root/origin/build-root/build-vpp-native/external/dpdk-20.02/lib/librte_eal/linux/eal/include -march=armv8-a+crc -DRTE_MACHINE_CPUFLAG_NEON -DRTE_MACHINE_CPUFLAG_CRC32 -I/root/origin/build-root/build-vpp-native/external/dpdk-20.02/arm64-armv8a-linuxapp-clang/include -DRTE_USE_FUNCTION_VERSIONING -include /root/origin/build-root/build-vpp-native/external/dpdk-20.02/arm64-armv8a-linuxapp-clang/include/rte_config.h -D_GNU_SOURCE -O3 -I./ -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated -Wno-missing-field-initializers -Wno-address-of-packed-member -Werror -g -mtune=generic -L/root/origin/build-root/install-vpp-native/external/lib -I/root/origin/build-root/install-vpp-native/external/include -o ark_ddm.o -c /root/origin/build-root/build-vpp-native/external/dpdk-20.02/drivers/net/ark/ark_ddm.c == Build drivers/vdpa/ifc clang: warning: argument unused during compilation: '-L/root/origin/build-root/install-vpp-native/external/lib' [-Wunused-command-line-argument] clang: error: argument unused during compilation: '-L/root/origin/build-root/install-vpp-native/external/lib' [-Werror,-Wunused-command-line-argument] Type: fix Change-Id: If8fd9b19d0aff9d3c27d77e78cd3064bb1ad6565 Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com> Reviewed-by: Govindarajan Mohandoss <Govindarajan.Mohandoss@arm.com> (cherry picked from commit 88d6ce2bee53b7c9f876aa78c5db8ab1ea75c08a)
2020-08-18vppinfra: loop counter off by 1 in search_free_list()Steven Luong1-1/+1
In search_free_list(), we have this do while loop. do { l--; f_index = h->free_lists[b][l]; f = elt_at (h, f_index); f_size = heap_elt_size (v, f); if ((s = f_size - size) >= 0) break; } while (l >= 0); When (l == 0), we still go back up to execute l--. Then l become -1. The next statement is we index h->free_lists[b][-1]. After that, elt_at() would probably cause a crash in the ASSERT. Type: fix Ticket: VPPSUPP-63 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I617d122aa221cfdfe38f8be50f4e0f0e76e11bb5 (cherry picked from commit ec7012e51edef4aec2239cb5b3a249f46d9b2cb0)
2020-08-18misc: fix coverity warningsDave Barach2-2/+2
Type: fix Ticket: VPP-1837 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I51660e4b02f449bd2db12a8cfd395c6c343d2dee (cherry picked from commit c72950e811880c22e5b350c4b1cb5e31b0735b4d)
2020-08-18rdma: fix clang buildBenoît Ganne1-2/+9
Type: fix Change-Id: I9b613f0af484f601dd20a851e2f59ee5e06b5c37 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 971c5be27996985e40f178c8d540a5807a428283)
2020-08-18vcl: allow vcl worker index to be set by applicationsIJsbrand Wijnands2-0/+11
When using vppcom_session* apis to setup TCP sessions in applications build outside of the VPP repository, it is necessary to set the worker_index explicitly when these apis are called from the none-VCL worker threads. An example is when data is to be sent to the TCP session that is originated from a different thread, like the main program thread or from the bin api thread. This change allows the application to set it. Type: fix Signed-off-by: IJsbrand Wijnands <ice@cisco.com> Change-Id: I37f3654a49ea9a8cf3a0d3d0e672583018c12299 (cherry picked from commit 6017ff0dd7a27c062d0ad4687bfc70a69747ac55)
2020-08-18api: fix include_guard when path contains a plusRuslan Babayev1-1/+1
The path to VPP source might contain a '+' when building it with Yocto/OpenEmbedded. Type: fix Signed-off-by: Ruslan Babayev <ruslan@babayev.com> Change-Id: I205ac0de7d8726724af0e30f5b199391e05dc615 (cherry picked from commit 7f286f720d6fe2115423212dda6af66dd810691d)
2020-08-18misc: add Matt Smith to the committer listDave Barach1-0/+5
In hopes of restoring his +2 button... Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I2600daab5afa4334713695d1074706fbb287832f (cherry picked from commit e891ac2f198e7c00dceb2f2c6510f9bdf1cb91d1)
2020-08-18vcl: disconnect both flavors of bapi transport on destroyFlorin Coras1-5/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6697296b45c5816a31535b0cf44b8e726292b8bb (cherry picked from commit dc0ded7dd7a6b8ee68df25cd56666de804e55e64)
2020-08-18vcl: add separate fcntl64 ldp handlerFlorin Coras1-5/+12
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idb81e2901398dd6ae94931c705a704c7b52bbb36 (cherry picked from commit d7586d50f68655631482f33a83a1fe6f4f21ff64)
2020-08-18vlib: use flexible array in vlib_buffer for GCC-10Benoît Ganne1-1/+1
GCC-10 increase overflows-related warnings but gets confused by 0-length arrays. Use C99 flexible length array instead. Type: fix Change-Id: Ie62cfa8faaa408479a598785fd3f06ffd0233c7a Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 049d0b438ef2971181549f195c7e0338cd1c60f4)
2020-08-18stats: add apis to delete simple/combined countersOle Troan4-0/+75
vlib_free_simple_counter() vlib_free_combined_counter() Frees the name and two dimensional vector from the stats segment. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: If1becf7d09520ba41a3d59e2df94958ecfcf6948 (cherry picked from commit a568a19b2956ed8b94b11c2ef041412473dc8442)
2020-08-18ioam: do not reuse existing vnet symbolBenoît Ganne2-2/+6
vxlan_gpe_init() is already defined in libvnet. When loading ioam plugin we end up having 2 different objects using the same symbol. ASan in GCC-10 started to enforce the One-Definition-Rule and it seems like good hygiene anyway. Type: fix Change-Id: I2ea9af1821bca6482a290742e9a109fc25692f37 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 83ceffcd980494c6146ca67a0fa709b2c37ef13e)
2020-08-16vppinfra: harmonize function namesDave Barach3-16/+16
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Icce7eab4510785e15bdcf97e4d1881b0f46f6899 (cherry picked from commit d4a639bbd2257a88fa3f06939a23c13af1d56dd3)
2020-08-13vppinfra: selectively disable false-positive GCC-10 warningsBenoît Ganne3-0/+24
GCC-10 increase overflows-related warnings but is confused by SIMD operations. Type: fix Change-Id: Iafde754c2fbec60e2d0a328f295b1f5c156d8234 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit a66971f980187efd03a84d340b80a7d3cf39deac)
2020-08-13ip: reassembly: fix one possible use-after-freeGao Feng2-10/+11
When use the kv->v.memory_owner_thread_index as the index to get the reass in pool, maybe this element is freed by the owner thread because of timeout, too many fragments, and so on. So we should check if do_handoff with kv->v.memory_owner_thread_index before get the reass from pool. Type: fix Signed-off-by: Gao Feng <davidfgao@tencent.com> Change-Id: Ie0f1dc368f86d0fd65292ca0c5e1908348015e09 (cherry picked from commit 9165e0365cc21575fd3e4a98be59317a839553f4)
2020-08-13vppinfra: selectively disable false-positive GCC-10 warningsBenoît Ganne1-0/+9
GCC-10 increase overflows-related warnings but failed to infer that b->n_cached_bytes is always < sizeof(uword). Type: fix Change-Id: I956ae609abc9e39d4a932e5801510999d7d27b79 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit ffbcf6178891bd68a97543ac91d28f37256d5e13)
2020-08-13build: add vppinfra/warnings.h to exported headers listBenoît Ganne1-0/+1
To allow the use of WARN_ON/OFF macros to selectively disable build warnings. Type: fix Change-Id: Iceb9d28b2b80c373afb51900880c23041be836db Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit be7dbbbfdd49fcfff851f38d1d36d08fc9710604)
2020-08-13devices: allow link state down with netlinkMatthew Smith1-1/+1
Type: fix Use the up parameter in vnet_netlink_set_link_state(). It was ignoring the parameter and always setting IFF_UP on an interface. Change-Id: I0d44406d982afbdc43bc6b26d0f22c0bdd47abdc Signed-off-by: Matthew Smith <mgsmith@netgate.com> (cherry picked from commit 81284163a293759bc5c2d6a124639c6796589d15)
2020-08-13vcl: generate select events on read/write errorsFlorin Coras2-8/+9
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3429f9d0406b6d710846fc82d77400f26f77fdf4 (cherry picked from commit 5e6222a0332e38316b5a58b23c35cca69bb72025)
2020-08-13vppinfra: finish deprecating qsort.cDave Barach2-3/+7
Minor change to vec_sort_with_function(...): don't depend on the qsort implementation to deal with null, zero-long, or 1-long vectors Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I7bd7b0421673d2a025363089562aa7c6266fba66 (cherry picked from commit f593b5792031b3797cdcdfd3fbb33ac4de8c9a5d)
2020-08-13nat: fix extended unit testsKlement Sekera1-2/+2
Type: fix Fixes: b86437b79b82493c2e9728929df417f55b153824 Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I2c833928dcdceb4d23dfc161bcc3358272076980 (cherry picked from commit e7f420177620868275add23ba5fcea7c7d18c91a)
2020-08-13vapi: packed enum type generationNeale Ranns1-1/+14
Type: fix if the ,api/.json specifies that a enum should be u8/u16 that the generated c enum needs to be packed. Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Ia0497b45e4c510a5c63cd02e966769bf20686838 (cherry picked from commit b5c0d35f9445d4d99f2c5c7bd3175e68721a8ee5)
2020-08-13misc: update INFO.yamlDave Barach1-34/+34
Add Benoit Ganne to the committer list, remove committers who have resigned, list committers in alphabetical order. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ic51092df774464e228cd875acf118827e9cd1923 (cherry picked from commit 0e2751cc1d246145cee6b1e4a588c30270c7ce21)
2020-08-13session: fix session_table_get_or_allocAndreas Schultz1-8/+11
Extending the fib_index_to_table_index could leave entries uninitialized, pointing to the session tables at index 0. That session index exists by default, but it is a IPv4 session table. That would break all IPv6 on the unitilized fib indexes. Type: fix Change-Id: Ie3f0a87a7f829ceb39f75ec06658b0ad1d3813ae Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> (cherry picked from commit 30a28c187b0eb9216d5d7918712d98a4b7a5ba6a)
2020-08-13tcp: avoid bt sample access after possible pool reallocFlorin Coras1-6/+6
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I98f943c8862fa74fb576f9ec1fb9186289b1216b (cherry picked from commit c17ff6ec3b69ef228047bf346e0b524c48d2c96e)
2020-08-13vcl: fix use-after-freeBenoît Ganne1-1/+2
Make sure we disconnect from vlib prior to free-ing the last worker, as we'll need to access it. Type: fix Change-Id: Id5bdd17f0f5efa1ce52021b4270eb4f1e95cc61d Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 38ab5672b599df8ef201ca6733c9b008c37fdfa3)
2020-08-13tcp: fix use-after-freeBenoît Ganne1-1/+5
bts can be freed by the call to bt_fix_overlapped(). Save flags for later use. Type: fix Change-Id: If8b48c96ce39e38f2ed7f4db2815122523eb2e05 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit a04adbf5368f9ec907508ff36d42fbd72d287120)
2020-08-13vat: fix increment_address(...)Dave Barach1-2/+2
vl_api_address_t uses a packed enum for the address family, compare a->af directly with ADDRESS_IP4 / ADDRESS_IP6 instead of running a->af through clib_host_to_net_u32(...) before compare. Indirectly fixes api_ip_route_add_del(...) w/ count > 1. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ib7f562ec9e92ee63e52a338d318fcf1ce6221755 (cherry picked from commit 54582663ab7d7105bc2407036a311d68707e5ab9)
2020-08-13vlib: queue_hi_thresh fix to avoid deadlockElias Rudberg1-2/+4
Adapt queue_hi_thresh value using num_threads to avoid risk of deadlock between threads which could happen for example when different NAT threads try to handoff work to each other at the same time when their frame queues are congested. This change ensures that each thread can reserve a queue entry without causing problems even in the most extreme case when all threads attempt to add to the same queue simultaneously when the queue is nearly full. Type: fix Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net> Change-Id: I9e02f753bd00833d8dd500d181b0d4f9a454d703 (cherry picked from commit 368104d06ad6d667a8cce152426916fc654b6627)
2020-08-13sr: fix non-NULL terminated string overflowBenoît Ganne1-1/+1
Type: fix Change-Id: Ia5ae0e893a5358f61353d20f444d88d79953e482 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit b9753540d2a69bbab807653fc3d0c1b43ec4d6d5)
2020-08-13session: fix use-after-free in input nodeBenoît Ganne1-1/+2
Type: fix Change-Id: Ie60b07abe76ad166f048f5885accd7038d8153b2 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 7ce23f25bbc01d534ca294ce88ab0d709e3e03a7)
2020-08-13session: avoid rx notifications on accepting sessionsFlorin Coras1-0/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iba37e528e968104c3ba9c8324438ba695ddddfd1 (cherry picked from commit da302e4fce1003a2fdd2ace7e1ae09987399092c)
2020-08-13vcl: ensure sessions are open on select eventsFlorin Coras1-7/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4d56b61af574dfdaf6028160ce331606bdf65609 (cherry picked from commit f49cf470c583507fa1b5b841887107071701ef5e)
2020-08-13vcl: expand vcl select maps in ldp if neededFlorin Coras1-4/+5
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I56c487821233cebf2146745a4706cb573cc088a5 (cherry picked from commit cbce80aaa3f1853856d4d64c95f10d65caa4d786)
2020-08-13gbp: fix l3-out anonymous test cleanupBenoît Ganne1-3/+13
Type: fix Change-Id: Ib455b0a57f9b4f9cb82bb295c220270d0c6e5fe5 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 040d47c2cce87255a101f301239192c5599b0db5)
2020-08-13lisp: fix use-after-freeBenoît Ganne1-8/+8
Type: fix Change-Id: I42c3e3514ba50d40e09ee688d083f3e78fa0713a Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 101fc278c3b7009c42574a25b96c4fb7fcd15e39)
2020-08-13vat: fix static analysis warningAndreas Schultz1-2/+1
replace hand crafted version with existing vector function Type: fix Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Change-Id: I94834852469ed316c7bdbd48bb7f479648b2c8e5 (cherry picked from commit 63551351b75d1363b57ed1810b0d7065ca5cd600)
2020-08-13dpdk: fix udp-encap for esp in transport modeAlexander Chernavin2-10/+9
Now UDP encapsulation doesn't work in transport mode because: - the encrypt node misses filling of UDP header and it gets sent with all zeros; - the decrypt node misses filling of new IP header and it contains garbage data. With this commit, fill UDP header during encryption and fill IP header during decryption. Change-Id: I87a7bd594f0e312b16d3e5eb19e568b4e3164d36 Type: fix Signed-off-by: Alexander Chernavin <achernavin@netgate.com> (cherry picked from commit 82fc98fa4578dbbfb156effb11dea6a4e2d0b898)