aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user_inline.h
AgeCommit message (Collapse)AuthorFilesLines
2022-12-02vhost: convert vhost device driver to a pluginSteven Luong1-496/+0
convert vhost device driver to a plugin as described in https://jira.fd.io/browse/VPP-2065 Type: improvement Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: Ibfe2f351bcaed36a04b136d082ae414145dd37b5
2022-03-01virtio: refactor codeMohsin Kazmi1-10/+13
Type: refactor Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I3788cc857023fafcc8eb6d6ff4524425026a75d8
2021-01-08vhost: Add event index for interrupt notification to driverSteven Luong1-11/+122
VPP only supports a poor man's approach for interrupt notification to the driver. It uses a simple binary flag for "interrupt needed" or "interrupt not needed". Most drivers support more sophisticated event index already. This feature is to add the long due missing feature and make it configurable, off by default. Type: feature Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I68dab7dd07045cafb49af97b7f70db9b8131ae03
2020-09-04virtio: remove kernel virtio header dependenciesMohsin Kazmi1-6/+6
Type: refactor tap, virtio and vhost use virtio/vhost header files from linux kernel. Different features are supported on different kernel versions, making it difficult to use those in VPP. This patch removes virtio/vhost based header dependencies to local header files. Change-Id: I064a8adb5cd9753c986b6f224bb075200b3856af Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2020-04-27virtio: support virtio 1.1 packed ring in vhostSteven Luong1-0/+79
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
2019-12-04gso: remove the interface countMohsin Kazmi1-4/+0
Type: refactor Change-Id: I51405b9d09fb6fb03d08569369fdd4e11c647908 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
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-07-31devices interface tests: vhosst GSO supportSteven Luong1-0/+22
Add gso option in create vhost interface to support gso and checksum offload. Tested with the following startup options in qemu: csum=on,gso=on,guest_csum=on,guest_tso4=on,guest_tso6=on,guest_ufo=on, host_tso4=on,host_tso6=on,host_ufo=on Type: feature Change-Id: I9ba1ee33677a694c4a0dfe66e745b098995902b8 Signed-off-by: Steven Luong <sluong@cisco.com>
2019-02-23vhoat: potential crash in map_guest_mem using debug imageSteven Luong1-1/+14
map_guest_mem may be called from worker-thread/dataplane. It has a call to vlib_log and may crash inside vlib_log's ASSERT statement /* make sure we are running on the main thread to avoid use in dataplane code, for dataplane logging consider use of event-logger */ ASSERT (vlib_get_thread_index () == 0); The fix is to convert the vlib_log call in map_guest_map to event logger Change-Id: Iaaf6d86782aa8a18d25e0209f22dc31f04668d56 Signed-off-by: Steven Luong <sluong@cisco.com>
2018-10-02vhost-user: add support for vlib_log APIJerome Tollet1-2/+2
Change-Id: I0af68f6b41d0024aa64b93a8b18e2d179bf939b0 Signed-off-by: Jerome Tollet <jtollet@cisco.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-02vhost-user: Interface state updatesJuraj Sloboda1-0/+6
Fix inconsistencies between admin and link interface states Admin down should imply link down: link_up = admin_up && link_ready Change-Id: I4d668d82d035b5d2ae508727f34f1722a0c3e677 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-07-08vhost: Add multi-versioning supportMohsin Kazmi1-0/+262
It also refactors the vhost code which was in one big file vhost-user.c. Receive side code is in vhost_user_input.c and Transmit side code is in vhost_user_output.c Change-Id: I1b539b5008685889723e228265786a2a3e9f3a78 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>