summaryrefslogtreecommitdiffstats
path: root/src/vnet
AgeCommit message (Collapse)AuthorFilesLines
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>
2019-08-16gso: remove the ip checksum flag in case of ipv6Mohsin Kazmi2-2/+0
Type: fix Ticket: VPP-1727 Change-Id: Icfee35c5ab5e1c65079d1ca7bb514162319113e5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2019-08-16ipsec: fix missed IPSEC_INTEG_ALG_MD5_96Dmitry Vakhrushev1-0/+5
This algorithm was missed in last improvements. Type:fix Signed-off-by: Dmitry Vakhrushev <dmitry@netgate.com> Change-Id: Ib818cbdcdd1a6f298e8b0086dac4189cc201baa3
2019-08-15dhcp: resolver process node index in main_tDave Barach4-5/+3
Remove the (unused) node_registration_t, don't try to use it to signal resolution events. Type: fix Ticket: VPP-1746 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ice975e32152892ac4100b9e758412d48a43f09f1
2019-08-15vlib: copy trace_handle in vlib_buffer_copy/clone() functionsJohn Lo5-15/+1
Since vlib_buffer_copy() and vlib_buffer_clone() both preserve VLIB_BUFFER_IS_TRACED bit in flags field, it should also copy trace_handle which would add minimal overhead. Thus, callers of these functions do not have to call vlib_buffer_copy_trace_flags() to copy trace_handle. Type: refactor Signed-off-by: John Lo <loj@cisco.com> Change-Id: Iff6a3f81660dd62b36a2966033eb380305340310
2019-08-14tcp: extend protocol configurationFlorin Coras5-133/+195
Type: feature Expose more configuration parameters and refactor some of the existing ones. Change-Id: If44c31ff77ce3d7e8da67d39a4ff61346bdf5ccc Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-13session: fix enqueue notification on 32bit systemsFlorin Coras1-3/+10
Type:fix Change-Id: I7b5566525fc30fe0d3cc8cd991960f6ed2f1fc27 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-13fib: add adj_midchain.h to the list of files to install in the include pathAlberto Compagno1-0/+1
Type: fix Ticket: VPP-1735 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com> Change-Id: I7063516a60bb211ad91ef04041b2751ca3f6598e
2019-08-12ip: allow addrs from the same prefix on intfMatthew Smith4-101/+396
Type: feature Adding a prefix to an interface was not permitted if it overlapped with another prefix on an interface which used the same FIB. Loosen the restriction. Allow 2 or more addresses from the same prefix on a single interface. Reference count the prefix to figure out when a glean/connected route for the prefix needs to be added or removed. Added unit tests to check that the route is only removed when all addresses in the prefix are removed from the interface. Change-Id: I1a962ecb5e1ee65fc6d41f98a4cc097a51a55321 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2019-08-12tcp: handle fin+rst+syn in closing stateFlorin Coras1-0/+2
Type: fix Change-Id: I32d4d4a5de04e89087f4ab4a5c425eda572932a8 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-09session: allow closed transports to sendFlorin Coras1-4/+16
Type:fix Transports like tcp may notify session layer of a close but they may defer the connection's deletion (e.g., tcp time-wait). During that time, transports may still want to send packets. So, unless the session has no transport (transport-deleted state), allow the transport to send. Change-Id: I3ae335c7b951ff64be8529a5e3f3ad790feddc84 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-09tls: mark as no lookup transportFlorin Coras2-1/+3
Type:fix Also fix transport close while handshake is ongoing. Change-Id: I004c56d2297d0847c2cb77202f8fba3edaacad29 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-09tls: handle transport resetFlorin Coras1-1/+6
Type:fix Change-Id: I5994fb53dc4b9fd58920b3d67472c38b41db27c2 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-08api: vppapitrace JSON/API trace converterOle Troan1-1/+1
usage: vppapitrace.py [-h] [--debug] [--apidir APIDIR] {convert,replay} ... optional arguments: -h, --help show this help message and exit --debug enable debug mode --apidir APIDIR Location of JSON API definitions subcommands: valid subcommands {convert,replay} additional help convert Convert API trace to JSON or Python and back replay Replay messages to running VPP instance To convert an API trace file to JSON: vppapitrace convert /tmp/api.trace trace.json To convert an (edited) JSON file back to API trace for replay: vppapitrace convert trace.json api-edited.trace To generate a Python file that can be replayed: vppapitrace convert /tmp/api.trace trace.py vppapitrace convert trace.json trace.py Replay it to a running VPP instance: vppapitrace replay --socket /tmp/api.trace In VPP that file can be replayed with: vpp# api trace replay api-edited.trace This patch also modifies the API binary trace format, to include the message id to message name table. Change-Id: Ie6441efb53c1c93c9f778f6ae9c1758bccc8dd87 Type: refactor Signed-off-by: Ole Troan <ot@cisco.com>
2019-08-08udp: fix rx event generationFlorin Coras1-6/+20
When session is owned by another thread, avoid postponing the generation of the rx event. Type:fix Change-Id: Ie6afc8116ce40e83d8aae0432b48e19b31287d8b Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-08tcp: cleanup timersFlorin Coras4-142/+98
Type:refactor Change-Id: I37dbc8b55827d66c2578d6ab8b86ed7e18198aa6 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-08tls: fix close with dataFlorin Coras2-1/+20
Type:fix Also changes the way the ctx is freed. TLS now waits for tcp delete notification before freeing the ctx. Change-Id: I2f606a9ce7b3755ae9d11d6fe714fe11b65dcb98 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-08tcp: fix zero rwnd sent checkFlorin Coras1-1/+1
Type:fix Change-Id: I1e6f2cb28c1bf544cc3d060b11c8935f9edb0eed Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-08udp: fix connections moveAloys Augustin2-1/+32
Without this the use of uc0 is racy between the current thread and the thread that owns it and will delete it. This also ensures we don't trigger a read event on the session before moving it to the right thread and notifying the application. Type: fix Change-Id: Icb1ca3ee5805ea3c0d2d424d4b23511465deb3b6 Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-08-07interface: fix checksum flagsFlorin Coras1-0/+3
Type:fix Fixes:4208a4c Change-Id: I7077788cd14f539b06ead5dc65d8411940438bae Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-08-07fib tests: IP multicast over GRENeale Ranns1-0/+1
Type: feature Change-Id: I1632ff23b1bf6d91aa3406c95ebd6ef0aa595f35 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-06udp: fix session migrate when not neededNathan Skrzypczak1-15/+21
Type: fix Change-Id: I56f5f5e7e6430552f0346a65b1e5707edc28c1c0 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-08-06ethernet: change to mark the CFI bit in the L2 header.Prashant Maheshwari1-3/+3
Type: fix Fixes: 039cbfe2 Signed-off-by: Prashant Maheshwari <pmahesh2@cisco.com> Change-Id: Idca91c73758824688dd6ce61df994be66753d838
2019-08-05session: cache align transport base classFlorin Coras4-19/+20
Type:refactor Also remove tx stats. Expectation is that transports will keep track of them. Change-Id: I083b328d87d0ad3688b630ddb5ef97827a4dbc2b Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-05vxlan: fix VXLANoIP6 checksum offload setupJohn Lo2-7/+6
Fix UDP over IP6 checksum offload setup for VXLAN and VXLAN-GBP. Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: If110467a68234d8eed941869a2a03735f339dc33
2019-08-03ip: fix ip6/udp checksum for pkts using buffer chainingJohn Lo2-4/+15
Fix ip6_tcp_udp_icmp_compute_checksum to work properly for packets with multiple buffers. Fix ip4_tcp_udp_compute_checksum to exit upon detecting error. Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I673547f4479d72cd60757383343fc562cff10265
2019-08-02devices: add null check after map_guest_mem callsSteven Luong1-2/+16
map_guest_mem may return null. Coverity complains about calls without checking its return. Simple stuff. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I0626115f4951a88f23d9792f0232fb57c132fbc2
2019-08-02tcp: add more connection statsFlorin Coras4-6/+81
Type:feature Change-Id: If02884d0f1f26bfe31ec609ea9611cb27b699868 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-02ethernet: fix ARP feature arc definitionDave Barach1-2/+9
This patch gets rid of an ugly warning during vpp startup: "vnet_feature_init:143: WARNING: arp arc: last node is arp-disabled, but expected error-drop!" Type: fix Fixes: 1ff56f00ca015e82ef29955986e503913d1c3b86 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I80914a3c113c090a09bd5a5131e39f036871d92e
2019-08-02ipsec: FIx feature orderingNeale Ranns2-4/+2
Type: fix Fixes: 1404698df397bc4d3007daea41f52ad75ed4486c Change-Id: Ibb77d95bb5e862cf5d1cb65843c526fd2e225c62 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-02virtio: add the display information in virtio cliChenmin Sun2-2/+2
Type: fix 1. Add option '[gso-enabled]' in cli 'create interface virtio' 2. Add gso information in virtio_show() Change-Id: I4eb58f4421325ef54a6a68c8341b3a6d3d68136a Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
2019-08-01interface: fix pcap tx/rx trace cli handlingJohn Lo2-10/+5
Provide default packet_to_capture value. Display interface name correctly for "pcap tx/rx trace status". Type: fix Signed-off-by: John Lo <loj@cisco.com> Change-Id: I7064d0dbea236a9aff68bba7fbaf2c4a73b16c6f Signed-off-by: John Lo <loj@cisco.com>
2019-08-01session: session pool migration notificationFlorin Coras6-0/+43
Type: feature Change-Id: Ia9a5b1a6d85c7f3f2e6db583b33b5b20029a1e88 Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-08-01ipsec: Redo the anit-replay check post decryptNeale Ranns2-0/+36
Type: fix Change-Id: I1fa8c5326d6f22cfb8dd40e97d8a22d11a716922 Signed-off-by: Neale Ranns <nranns@cisco.com>
2019-08-01docs: Small fixes and orderingNathan Skrzypczak1-11/+10
* deactivtates the TODOs on doxygen (were empty) * This move punt.md to readthedocs (should be the new place for dev doc ?) * Makes Handoff queue demo plugin a child of dev doc in doxygen Type: fix Change-Id: I1f0476a911b35208212af8dd608bc76160efd22a Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>