Skip to content

Commit d0e3fe2

Browse files
authored
Merge pull request #14 from rust-osdev/VIRTIO_NET_F_GUEST_USO
feat(virtio-net): add `VIRTIO_NET_F_GUEST_USO{4,6}`
2 parents fcbb562 + 1317ec5 commit d0e3fe2

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/features.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,14 @@ pub mod net {
421421
#[doc(alias = "VIRTIO_NET_F_CTRL_MAC_ADDR")]
422422
const CTRL_MAC_ADDR = 1 << 23;
423423

424+
/// Driver can receive USOv4 packets.
425+
#[doc(alias = "VIRTIO_NET_F_GUEST_USO4")]
426+
const GUEST_USO4 = 1 << 54;
427+
428+
/// Driver can receive USOv6 packets.
429+
#[doc(alias = "VIRTIO_NET_F_GUEST_USO6")]
430+
const GUEST_USO6 = 1 << 55;
431+
424432
/// Device can receive USO packets. Unlike UFO
425433
/// (fragmenting the packet) the USO splits large UDP packet
426434
/// to several segments when each of these smaller packets has UDP header.
@@ -469,6 +477,8 @@ pub mod net {
469477
Self::GUEST_TSO6 => Self::GUEST_CSUM,
470478
Self::GUEST_ECN => Self::GUEST_TSO4 | Self::GUEST_TSO6,
471479
Self::GUEST_UFO => Self::GUEST_CSUM,
480+
Self::GUEST_USO4 => Self::GUEST_CSUM,
481+
Self::GUEST_USO6 => Self::GUEST_CSUM,
472482
Self::HOST_TSO4 => Self::CSUM,
473483
Self::HOST_TSO6 => Self::CSUM,
474484
Self::HOST_ECN => Self::HOST_TSO4 | Self::HOST_TSO6,

0 commit comments

Comments
 (0)