summary refs log tree commit diff
path: root/vhost/src/net.rs
Commit message (Collapse)AuthorAge
* Make lots of things DebugAlyssa Ross2020-07-02
|
* Remove redundant single-component importsDaniel Verkamp2020-04-26
| | | | | | | | | | | | | Fix clippy 1.43.0 clippy::single-component-path-imports warnings. BUG=None TEST=bin/clippy Change-Id: I3f4f54138bedce16dc1ca937bb8bc00a94594f69 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2163203 Reviewed-by: Zach Reizner <zachr@chromium.org> Tested-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
* vhost-net: set backend to null when activate fn quitChuanxiao Dong2020-02-03
| | | | | | | | | | | | | | | Set the backend with null fd can reset the vq in vhost, which can allow the activate fn to run again. BUG=None TEST=launch Crosvm guest with vhost-net. It works fine with iperf test. TEST=cargo test -p devices Change-Id: Ida952409147fd6fbd1d8f69b3a88a7ef03051d65 Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2009523 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
* Remove unnecessary static str lifetimesDaniel Verkamp2019-11-08
| | | | | | | | | | | | | | | | | | Const and static variables imply a static lifetime, so declaring it isn't necessary. Fixes clippy warnings of the form: Statics have by default a `'static` lifetime BUG=None TEST=bin/clippy Change-Id: I99e63b435b6b2fd5fbce9ef617e89ec114587ad7 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1896087 Reviewed-by: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
* cargo fmt all source codeZach Reizner2018-10-09
| | | | | | | | | | | | | | Now that cargo fmt has landed, run it over everything at once to bring rust source to the standard formatting. TEST=cargo test BUG=None Change-Id: Ic95a48725e5a40dcbd33ba6d5aef2bd01e91865b Reviewed-on: https://chromium-review.googlesource.com/1259287 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
* hw/virtio/vhost: Add simple tests backed by fakesJason D. Clinton2018-02-02
| | | | | | | | | | | | | | | | | | | | This slightly advances the use of fakes to test higher level application logic. The fakes are rudimentary at this point, but I wanted to get feedback on the addition of generics in order to facilitate swaping concrete implementations out with fakes in higher level code. BUG=none TEST=./build_test and cargo test -p crosvm -p data_model -p syscall_defines -p kernel_loader -p net_util -p x86_64 -p virtio_sys -p kvm_sys -p vhost -p io_jail -p net_sys -p sys_util -p kvm Change-Id: Ib64581014391f49cff30ada10677bbbcd0088f20 Reviewed-on: https://chromium-review.googlesource.com/689740 Commit-Ready: Jason Clinton <jclinton@chromium.org> Tested-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org>
* Implement virtio-vsockChirantan Ekbote2017-09-18
| | | | | | | | | | | | | Implement the virtual sockets device using vhost subsystem of the host kernel to handle data transfer. BUG=chromium:708267 TEST=build and run maitred in guest VM without issue Change-Id: I35b542c0fc7e0fd9296f7ba3e1dfce60bf524d15 Signed-off-by: Chirantan Ekbote <chirantan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/638838 Reviewed-by: Stephen Barber <smbarber@chromium.org>
* vhost: Fix-up failing tests and add a little more coverageJason D. Clinton2017-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | This fakes out the underlying Net implementation with FakeNet to try and get some of the code a little further along before it explodes. Then, we test for known failures when running without a real vhost file descriptors. This allows us to pass without running as root as we would expect running on Paladins. This is also the final module that was failing at ToT. Also adds vhost to the build_test test targets. BUG=none TEST=Run unit tests: cargo test -p crosvm -p data_model -p syscall_defines -p kernel_loader -p net_util -p x86_64 -p virtio_sys -p kvm_sys -p vhost -p io_jail -p net_sys -p sys_util -p kvm Also ran ./build_test Change-Id: Ie12d05c044634a660a234483532cf783e2a7fe84 Reviewed-on: https://chromium-review.googlesource.com/656278 Commit-Ready: Jason Clinton <jclinton@chromium.org> Tested-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: Jason Clinton <jclinton@chromium.org>
* Refactor VhostNet into separate vhost and net piecesChirantan Ekbote2017-08-28
A large portion of the VhostNet implementation is common to all vhost devices. Create a new Vhost trait that encapsulates this behavior and split the network specific bits into a new Net type and implement the Vhost trait for it. BUG=chromium:708267 TEST=build and run with a VHOST_NET enabled kernel and see that everything still works fine Change-Id: Ia6b7591f9428c1fba1e13b11791fe40e1bd3942b Signed-off-by: Chirantan Ekbote <chirantan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/630060 Reviewed-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>