aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2020-04-30build: rework x86 CPU variantsDamjan Marion6-13/+31
Type: improvement Change-Id: Ief243f88e654e578ef9b8060fcf535b364aececb Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-30vcl: disconnect both flavors of bapi transport on destroyFlorin Coras1-5/+8
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I6697296b45c5816a31535b0cf44b8e726292b8bb
2020-04-30build: support arch-specific compiling for Neoverse N1Lijian.Zhang2-0/+15
Enable arch-specific compiling and dynamic optimal function selection for Arm Neoverse-N1. Support for -march=armv8.2-a+crc+crypto -mtune=neoverse-n1 for Neoverse-N1 is added starting from gcc-9.2.0 without change with change improvement [L2 - 1x flows] 11.00 Mpps 11.46 Mpps 4% [L2 - 10Kx flows] 6.83 Mpps 7.17 Mpps 5% [L3 - 1x flows] 10.39 Mpps 10.78 Mpps 3.7% [L3 - 10Kx flows] 6.67 Mpps 7.19 Mpps 7.8% Type: feature Change-Id: I5d24d17820b3dd6909b913202e8c31fc7d48650f 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>
2020-04-30ikev2: use thread local vlib_main in vlib_time_nowFilip Tehlar1-13/+9
Type: fix Change-Id: I8e4a47bd16fa8475ef695c09e3487eabf08faabe Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-04-30tap: allow deletion of tun interfaceMatthew Smith1-2/+5
Type: improvement tap_delete_if() returns early if the interface type is not VIRTIO_IF_TYPE_TAP. Allow VIRTIO_IF_TYPE_TUN also and take appropriate action for those interfaces. Change-Id: I196b6d6f3f5e1543a14d6be76fd879d44c9794fd Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2020-04-29build: detect GNU Assembler AVX-512 bug and disable AVX-512 variants if neededDamjan Marion1-4/+24
Type: fix Change-Id: I098f6c79be3c2e4db001edc0cf0a229bf6e0b13d Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-29ip: use thread local vm instead of thread main for vlib_time_now callsTom Seidenberg2-2/+2
Type: fix Change-Id: I8d68e7c7392dcb748a2a84e72c7b1ca0c6c0eb07 Signed-off-by: Tom Seidenberg <tseidenb@cisco.com>
2020-04-29misc: switch to clang-9Damjan Marion3-4/+6
Type: improvement Change-Id: Iebf77a63c0c19b130a3fbd26b5293304a9fed4c1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-04-29hsa: cleanup ifdefs in sock testsFlorin Coras4-532/+168
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1f03d80c4ee2a555dc6baa262d6df4521c1ae818
2020-04-29devices: vhost: simplify string copies for GCC-10Benoît Ganne1-10/+5
GCC-10 increases string truncations warnings. Refactor string copies confusing it. Type: refactor Change-Id: I9720a0539059de00ab212ff2fc73055f04f5af1d Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-29tap: fix missing "num-rx-queues" from cli helpMohsin Kazmi1-6/+6
Type: fix Change-Id: Ib09c7cebb6978b3adc09ac36cb32f7947b143e51 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-29vcl: add separate fcntl64 ldp handlerFlorin Coras1-5/+12
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idb81e2901398dd6ae94931c705a704c7b52bbb36
2020-04-29interface: fix interface_types.api enumsPaul Vinciguerra1-9/+8
Unspecified c enums start at 0. Unspecified api enums start at 1. Type: fix Change-Id: I431c11302c0ad897a968134ce90496af3db7bb86 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-29flow: explicit rss function enum castFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8c0eb5b5b12ffac1ff5dc89cab10bdb8e4be4322
2020-04-28vlib: add ASSERT to vlib_time_now(...)Dave Barach3-2/+10
Calling vlib_time_now (&vlib_global_main) from a worker thread is a bad mistake. ASSERT (vm->thread_index == __os_thread_index) will catch it. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I55af6de84e06143f8f43adc62103b77267a7a441
2020-04-28svm: fix fifo alignemnt in batch preallocFlorin Coras1-3/+9
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5cdf3cff820a0679f78b212a277d1873c2cfb980
2020-04-28vlib: 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>
2020-04-28vppinfra: type prove vec_new and vec_resizeAndreas Schultz1-6/+10
Some vector functions (e.g. vec_new) pass the vector pointer through vec_resize. This turn the pointer from a real type into a void pointer. Explicitly cast the pointer back to its original type to catch type mismatches. Type: improvement Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com> Change-Id: Id13e52d4f038af2cee28e5abf1aca720f8909378
2020-04-28flow: add RSS supportChenmin Sun6-34/+190
This patch enables the RSS configuration through vnet/flow interface With this RSS feature, users can config the RSS functions for specific flows Currently, it supports: default, toeplitz and symmetric_toeplitz rss function, and ipv4-tcp/ipv4-udp/ipv6-tcp/ipv6-ucp flow types Users can use the following options to combine with above flow types for more specific hash input set selection: l3-src-only, l3-dst-only, l4-src-only, l4-dst-only Command line: test flow add dst-ip any proto udp rss function default rss types ipv4-tcp use l3-dst-only test flow add dst-ip any proto udp rss function toeplitz rss types ipv4-udp use l4-src-only test flow add dst-ip any proto udp rss function symmetric_toeplitz rss types ipv6-udp use l3-src-only and l3-dst-only Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I213efc76dc8af37f2f63605884f353e05b0f5d2a
2020-04-28tap: use one tap fd per rx queueAloys Augustin3-35/+64
This matches vhost queues to linux netdev queues and avoids random packet shuffling across vhost queues on rx. Change-Id: I9901689d361e440fb0b91c9fbaf8124ce525b316 Type: fix Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2020-04-28ipsec: fix buffer allocFilip Tehlar1-1/+7
Type: fix Change-Id: I0f12c19b79df19b692f18ac13d6c32341853b764 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2020-04-28nat: remove unused codeKlement Sekera1-9/+0
Type: refactor Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I0f82d937b4829e5a7f074d4d566fa49319a11716
2020-04-28vppinfra: improve test coverageDave Barach3-1/+78
Bonus corner-case bugfix in bitmap.h, found during the exercise. Issue dates from 2001 or thereabouts. Please review this specific change carefully. lcov_post: filter system include directories and generated files in build-root Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Iaa0b63e9dc571dfe3d992197ac49ba4d93403c61
2020-04-28tests: implement ipaddress convenience methodsPaul Vinciguerra3-9/+42
Add vpp specific properties to ip addresses for use in the api. .vapi_af -- returns [ADDRESS_IP4, ADDRESS_IP6] .vapi_af_name -- returns the string ['ip4', 'ip6'] Update tests to demonstrate usage. Type: feature Change-Id: I43447a1522769d99f89debdc714c51700068d771 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-28lisp: API cleanupJakub Grajciar14-1267/+912
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: Ib7f73a0b6de188982a09040f7739dc46be3cb1de Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2020-04-28vlib: startup multi-arch variant configurationRay Kinsella5-1/+240
Support for startup node multi-arch variant selection through startup.conf. This is to facilitate unit, functional testing and benchmarking of non-default multi-arch variant node code path. Also added parameters to make test, to specific using multi-arch variants in unit testing. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I94fd332bb629683b7a7dd770ee9f615a9a424060
2020-04-28stats: 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
2020-04-28tests: move defaults from defaultmapping to .api filesPaul Vinciguerra11-34/+34
facilitates use of papi beyond the tests. Type: improvement Change-Id: I3d502d9130b81a7fb65ee69bb06fe55802b28a27 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-28tcp: remove sack reneging verbose loggingFlorin Coras1-2/+0
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I4dbbf8456d0ed2350459fcdc0664bbae024072fc
2020-04-28svm: null instead of panic if fifo hdr alloc failsFlorin Coras1-1/+4
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I2c5c9e3e7eff8481e48a940e8420d236a16e7649
2020-04-28tls: fix wrong usage of session close function issueSimon Zhang1-1/+1
Type: fix Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> Change-Id: I5a73e45e5b8a6a97c068e1ca108d8f8a2c1c0f90
2020-04-27virtio: support virtio 1.1 packed ring in vhostSteven Luong10-161/+1621
virtio 1.1 defines a number of new features. Packed ring is among the most notable and important one. It combines used, available, and descripptor rings into one. This patch provides experimental support for packed ring. To avoid regression, when packed ring is configured for the interface, it is branched to a separate RX and TX driver. Non packed ring should continue to perform as it was before. Packed ring is tested using qemu4.2 and ubuntu focal fossa (kernel 5.4.0-12) on the guess VM which supports packed ring. To configure VPP with packed ring, just add the optional keyword "packed" when creating the vhost interface. To bring up the guest VM with packed ring, add "packed=on" in the qemu launch command. To facilitate troubleshooting, also added "verbose" option in show vhost desc CLI to include displaying the indirect descriptors. Known qemu reconnect issue - If VPP is restarted, guest VMs also need to be restarted. The problem is kernel virtio-net-pci keeps track of the previous available and used indices. For virtio 1.0, these indices are in shared memory and qemu can easily copy them to pass to the backend for reconnect. For virio 1.1, these indices are no longer in shared memory. Qemu needs a new mechanism to retrieve them and it is not currently implemented. So when the protocol reconnects, qemu does not have the correct available and used indices to pass to the backend. As a result, after the reconnect, virtio-net-pci is reading the TX ring from the wrong position in the ring, not the same position which the backend is writing. Similar problem exists also in the RX. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I5afc50b0bafab5a1de7a6dd10f399db3fafd144c
2020-04-27l2: merge two clib_memcpy_fast into oneZhiyong Yang1-11/+16
Merge two memcpy into one by swapping src and dst address in l2fwd_trace_t. Type: improvement Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Change-Id: I71c5ecad0b453a434b1cb292ef03d88a760255c8
2020-04-27vlib: deprecate i2c and cjDave Barach11-676/+0
i2c follows its only use case - the original 82599 driver - into extras/deprecated. cj is/was an emergency debug tool unused in several years. Move to extras/deprecated/vlib Type: refactor Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ib55b65373f62630db295c562974bd8f2456c3107
2020-04-27ioam: do not reuse existing vnet symbolBenoît Ganne1-2/+2
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>
2020-04-27vppinfra: 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>
2020-04-27ip: 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
2020-04-27vppinfra: 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>
2020-04-27build: 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>
2020-04-27rdma: tx: interleave prefetchesBenoît Ganne1-24/+13
Type: improvement Change-Id: Ic2d9b17cf5e524f3ad2a3c5343fe1230aa360e73 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2020-04-27devices: 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>
2020-04-27nat: improve perf - long read after short writeKlement Sekera7-363/+424
Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Idbbad246161d28f595c25e10d7282c8b33fa9876
2020-04-26dhcp: fix dhcp proxy behavior for qinq and dot1q subinterfacesStanislav Zaikin2-14/+57
Previous behavior worked only when subinterface ID matches with dot1q tag and doesn't work at all in QinQ case. In this patch I'm checking how subinterface is configured. Type: fix Signed-off-by: Stanislav Zaikin <zstaseg@gmail.com> Change-Id: I7a662a0442fdc8e68aba5d6f469f3b1139a4bc2d
2020-04-25tls: improve cli state reportingFlorin Coras1-3/+12
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I02d60134d6069764da75dc6d206b376a0d46998e
2020-04-25session vcl: propagate transport cleanup notificationsFlorin Coras5-6/+26
Type: improvement Can be used to force app to close a connection on which it still waits for data. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7c3a8245cbbc23728e4408feb63a659a11f718ed
2020-04-25vcl: generate select events on read/write errorsFlorin Coras2-8/+9
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3429f9d0406b6d710846fc82d77400f26f77fdf4
2020-04-24vppinfra: finish deprecating qsort.cDave Barach2-272/+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
2020-04-24acl: ACL creation CLI parsing fixNeale Ranns1-2/+4
Type: fix Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I026f0d8385b538e543bae0c1f7e56e49e4713ba1
2020-04-24nat: ignore user hash in ED NATKlement Sekera8-362/+273
With port overloading, port is no longer a scarce resource and there is no need to limit connections per internal IP. This saves one hash insert in slow path. Type: improvement Change-Id: I8a7a9713ac855fa99fa1617ec684f757cf6e09ae Signed-off-by: Klement Sekera <ksekera@cisco.com>
2020-04-24nat: make usage of vnet_buffer2 transparentKlement Sekera6-21/+19
Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I50df248afb3f6b46c49e6695b3f124cfd584f016