aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
2019-09-04tcp: cc algos handle cwnd on congestion signalFlorin Coras3-12/+11
Type: refactor Change-Id: I15b10a22d0d0b83075a0eef5ef8c09cf76989866 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-04ethernet: move dmac filtering to inline functionMatthew Smith1-56/+63
In eth_input_process_frame(), destination MAC addresses are compared to the interface hardware address in a loop. Move this to a separate inline function to facilitate making changes to the filtering logic more cleanly. Type: refactor Change-Id: I0978f01667e78af5214dbbc9ba223f5b84ce6b7e Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-09-04session: avoid bihash list for session tablesFlorin Coras1-12/+38
Type: fix Change-Id: I1dbc822061f43fcc25dfa5d1728f5c7575139f45 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-03ethernet: fix dmac check avx2 loop conditionMatthew Smith1-1/+1
In eth_input_process_frame(), a loop which checks the destination MAC address of received packets had a different condition for avx2 than it did for the non-avx2 version of the loop. It could result in one unnecessary execution of the loop body after all packets had been processed. Type: fix Fixes: 8d6f34e2b1cbfde5702e88686631527d5e1e10a0 Change-Id: Ib673f45917a0dea461987fdc8f0ca318b749fb1a Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-09-03api: enforce vla is last and fixed string typeOle Troan4-25/+21
Enforce that variable length fields are the last element of API messages. Add a 'fixed' version of string type, since dealing with multiple variable length strings turned out too painful for the C language bindings. The string type is now: { string name[64]; // NUL terminated C-string. Essentially decays to u8 name[64] string name[]; // Variable length string with embedded len field (vl_api_string_t) }; The latter notation could be made available to other types as well. e.g. { vl_api_address_t addresses[]; } instead of { u32 n_addr; vl_api_address_t addresses[n_addr]; }; Type: fix Change-Id: I18fa17ef47227633752ab50453e8d20a652a9f9b Signed-off-by: Ole Troan <ot@cisco.com>
2019-09-03tap: fix tap interface not working on Arm issueLijian.Zhang1-1/+6
The VPP code tries to set all userspace memory in the table via IOCTL to VHOST_SET_MEM_TABLE. But on aarch64, the userspace address range is larger (48 bits) than that on x86 (47 bits). Below is an segment from /proc/[vpp]/maps. fffb41200000-fffb43a00000 rw-s 00000000 00:0e 532232 /anon_hugepage (deleted) Instead of setting all userspace memory space to vhost-net, will only set the address space reserved by pmalloc module during initialization. Type: fix Change-Id: I91cb35e990869b42094cf2cd0512593733d33677 Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Steve Capper <Steve.Capper@arm.com>
2019-09-03tcp: send rwnd update only if wnd is large enoughFlorin Coras3-7/+15
Type: feature Change-Id: I3e97e05a31806afb6b2e84ecf05fb96d285db92e Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-09-02tap: interface rx counter not increment correctSteven Luong1-1/+1
vlib_increment_combined_counter takes sw_if_index, not hw_if_index. Using hw_if_index may work as long as there is no subinterface created to cause hw_if_index and sw_if_index to differ. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I6db042186eeeacf32250f7ef261af8cd6f5ce56e
2019-09-02ipsec ip tcp l2: multiarch nodes cannot be declared as staticDamjan Marion8-15/+15
Credits to ray.kinsella@intel.com who spotted the issue and identified root cause. Type: fix Change-Id: I4afe74c47769484309f6aebca2de56ad32c8041f Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-08-31tcp: fix rx min/max fifo size parsingFlorin Coras1-13/+14
Type: fix Change-Id: Iff4a13da654dbdf7f08bb6d0743b466a1e6be01b Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-30session: move svm_fifo_clear_deq_ntf to before calling the app callbackVladimir Kropylev1-2/+2
Type: fix in case the app requests another dequeue notification, it should not be cleared Change-Id: I7e94e8e30ef098f87f5e7f4880af276970ee5b37 Signed-off-by: Vladimir Kropylev <vladimir.kropylev@enea.com>
2019-08-30devices: fix issue of per_interface_next_indexMichael Yu1-3/+4
Per interface, next hop graph node can be customized with vnet_hw_interface_rx_redirect_to_node function, but it doesn't work well for af-packet type interface. In current implementation, with function af_packet_set_interface_next_node invoked next hop graph node index can be set to apif->per_interface_next_index, but it's not set to next0 properly for packet processing in af_packet_device_input_fn. Type: fix Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com> Change-Id: I8e132ddd1c3c01b6f476de78546d4a9389b3ff87 Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com>
2019-08-30tcp: force zero window on full rx fifoFlorin Coras1-1/+4
Type: feature Change-Id: I7c5684a9f88e56fd62d83a59c14c4e4a6f096b89 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-30tcp: improve mss computationFlorin Coras3-43/+48
Type: fix Use different mss for v4 and v6 packets. Change-Id: Ifcd322c1fd74f749a42bae671dd6cfed8c32b150 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-30tcp: track zero rwnd errorsFlorin Coras2-1/+9
Type: feature Distinguish between rcv window errors and errors after we advertised a zero rcv window, i.e., potential window probes. Change-Id: I6cb453c7aaae456c0a05a8328cfaa55eaca10bf7 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-30session : make sure session layer is enabled when cli operate the sessions.Guanghua Zhang1-0/+4
Type: fix show session rules tcp vpp/src/vnet/session/application_namespace.c:34 (app_namespace_get) assertion `! pool_is_free (app_namespace_pool, _e)' fails Thread 1 "vpp_main" received signal SIGABRT, Aborted. Signed-off-by: Guanghua Zhang <ghzhang@fiberhome.com> Change-Id: I3430339a598a92d0a38826471adeb4547b0b7df4
2019-08-29ip: remove unused function parameterSimon Zhang6-17/+12
Type: refactor Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> Change-Id: I8674ff5f6f6336b256b7df8187afbb36ddef71fb
2019-08-29svm: fix fifo hdr freelist allocationFlorin Coras1-0/+2
Type: fix Change-Id: Ia362ad821db1fd506e973e1844cc3ec74703cc17 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-28bier: API cleanupJakub Grajciar1-7/+7
Use consistent API types. Type: fix Change-Id: I416171c729193e64a68e85a3f1f25d03a9a559d1 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-08-28session: fix unbind coverity warningFlorin Coras1-0/+7
Type:fix Change-Id: If4fce6bd9b06ed545d72df847afd6a74cdefe042 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-27ipsec: Add 'detail' option to 'sh ipsec sa'Neale Ranns1-4/+8
Type: feature with detail option prints all details for all SAs Change-Id: Ic3c423c085dfc849cf9c3e18a6f624b82150d961 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-27interface: Remove residual dpdk bonding codeSteven Luong5-18/+4
dpdk bonding code was removed in 19.08. However, there are still references to VNET_SW_INTERFACE_FLAG_BOND_SLAVE which was set by the already removed code. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I949a7281e6273f2733dd7532cc4a3bb4f3ce30de
2019-08-27session: move ctrl messages from bapi to mqFlorin Coras9-106/+675
Type:refactor Moves connect, disconnect, bind, unbind and app detach to message queue from binary api. Simplifies app/vcl interaction with the session layer since all session control messages are now handled over the mq. Add/del segment messages require internal C api changes which affect all builtin applications. They'll be moved in a different patch and might not be back portable to 19.08. Change-Id: I93f6d18e551b024effa75d47f5ff25f23ba8aff5 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-27ipsec: Fix NULL encryption algorithmNeale Ranns2-1/+9
Type: fix Ticket: VPP-1756 the block-size was set to 0 resulting in incorrect placement of the ESP footer. add tests for NULL encrypt + integ. Change-Id: I8ab3afda8e68f9ff649540cba3f2cac68f12bbba Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-27ip: reassembly: remove unnecessary codeKlement Sekera2-6/+0
Type: refactor Change-Id: I30cb324006c3c6ab88d01c044cf80fab3a34f13a Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-08-26gso: fix segmentation when gso_size greater than vlib buffer sizeMohsin Kazmi1-1/+4
Type: fix Ticket: VPP-1751 Change-Id: I5ffb078492adc97374290de404f2ec0102b75184 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-08-26ip: ip6_preflen_to_mask incorrect result for prefix len > 64Andrew Yourtchenko1-0/+1
The as_u64[0] in the result was not correctly filled in for longer prefix lengths. Type: fix Fixes: 1c7104514c Change-Id: I871772c618475396d1c1c4c699ff77e35097f07e Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-08-23tcp: fix byte tracker samples flushFlorin Coras1-0/+1
Type: fix Change-Id: I3b4cb8fc17387693d6ad6cdef004ca99cd56bc23 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-22dns: make the dns name resolver a pluginDave Barach9-4464/+0
Type: refactor Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I823c2cd307a4613653a2d20f564dda062d4da31b
2019-08-22ip: fix merge issueKlement Sekera1-2/+0
Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Idd64b0b3eedb7179f6d316b66cea8160ad577990 Type: fix Fixes: 630ab5846bceddf8d663e9f488a2dc0378949827 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-08-22sr: fix sr_set_encap_source replyVratko Polak1-1/+1
Can we get a reply macro that would avoid such copypaste errors? Type: fix Change-Id: I753efb1d82fced668c27f2e44b0318bfd31c0a23 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-08-21tcp: add option for always on event loggingFlorin Coras7-184/+370
Type: feature Add option to always compile in debugging infra. Debug verbosity can be controlled via configuration updatable via cli. Compile time inclusion and configuration of event logging verbosity is still available in order to minimize event logging impact. Change-Id: I9d946efe9fa4204fdace1adb1d6588c97b5ae758 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-21dns: add basic functional "make test" caseDave Barach1-0/+4
Type: test Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I88e93b510d8d4f7b59f3e630539dc7e0264afa47
2019-08-21tcp: default to debug disabledFlorin Coras1-1/+1
Type:fix Change-Id: Ib5c33f0bdb3a8b1c2585135fcc8c07b151e47df3 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-20vppapigen: remove support for legacy typedefsPaul Vinciguerra12-45/+32
vppapigen has remapped legacy to typedefs behind the scenes for some time now. - update .api files to use new style typedefs. - issue error on 'typeonly define' in .api files - remove unneeded macros redefining vl_noop_handler Type: refactor Change-Id: I7a8c4a6dafacee6a131f95cd0e9b03a8c60dea8b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-08-20ip: reassembly: send packet out on correct workerKlement Sekera2-92/+287
Note which worker received fragment with offset zero and use this worker to send out the reassembled packet. Type: fix Change-Id: I1d3cee16788db3b230682525239c0100d51dc380 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2019-08-20fix pcap_write functionJack Xu3-1/+8
when use pcap cli to capture pcakets into two files rx01.pcap && rx02.pcap, the first time: 1)pcap rx trace on max 100 intfc any file rx01.pcap 2)......the process of capture data to buffer...... 3)pcap rx trace off the second time: 4)pcap rx trace on max 100 intfc any file rx02.pcap 5)......the process of capture data to buffer...... 6)pcap rx trace off the pcap_write function bug in this two lines pm->n_packets_captured = 0; if (pm->n_packets_captured >= pm->n_packets_to_capture) referring to calling pcap_close() will result in that the twice pcap cli both writes the packets into rx01.pcap, but nothing into rx02.pcap. Beside, the rx02.pcap file will not be created. solution: separate the pcap_close() out of pcap_write() Change-Id: Iedeb46f9cf0a4cb12449fd75a4014f95f3bb3fa8 Signed-off-by: Jack Xu <jack.c.xu@ericsson.com>
2019-08-20api: Cleanup APIs interface.apiJakub Grajciar5-188/+256
Use of consistent API types for interface.api Type: fix Change-Id: I88206d7d0907cffd564031f73c9a996df2e5e21a Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-08-20tcp: forward conn resets through tcp-outputFlorin Coras1-32/+20
Type: refactor Change-Id: I5718853d89ebeae9d66be975a803a3674bec5986 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-19dns: handle multiple replies for single requestsDave Barach3-59/+121
The world is a mess. A single DNS request may yield multiple, subtly different responses; all with the same DNS protocol-level ID. Last response wins in terms of what ends up in the cache. First response wins in terms of the response sent to the client. Hard to do otherwise since we have no clue that more than one answer will be forthcoming. Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I3175a40eb1fea237048d16b852a430f5ab51eaef
2019-08-19ip: leverage existing vlib_buffer_advanceZhiyong Yang1-6/+3
The function ip4_rewrite_inline_with_gso can leverage the existing vlib_buffer_advance to simplify code. Type: fix Change-Id: I25d943dc78aba2f67654385cf3f693eb01e0210e Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2019-08-19devices: skip checksum calculation if guest supports checksum offloadSteven Luong1-3/+7
Set VNET_HW_INTERFACE_FLAG_SUPPORTS_TX_L4_CKSUM_OFFLOAD for the interface to skip checksum calculation if guest supports checksum offload. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ie933c3462394f07580ef7f2bec1d2eb3b075bd0c
2019-08-19session: add explicit reset apiFlorin Coras6-6/+72
Type: feature This can be used to forcefully close a session. It's only available to builtin applications for now. Transports must support the reset api otherwise normal close is used. Change-Id: I5e6d681cbc4c8045385e293e0e9d86fa2bf45849 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-19tcp: set cc_algo on connection allocFlorin Coras3-6/+19
Type: feature Change-Id: Ie00329b11e26cab5db64b9c006171d283854c8ef Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-19tcp: allow cc algos to set pacing rateFlorin Coras2-8/+15
Type: feature Change-Id: Ie7f0f5d2a476d401ede567e422abb953b2bb4a78 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-17gso: fix l3 and l4 header offset in case of tagged interfaceMohsin Kazmi2-0/+28
previously, PG and virtio interfaces calculate wrong l3 and l4 header offset. This patch fixes this issue. Type: fix Ticket: VPP-1739 Change-Id: I5ba978e464babeb65e0711e1027320d46b3b9932 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-08-17gso: fix the segmentation to use current_data offsetMohsin Kazmi1-15/+16
Type: fix Ticket: VPP-1740 Change-Id: If3e34b5b8260e4c50af338895066c2c96f4603af Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-08-17bonding lacp: deleting virtual interface which was enslaved may cause crashSteven Luong3-26/+39
Virtual interfaces may be part of the bonding like physical interfaces. The difference is virtual interfaces may disappear dynamically. As an example, the following CLI sequence may crash the debug image create vhost-user socket /tmp/sock1 create bond mode lacp bond add BondEthernet0 VirtualEthernet0/0/0 delete vhost-user VirtualEhernet0/0/0 Notice the virtual interface is deleted without first doing bond delete. The proper order is to first remove the slave interface from the bond prior to deleting the virtual interface as shown below. But we should handle it anyway. create vhost-user socket /tmp/sock1 create bond mode lacp bond add BondEthernet0 VirtualEthernet0/0/0 bond del VirtualEthernet0/0/0 <----- delete vhost-user VirtualEhernet0/0/0 The fix is to register for VNET_SW_INTERFACE_ADD_DEL_FUNCTION and remove the slave interface from the bond if the to-be-deleted interface is part of the bond. We check the interface that it is actually up before we send the lacp pdu. Up means both hw and sw admin up. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: If4d2da074338b16aab0df54e00d719e55c45221a
2019-08-16devices: vhost-user crashes displaying show trace for deleted interfaceSteven Luong1-6/+10
After the trace is collected and if the interface is then deleted, show trace may crash for the debug image. This is due to the additional check in pool_elt_at_index() to make sure that the block is not free. The fix is to do the check in vhost format trace and return "interface deleted" Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I0744f913ba6146609663443f408d784067880f93
2019-08-16tcp: fix cc algo name parsingFlorin Coras1-1/+1
Type: fix The initial config parser passed a pointer to the field algo id field in tcp main. Because the field is a u8 and it was interpreted as a uword, it ended up overwrting other tcp configuration fields. Change-Id: Ie9020051c8fca40e14cf42a9888daa87360e5038 Signed-off-by: Florin Coras <fcoras@cisco.com>