summaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2021-04-26pg: fix packet coalescing cliRay Kinsella1-2/+2
Small fix to the packet coalescing cli. Type: fix Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I1edbf6e43937aa0345185f06437095e0558dba31
2021-04-26tests: clean up gbp calls from vpp_papi_providerPaul Vinciguerra1-24/+16
Move info from vpp_papi_provider to .api/vpp_objects Change-Id: Iaf46483fda2840dfec8d37e0b9262e1c9912be59 Type: test Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2021-04-26session: fix race condition in fifo allocationliuyacan3-43/+39
Under some timing conditions,VCL may receive CONNECTED/ACCEPTED event before ADD_SEGMENT event. Timing example: 2 threads call segment_manager_alloc_session_fifos() parallelly Thread 1 Thread 2 sm read lock | | | try to alloc fifo =>failed | | | sm read unlock | | | sm write lock | | | add segment | | | sm write unlock | | sm read lock | | | try to alloc fifo=>successful sm read lock | | sm read unlock | | | emit CONNECTED/ACCEPTED emit ADD_SEGMENT event | sm read unlock This commit move ADD_SEGMENT notification under the protection of the write lock in some scenarios. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I25d5475c5e6d37cfccefa9506f6030c26ce8ee9b
2021-04-23vxlan: Fix L3 modeNathan Skrzypczak5-103/+158
Type: fix Partially revert fix SEGV reported in VPP-1962 [commit a4b0541f64eef02fa0d003d8f831cfdeb45d3668] This adds an is_l3 option to choose between L2 & L3 mode add tunnel creation time Change-Id: Ia2c91a1099074b7d23fc031b78ed0f68628eeabe Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-04-23session: set connected session index for ctFlorin Coras1-2/+5
Set connected session index for ct as well. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id82ffcf5572b6a9d2769c0e685c7a0b4d1ea9e9f
2021-04-23tcp: try to update sack list only if not emptyFlorin Coras1-1/+1
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ieb5af96de5be33356dbab7bc4ab4696731fa8866
2021-04-23tcp: reorganize connection membersFlorin Coras2-8/+8
Optimize connection size and move timestamp_delta closer to other timestamp related members. Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iec42efb46482ebfdf234518a4e91af836e4f4c07
2021-04-23tls quic: improve error reportingFlorin Coras2-7/+11
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I92f0c1f7c0f4696fa12071440a643aa703d6306f
2021-04-23session: set fifo's session index before vcl attachliuyacan1-0/+2
Current implementation may have timing issue: 1. The TCP 3-way-handshake is completed but the app is busy and does not process the CONNECTED event. 2. VPP receive some data from peer and try to send a RX event to VCL, but the fifo's client session index is not initialized yet. So this event will be sent to incorrect session 0. Type: fix Change-Id: I54f222232968bfaea5f4745284a1cfacc89482a9 Signed-off-by: liuyacan <liuyacan@corp.netease.com>
2021-04-22session: remove unused connect/listen msg membersFlorin Coras1-5/+0
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie46824f95f9488b04fa1f701ff94345e2dc83de2
2021-04-22vcl session: refactor passing of crypto contextFlorin Coras7-61/+72
Pass tls/quic crypto context using extended config instead of bloating conect/listen messages. Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0bc637ae310e6c31ef1e16847501dcb81453ee94
2021-04-22flow: Add API implementation of IP4/IP6, IP4_VXLAN/IP6_VXLANChenmin Sun3-1/+63
This patch adds the API handler implementation of the below flows: FLOW_TYPE_IP4, FLOW_TYPE_IP6, FLOW_TYPE_IP4_VXLAN, FLOW_TYPE_IP6_VXLAN Type: feature Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I62e1c466b46f940180e957c859d122086aa22f1c
2021-04-22vcl session: extended connect/listen configurationFlorin Coras4-18/+65
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ic8d9386fef37ffd3446aaeb93a96ee6d60633831
2021-04-22misc: add filter for specific error for pcap traceBenoît Ganne4-1/+18
Type: feature Change-Id: I325257454df1cc22833fa6a1dedd4739d4d5a558 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-22ip: remove unnecesary inlining in ip4-rewrite nodeDamjan Marion1-16/+3
Type: refactor Change-Id: Ifbaf42ef88a7e0f1715b7b5e342af790e3b6acd9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-21vppinfra: more avx512 inlines (compress, expand, from, is_equal_mask)Damjan Marion1-1/+1
Type: improvement Change-Id: I4cb86cafba92ae70cea160b9bf45f28a916ab6db Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-20tcp: req app deq notification on fifo fullFlorin Coras3-1/+33
If fifo full, default to requesting an app deq notification and forcing an ack (window update) if zero rcv window sent is still active. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iade7e1722503da149c62c465c472edbb0a5599f7
2021-04-20crypto: support async handlers for 3des and md5Alexander Chernavin2-3/+12
With this change, add support for 3DES and MD5 in IPsec async mode. After changes in foreach_crypto_link_async_alg, the last combination in the list (aes-256-cbc-hmac-sha-512) started to fail during decription. That was also fixed by proper vector size validation. Type: improvement Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: I660657bdab62ea9cf031c3e43d99f2317e5f74d7
2021-04-20ipsec: remove WITH_LIBSSL macrosDamjan Marion2-125/+3
We don't use libssl anymore... At least not directly. Type: improvement Change-Id: I9a0fab6e3c576d945498ce46f030bd26c1a14d15 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-19ip: fix offload flags handlingAloys Augustin2-3/+5
The per-protocol offload flags only make sense if F_OFFLOAD is set on the vlib buffer main flags. vnet_calc_checksums_inline is called from many places which should do this check and don't, moving the check to this function is less error prone and shouldn't have an impact on performance since the function is always_inline. Type: fix Change-Id: I0297f109f31e409f07bfbaea3cd8b90c659658c4 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2021-04-19interface: interface-output end node reworkDamjan Marion4-61/+77
- rename node to more meaningful name - introduce lookup tables - enable multiarch - quad-loop node - enqqueue to next instead of enqueueing to node Type: improvement Change-Id: Ibb208047ae04bb6cfe56db558d3b8938bc14b4fe Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-18ip: remove dead code from ip_csumDamjan Marion1-1/+0
Type: fix Change-Id: I3b37257e86175743a7bac80c531491565f0a8dcd Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-17classify: honor pcap interface filter also when classify filter is usedBenoît Ganne3-135/+136
Type: fix Change-Id: Ic32550ee9c5d76d232d8b67a7810611f6c8b9177 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-15tcp: support for rate sample attr flagFlorin Coras2-1/+23
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I94b8063c9d8f9b811589c6815cb5c8ca6220f2b5
2021-04-14session: fix next node add on transport registrationFlorin Coras1-7/+2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I11eac12d2ae68a713e78ef68d09b692fce48c18e
2021-04-14misc: clang-12 supportDamjan Marion1-6/+2
Type: improvement Change-Id: Ie8ebbbcf5e93337036998d6ba8dac393b20ebc72 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-04-14session tcp vcl: api to update connection attributesFlorin Coras11-26/+262
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ifdd6024daf044751895bb8d2deabad41d3a80c92
2021-04-14flow: The type of vni in VxLAN flow should be u32Chenmin Sun3-10/+8
Type: fix Signed-off-by: Chenmin Sun <chenmin.sun@intel.com> Change-Id: I40732dfb4fee4a5cfd699a8badea13d070f6b367
2021-04-09dpdk: selection of cryptodev engine data-pathFan Zhang2-2/+4
Type: improvement This patch combined cryptodev op and cryptodev raw API data paths into one and makes the engine run-timely select which data path is used: if all cryptodev devices support RTE_CRYPTODEV_FF_SYM_RAW_DP feature flag, the raw data path API is used, otherwise the traditional data path is used. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Change-Id: Ibbd7c4405288bd9a48a34878954fd3040df7b4ad
2021-04-08devices: af_packet - use netlink to get/set mtuAloys Augustin3-23/+100
The /sys filesystem is not always accurate when switching network namespaces. Using netlink should work in more situations. Type: improvement Change-Id: I71611f14319820469ea7794eec5b7c6c70e2be6d Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2021-04-07session: fix coverity warningFlorin Coras2-6/+6
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id2c06f49bcae1a26a2d16d58f9da7a4d3175bf3c
2021-04-07crypto: fix ops flags in crypto sw schedulerBenoît Ganne1-0/+2
The crypto op flags must be reset to frame flags minus invalid values depending of the operation, instead of forcing them to specific values. Type: fix Change-Id: Ib02c2a738bbca6962394b3c03088d516d0da56a0 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-04-06session: basic support for interrupt modeFlorin Coras4-4/+176
Experimental support for session layer interrupt mode. When enabled (use-private-rx-mqs must be set) session queue node switches to interrupt state when lightly loaded, i.e., no events and less than 1 vector/dispatch. Because transport protocols require a periodic time update, when in interrupt state the session queue node workers register a timerfd with the unix-epoll-input node that when triggered signals, i.e., wakes up, the queue node. Under light load, the timer is set to trigger every 1ms whereas if no session is allocated, the worker moves to idle state and the timeout is set to 100ms. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I905b00777fbc025faf9c4074fce4c516cd139387
2021-04-05tcp: time infra improvementsFlorin Coras11-35/+68
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I998c0686f9f7dc556dda8b28e23bbed127d0aafc
2021-04-05vhost: Crash upon disconnectSteven Luong1-1/+1
Patch 24601 introduced description into template. In vhost_user_process, template is reused inside the while loop to call clib_file_add. But description is allocated outside of the loop only once. As a result, the same storage for description is being referenced by all instances of call to clib_file_add. As long as we don't call clib_file_del, we may be good with multiple fds sharing the same storage for the description. When one of the fds disconnects and frees the description, the other fds is holding onto the free memory pointer. Bad news eventually happens when another fd disconnects and frees the description that was already free previously. The fix is to move the allocation of description inside the loop to avoid sharing. Type: fix Fixes: gerrit.fd.io/r/c/vpp/+/24601 Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ie670931acdc2c7b851982d98fd0d837284a19036
2021-04-05ip6-nd: Solicitation reply only if target is our link-localNeale Ranns1-4/+9
Type: fix The fib source IP6_ND is used for all link-local entries, hence solicitation responses were sent for a peer's address. Constrain the source check to also in clude the LOCAL flag, which indicates that the link-local address is ours. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Iba7e66049e4d89ee3f36d77aeb09310b978d70de
2021-04-02ip-neighbor: suppress unsolicited clib_warning when sending garpSteven Luong2-5/+19
Replace clib_warning with vlog_log_debug when sending garp. There is nothing to alert/warn the operator about sending garp. vlib_log is more appropriate. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ib88a2b46d2ab8b3c35162538ead0dd0983fb7093
2021-04-01session: always clean rx mqs on app detachFlorin Coras1-4/+3
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I47b5b1ad693d131cfc332f6942c86967687a3f2b
2021-04-01ip: extend show cmd of ip reassembly configurationAnton Nikolaev4-0/+16
Type: feature Add output of field maximum reassembly length with others ip reassembly configuration fields. This field can be configured via vpp API, but there was no output of this field in vpp cli. Output added for ipv4/ipv6 and full/shallow virtual nodes. Signed-off-by: Anton Nikolaev <anikolaev@netgate.com> Change-Id: Ibbd61aab26189d4a93d32e047d8f4e589fe9f8a5
2021-04-01fib: Move the adjacency midchain nodes into a separate fileNeale Ranns5-233/+251
Type: refactor It's only the nodes that require compiling for each arch, Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: Ibb2bfc756001735cc10ef0fd8db7e8b8358cf8e2
2021-03-30session: interrupt mode for session node on main threadFlorin Coras1-15/+20
Signal, and implicitly run, main thread session queue node via interrupts instead of the queue process node. Process node still needed for timers. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5efd393effc8dad65e4125a3d0ad1be6b7484cb7
2021-03-30interface: fix coverityDamjan Marion1-2/+2
Type: fix Change-Id: Ia7652fe8e8c20f4f7a019ab7ca0649c2180c7e90 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-29svm session vcl: per app rx message queuesFlorin Coras8-101/+496
Add option to use per app private segments for app to vpp message queues, as opposed to exposing internal message queues segment. When so configured, internal message queues are still polled by the session queue node but external app message queues are handled by a new input node (appsl-rx-mqs-input) that runs in interrupt state. Signaling of the node, when mqs receive new messages, is done through eventfds epolled by worker epoll input nodes. Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iffe8ce5a9944a56a14e6d0f492a850cb9e392d16
2021-03-29tls: fix app_worker_connect_notify param erroryedg1-1/+1
Type: fix Signed-off-by: yedongggang <yedg@wangsu.com> Change-Id: I5ec690e71fa9119a7bf1cfcb6e36263aa732eff0
2021-03-29tests: move vxlan tests to src/vnet/vxlan/testsDave Wallace6-0/+1464
- Refactor make test code to be co-located with the vpp feature source code Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I66379dfe671628e39dfc9685c4fd70fa0e566f6f
2021-03-26vlib: convert foreach_vlib_main macro to be more gdb and clang-format friendlyDamjan Marion4-126/+119
Type: improvement Change-Id: I1152e58d7bfcb3c4347147f87a834d45ad51cdfe Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: introduce vlib_get_elog_main()Damjan Marion2-4/+5
Type: improvement Change-Id: I73383eb15186021cd6527d112da8443a0082f129 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion12-25/+28
Type: improvement Change-Id: If3da7d4338470912f37ff1794620418d928fb77f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-25svm: add producer wait functionFlorin Coras1-1/+1
Type: refactor Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I9488ad7e045c908b60b5821d9c48583f6d513c2f
2021-03-25stats: python vpp_stats rewrite to access stat segment directlyOle Troan1-5/+4
This module implement Python access to the VPP statistics segment. It accesses the data structures directly in shared memory. VPP uses optimistic locking, so data structures may change underneath us while we are reading. Data is copied out and it's important to spend as little time as possible "holding the lock". Counters are stored in VPP as a two dimensional array. Index by thread and index (typically sw_if_index). Simple counters count only packets, Combined counters count packets and octets. Counters can be accessed in either dimension. stat['/if/rx'] - returns 2D lists stat['/if/rx'][0] - returns counters for all interfaces for thread 0 stat['/if/rx'][0][1] - returns counter for interface 1 on thread 0 stat['/if/rx'][0][1]['packets'] - returns the packet counter for interface 1 on thread 0 stat['/if/rx'][:, 1] - returns the counters for interface 1 on all threads stat['/if/rx'][:, 1].packets() - returns the packet counters for interface 1 on all threads stat['/if/rx'][:, 1].sum_packets() - returns the sum of packet counters for interface 1 on all threads stat['/if/rx-miss'][:, 1].sum() - returns the sum of packet counters for interface 1 on all threads for simple counters Type: refactor Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I1fe7f7c7d11378d06be8276db5e1900ecdb8f515 Signed-off-by: Ole Troan <ot@cisco.com>