History log of /cloud-hypervisor/net_util/src/ctrl_queue.rs (Results 1 – 20 of 20)
Revision Date Author Comments
# 8338fa64 24-Jun-2025 Hengqi Chen <hengqi.chen@gmail.com>

net_util: Drop duplicated virtio_features_to_tap_offload

The virtio_features_to_tap_offload() defined in ctrl_queue.rs
is duplicated. Remove it and use the one defined in lib.rs
instead.

Signed-off

net_util: Drop duplicated virtio_features_to_tap_offload

The virtio_features_to_tap_offload() defined in ctrl_queue.rs
is duplicated. Remove it and use the one defined in lib.rs
instead.

Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>

show more ...


# ea6d5a04 21-May-2025 Philipp Schuster <philipp.schuster@cyberus-technology.de>

misc: net_util: streamline #[source] and Error impl

This streamlines the Error implementation in the Cloud Hypervisor code
base to match the remaining parts so that everything follows the agreed
con

misc: net_util: streamline #[source] and Error impl

This streamlines the Error implementation in the Cloud Hypervisor code
base to match the remaining parts so that everything follows the agreed
conventions. These are leftovers missed in the previous commits.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com

show more ...


# 61e57e1c 29-Sep-2024 Ruoqing He <heruoqing@iscas.ac.cn>

misc: Further improve imports styling

By introducing `imports_granularity="Module"` format strategy,
effectively groups imports from the same module into one line or block,
improving maintainability

misc: Further improve imports styling

By introducing `imports_granularity="Module"` format strategy,
effectively groups imports from the same module into one line or block,
improving maintainability and readability.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>

show more ...


# 88a9f799 29-Sep-2024 Rob Bradford <rbradford@rivosinc.com>

misc: Adapt consistent import style formatting

Historically the Cloud Hypervisor coding style has been to ensure that
all imports are ordered and placed in a single group. Unfortunately
cargo fmt ha

misc: Adapt consistent import style formatting

Historically the Cloud Hypervisor coding style has been to ensure that
all imports are ordered and placed in a single group. Unfortunately
cargo fmt has no support for ensuring that all imports are in a single
group so if whitespace lines were added as part of the import statements
then they would only be odered correctly in the group.

By adopting "group_imports="StdExternalCrate" we can enforce a style
where imports are placed in at most three groups for std, external
crates and the crate itself. Choosing a style enforceable by the tooling
reduces the reviewer burden.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>

show more ...


# 1d55de9c 21-Feb-2023 dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

build: Bump virtio-bindings from 0.1.0 to 0.2.0

Bumps [virtio-bindings](https://github.com/rust-vmm/vm-virtio) from 0.1.0 to 0.2.0.
- [Release notes](https://github.com/rust-vmm/vm-virtio/releases)

build: Bump virtio-bindings from 0.1.0 to 0.2.0

Bumps [virtio-bindings](https://github.com/rust-vmm/vm-virtio) from 0.1.0 to 0.2.0.
- [Release notes](https://github.com/rust-vmm/vm-virtio/releases)
- [Commits](https://github.com/rust-vmm/vm-virtio/compare/virtio-queue-v0.1.0...virtio-bindings-v0.2.0)

---
updated-dependencies:
- dependency-name: virtio-bindings
dependency-type: direct:production
update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

show more ...


# a4859ffe 25-Jul-2022 Sebastien Boeuf <sebastien.boeuf@intel.com>

virtio-devices: Optimize add_used() usage

Now that we rely on pop_descriptor_chain() rather than iter() to iterate
over a queue, there's no more borrow on the queue itself, meaning we can
invoke add

virtio-devices: Optimize add_used() usage

Now that we rely on pop_descriptor_chain() rather than iter() to iterate
over a queue, there's no more borrow on the queue itself, meaning we can
invoke add_used() directly for the iteration loop. This simplifies the
processing of the queues for each virtio device, and bring some possible
performance improvement given we don't have to iterate twice over the
list of descriptors to invoke add_used().

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>

show more ...


# 87f57f7c 08-Jul-2022 Sebastien Boeuf <sebastien.boeuf@intel.com>

virtio-devices: Improve queue handling with pop_descriptor_chain()

Using pop_descriptor_chain() is much more appropriate than iter() since
it recreates the iterator every time, avoiding the queue to

virtio-devices: Improve queue handling with pop_descriptor_chain()

Using pop_descriptor_chain() is much more appropriate than iter() since
it recreates the iterator every time, avoiding the queue to be borrowed
and allowing the virtio-net implementation to match all the other ones.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>

show more ...


# a423bf13 06-Jul-2022 Sebastien Boeuf <sebastien.boeuf@intel.com>

virtio: Port codebase to the latest virtio-queue version

The new virtio-queue version introduced some breaking changes which need
to be addressed so that Cloud Hypervisor can still work with this
ve

virtio: Port codebase to the latest virtio-queue version

The new virtio-queue version introduced some breaking changes which need
to be addressed so that Cloud Hypervisor can still work with this
version.

The most important change is about removing a handle to the guest memory
from the Queue, meaning the caller has to provide the guest memory
handle for multiple methods from the QueueT trait.

One interesting aspect is that QueueT has been widely extended to
provide every getter and setter we need to access and update the Queue
structure without having direct access to its internal fields.

This patch ports all the virtio and vhost-user devices to this new crate
definition. It also updates both vhost-user-block and vhost-user-net
backends based on the updated vhost-user-backend crate. It also updates
the fuzz directory.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>

show more ...


# 059e787c 04-Apr-2022 Sebastien Boeuf <sebastien.boeuf@intel.com>

virtio-devices: Rename address translation function for more clarity

Renaming translate() to translate_gva() to clarify we want to translate
a GVA address into a GPA.

Signed-off-by: Sebastien Boeuf

virtio-devices: Rename address translation function for more clarity

Renaming translate() to translate_gva() to clarify we want to translate
a GVA address into a GPA.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>

show more ...


# b9aeaf66 15-Mar-2022 Rob Bradford <robert.bradford@intel.com>

net_util: Remove unnecessary return value from CtrlQueue::process()

Since the code has been adapted to support VIRTIO_F_EVENT_IDX we use
Queue::needs_notification() to determine whether to signal th

net_util: Remove unnecessary return value from CtrlQueue::process()

Since the code has been adapted to support VIRTIO_F_EVENT_IDX we use
Queue::needs_notification() to determine whether to signal the guest so
it is no longer necessary to check if there are any used descriptors. If
the feature is not negotiated then Queue::needs_notification() will
return true triggering an interrupt of the guest. Theoretically this
could be a spurious interrupt of the guest if there were no used used
descriptors but this is unlikely as we only generate used descriptors
for the control queue as a result of an interrupt of the VMM by the
guest.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>

show more ...


# 1fc3fef6 14-Mar-2022 Rob Bradford <robert.bradford@intel.com>

net_util: Use value returned from Queue::enable_notification()

This indicates if anything has been added to the available queue since
it was last iterated through. If it returns true then it is nece

net_util: Use value returned from Queue::enable_notification()

This indicates if anything has been added to the available queue since
it was last iterated through. If it returns true then it is necessary to
iterate through the queue again otherwise it is appropriate to break out
from the loop.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>

show more ...


# 77df4e67 26-Jan-2022 Sebastien Boeuf <sebastien.boeuf@intel.com>

vm-virtio: Define and implement Translatable trait

This new trait simplifies the address translation of a GuestAddress by
having GuestAddress implementing it.

The three crates virtio-devices, block

vm-virtio: Define and implement Translatable trait

This new trait simplifies the address translation of a GuestAddress by
having GuestAddress implementing it.

The three crates virtio-devices, block_util and net_util have been
updated accordingly to rely on this new trait, helping with code
readability and limiting the amount of duplicated code.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>

show more ...


# 8eed276d 26-Jan-2022 Sebastien Boeuf <sebastien.boeuf@intel.com>

vm-virtio: Define AccessPlatform trait

Moving the whole codebase to rely on the AccessPlatform definition from
vm-virtio so that we can fully remove it from virtio-queue crate.

Signed-off-by: Sebas

vm-virtio: Define AccessPlatform trait

Moving the whole codebase to rely on the AccessPlatform definition from
vm-virtio so that we can fully remove it from virtio-queue crate.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>

show more ...


# 4becb11a 26-Jan-2022 Sebastien Boeuf <sebastien.boeuf@intel.com>

virtio-devices: net: Handle descriptor address translation

Since we're trying to move away from the translation happening in the
virtio-queue crate, the device itself is performing the address
trans

virtio-devices: net: Handle descriptor address translation

Since we're trying to move away from the translation happening in the
virtio-queue crate, the device itself is performing the address
translation when needed.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>

show more ...


# 8ee253cd 17-Nov-2021 Wei Liu <liuwe@microsoft.com>

net_util: add safety comments for `impl ByteValued`

Signed-off-by: Wei Liu <liuwe@microsoft.com>


# f151a860 21-Oct-2021 Sebastien Boeuf <sebastien.boeuf@intel.com>

net_util: Fix error type

The type of error wasn't properly reflecting the issue.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>


# 0249e864 21-Oct-2021 Sebastien Boeuf <sebastien.boeuf@intel.com>

Move Cloud Hypervisor to virtio-queue crate

Relying on the vm-virtio/virtio-queue crate from rust-vmm which has been
copied inside the Cloud Hypervisor tree, the entire codebase is moved to
the new

Move Cloud Hypervisor to virtio-queue crate

Relying on the vm-virtio/virtio-queue crate from rust-vmm which has been
copied inside the Cloud Hypervisor tree, the entire codebase is moved to
the new definition of a Queue and other related structures.

The reason for this move is to follow the upstream until we get some
agreement for the patches that we need on top of that to make it
properly work with Cloud Hypervisor.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>

show more ...


# 5825ab2d 23-Jun-2021 Bo Chen <chen.bo@intel.com>

clippy: Address the issue 'needless-borrow'

Issue from beta verion of clippy:

Error: --> vm-virtio/src/queue.rs:700:59
|
700 | if let Some(used_event) = self.get_used_event(&mem)

clippy: Address the issue 'needless-borrow'

Issue from beta verion of clippy:

Error: --> vm-virtio/src/queue.rs:700:59
|
700 | if let Some(used_event) = self.get_used_event(&mem) {
| ^^^^ help: change this to: `mem`
|
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Bo Chen <chen.bo@intel.com>

show more ...


# b5bcdbaf 02-Jun-2021 Bo Chen <chen.bo@intel.com>

misc: Upgrade to use the vm-memory crate w/ dirty-page-tracking

As the first step to complete live-migration with tracking dirty-pages
written by the VMM, this commit patches the dependent vm-memory

misc: Upgrade to use the vm-memory crate w/ dirty-page-tracking

As the first step to complete live-migration with tracking dirty-pages
written by the VMM, this commit patches the dependent vm-memory crate to
the upstream version with the dirty-page-tracking capability. Most
changes are due to the updated `GuestMemoryMmap`, `GuestRegionMmap`, and
`MmapRegion` structs which are taking an additional generic type
parameter to specify what 'bitmap backend' is used.

The above changes should be transparent to the rest of the code base,
e.g. all unit/integration tests should pass without additional changes.

Signed-off-by: Bo Chen <chen.bo@intel.com>

show more ...


# 40dc3e7c 17-May-2021 Sebastien Boeuf <sebastien.boeuf@intel.com>

net_util: Introduce virtio-net control queue handling code

This code is ported from the net_util.rs in virtio-devices. The point
being to move it to the net_util crate so that it can later be reused

net_util: Introduce virtio-net control queue handling code

This code is ported from the net_util.rs in virtio-devices. The point
being to move it to the net_util crate so that it can later be reused
from vhost-user-net backend.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>

show more ...