~/bend-docscommunity

src/virtio/vsock.bend checks

raw source on the hub · import 0x51718d1816cd36f20955e9590377c5e5/src/virtio/vsock.bend as Vsock

5 imports
import Base
import ../lib/u64.bend as U
import ../lib/bytes.bend as B
import ../vmm/abi.bend as V
import ./queue.bend as Q

Types

type Pkt source · line 79 · raw

Data

type VConn source · line 113 · raw

Data

state: 0 connecting (the guest asked; the host has not connected yet), 1 established, 2 requested (the host asked; the guest has not answered). tx: payload bytes sent to the guest; peer_alloc/peer_fwd: the guest's last advertised credit; fwd: guest bytes consumed; last_fwd: the fwd_cnt last advertised; held: bytes the host holds for the guest (VsReady); sent: how many of them reached the guest.

type Vsock source · line 119 · raw

Data

The device's state: the guest CID, connections, the next connection number and host port for host-initiated ones, and packets for the guest, oldest first.

type VsOut source · line 122 · raw

Data

type Pick source · line 151 · raw

Data

The connection with these ports and the others.

type Stg source · line 274 · raw

Data

A packet's payload when the tx pass staged it on the host (VmStage): its slot and length. NoStg: the payload, if any, came as bytes.

type TxItem source · line 556 · raw

Data

One transmitted packet: its header bytes and its staged payload.

type VsTxq source · line 559 · raw

Data

type VsRxq source · line 562 · raw

Data

type VsTx source · line 708 · raw

Data

type VsRx source · line 711 · raw

Data

type VsDat source · line 764 · raw

Data

The data pass's queue, whether it used a chain, and whether chains may remain (false once the queue ran dry or a buffer was too small).

type VsAll source · line 769 · raw

Data

The connections after the data pass, its state, and its commands (VsRelease for every hold that went out whole).

Definitions

def Vs.host_cid source · line 35 · raw

U32

def Vs.buf_alloc source · line 38 · raw

U32

def Vs.max_payload source · line 45 · raw

U32

The most payload a packet to the guest carries. Linux 6.8 posts rx buffers of a page less the socket buffer's overhead (about 3.7 KiB with the header): 3.5 KiB fits them; a packet that still does not fit a buffer is split there (Vsq.rx.split).

def Vs.max_out source · line 52 · raw

Nat

Caps on what a guest can make the device keep: packets queued for the guest that answer it (RSTs, credit updates on request; further ones are dropped), and connections (a REQUEST past the cap is refused with an RST and no host connect).

def Vs.max_conns source · line 55 · raw

Nat

def Vs.request source · line 58 · raw

U32

def Vs.response source · line 60 · raw

U32

def Vs.rst source · line 62 · raw

U32

def Vs.shutdown source · line 64 · raw

U32

def Vs.rw source · line 66 · raw

U32

def Vs.credit_update source · line 68 · raw

U32

def Vs.credit_request source · line 70 · raw

U32

def Vs.config source · line 73 · raw

@cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> List<&2, U32>

def Pkt.build source · line 82 · raw

@p:Pkt -> List<&2, U32>

def Pkt.parse.ok source · line 90 · raw

@ok:Bool -> @+bs:List<&2, U32> -> Maybe<&2, Pkt>

def Pkt.parse source · line 99 · raw

@+bs:List<&2, U32> -> Maybe<&2, Pkt>

A packet from its bytes; None when shorter than its header plus len.

def Vsock.new source · line 125 · raw

@cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> Vsock

def VConn.pkt source · line 129 · raw

@+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @c:VConn -> @op:U32 -> @flags:U32 -> @payload:List<&2, U32> -> List<&2, U32>

A packet of connection c to the guest.

def Vs.rst_for source · line 135 · raw

@+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @p:Pkt -> List<&2, U32>

A reply to a packet with no connection: RST with the ports swapped.

def VConn.id source · line 140 · raw

@c:VConn -> U32

def VConn.matches source · line 145 · raw

@c:VConn -> @+gport:U32 -> @+hport:U32 -> Bool

def Pick.add source · line 154 · raw

@c:VConn -> @p:Pick -> Pick

def Pick.got source · line 159 · raw

@hit:Bool -> @+c:VConn -> @rest:List<&2, VConn> -> @more:Pick -> Pick

def Vs.pick_ports source · line 166 · raw

@cs:List<&2, VConn> -> @+gport:U32 -> @+hport:U32 -> Pick

def Vs.pick_id source · line 173 · raw

@cs:List<&2, VConn> -> @+id:U32 -> Pick

def VConn.credit source · line 183 · raw

@c:VConn -> @+alloc:U32 -> @+fwd_cnt:U32 -> VConn

def VConn.avail source · line 190 · raw

@c:VConn -> U32

What a connection may send now: the guest's credit, and what the host holds that has not gone out.

def VConn.hold source · line 198 · raw

@c:VConn -> @+len:U32 -> VConn

The host now holds len more bytes for the guest.

def VConn.sent_more source · line 204 · raw

@c:VConn -> @+n:U32 -> VConn

n held bytes went to the guest.

def VConn.sent source · line 209 · raw

@c:VConn -> U32

def VConn.drained source · line 215 · raw

@c:VConn -> Bool

Whether the host holds bytes and all of them reached the guest.

def VConn.released source · line 220 · raw

@c:VConn -> VConn

def Vsock.with source · line 228 · raw

@vs:Vsock -> @conns:List<&2, VConn> -> @out:List<&2, List<&2, U32>> -> Vsock

def Vsock.queue source · line 234 · raw

@vs:Vsock -> @out:List<&2, List<&2, U32>> -> Vsock

Packets queued for the guest, the connections kept.

def Vsock.with_ctl source · line 241 · raw

@vs:Vsock -> @conns:List<&2, VConn> -> @p:List<&2, U32> -> Vsock

Vsock.with for a packet that answers the guest: it is dropped once Vs.max_out() packets wait for the guest.

def Vsock.cid source · line 247 · raw

@vs:Vsock -> 0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64

def Vsock.conns source · line 252 · raw

@vs:Vsock -> List<&2, VConn>

def Vs.merge source · line 258 · raw

@+cmds:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockCmd> -> @o:VsOut -> VsOut

Prepends earlier commands to a step's result.

def Vs.new_conn source · line 266 · raw

@vs:Vsock -> @+p:Pkt -> VsOut

def Stg.drop source · line 279 · raw

@s:Stg -> List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockCmd>

Frees a staged payload its packet did not use.

def Stg.len source · line 286 · raw

@s:Stg -> @payload:List<&2, U32> -> U32

def Stg.send source · line 293 · raw

@s:Stg -> @+id:U32 -> @payload:List<&2, U32> -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockCmd

def Vs.rw_in.fin source · line 302 · raw

@update:Bool -> @vs:Vsock -> @+c:VConn -> @+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @cmds:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockCmd> -> VsOut

RW: the payload goes to the host; a CREDIT_UPDATE follows once half the advertised buffer has been consumed since the last one.

def Vs.rw_in source · line 309 · raw

@+vs:Vsock -> @rest:List<&2, VConn> -> @c:VConn -> @payload:List<&2, U32> -> @+stg:Stg -> VsOut

def VConn.state source · line 321 · raw

@c:VConn -> @st:U32 -> VConn

def VConn.hport source · line 326 · raw

@c:VConn -> U32

def VConn.last_fwd source · line 332 · raw

@c:VConn -> VConn

Marks the current fwd_cnt as advertised.

def Vs.shutdown_in source · line 339 · raw

@both:Bool -> @no_send:Bool -> @vs:Vsock -> @rest:List<&2, VConn> -> @+c:VConn -> @+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> VsOut

SHUTDOWN from the guest: "will send no more" half-closes the host side; both flags end the connection (an RST answers, as the spec expects).

def Pkt.op source · line 349 · raw

@p:Pkt -> U32

def Pkt.flags source · line 354 · raw

@p:Pkt -> U32

def Pkt.payload source · line 359 · raw

@p:Pkt -> List<&2, U32>

def Vs.known.by source · line 364 · raw

@rw:Bool -> @rst:Bool -> @sd:Bool -> @resp:Bool -> @creq:Bool -> @+vs:Vsock -> @rest:List<&2, VConn> -> @+c:VConn -> @+p:Pkt -> @+stg:Stg -> VsOut

def Vs.known source · line 386 · raw

@vs:Vsock -> @rest:List<&2, VConn> -> @c:VConn -> @+p:Pkt -> @+stg:Stg -> VsOut

A guest packet for a known connection: its credit is recorded first. Only an RW takes a staged payload (the tx pass stages no other).

def Vs.open source · line 394 · raw

@full:Bool -> @+vs:Vsock -> @rest:List<&2, VConn> -> @+p:Pkt -> VsOut

A REQUEST for no connection: a new one, or an RST when Vs.max_conns() are open (full).

def Vs.unknown source · line 404 · raw

@is_req:Bool -> @is_rst:Bool -> @+vs:Vsock -> @+rest:List<&2, VConn> -> @+p:Pkt -> VsOut

A guest packet for no connection: a REQUEST opens one (Vs.open); an RST is dropped; anything else is answered with an RST (Vsock.with_ctl).

def Vs.route source · line 414 · raw

@pick:Pick -> @vs:Vsock -> @+p:Pkt -> @+stg:Stg -> VsOut

def Vs.packet source · line 426 · raw

@got:Maybe<&2, Pkt> -> @+vs:Vsock -> @+stg:Stg -> VsOut

def Vsock.guest_packet source · line 436 · raw

@vs:Vsock -> @bytes:List<&2, U32> -> VsOut

A packet the guest transmitted (header and payload).

def Pkt.head.ok source · line 441 · raw

@ok:Bool -> @+bs:List<&2, U32> -> Maybe<&2, Pkt>

The header of a packet the guest transmitted (44 bytes or more: the rest is ignored), its payload staged on the host (stg) or absent.

def Pkt.head source · line 448 · raw

@+bs:List<&2, U32> -> Maybe<&2, Pkt>

def Vsock.guest_staged source · line 451 · raw

@vs:Vsock -> @hdr:List<&2, U32> -> @+stg:Stg -> VsOut

def VConn.blocked source · line 459 · raw

@c:VConn -> Bool

Whether the host program is behind on this connection (bit 256 of state, which holds no other value that high): no credit goes to the guest then.

def VConn.set_blocked source · line 464 · raw

@c:VConn -> @on:Bool -> VConn

def Vs.event.on source · line 469 · raw

@ev:0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockEvent -> @+vs:Vsock -> @rest:List<&2, VConn> -> @+c:VConn -> VsOut

def Vs.event.conn source · line 495 · raw

@pick:Pick -> @vs:Vsock -> @ev:0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockEvent -> VsOut

def Vs.incoming source · line 506 · raw

@vs:Vsock -> @+id:U32 -> @+port:U32 -> VsOut

A host client asks for guest port port: a REQUEST from a fresh host port.

def Vs.event.id source · line 512 · raw

@ev:0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockEvent -> U32

def Vsock.host_event source · line 530 · raw

@+vs:Vsock -> @ev:0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockEvent -> VsOut

An event from the host's sockets.

def Vsock.drop_out source · line 539 · raw

@vs:Vsock -> Vsock

The same state with no packets queued for the guest.

def Vsock.backlog source · line 545 · raw

@vs:Vsock -> U32

Packets queued for the guest (host data waits in the host's buffer).

def Vsq.room source · line 566 · raw

@ds:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> U32

The total length of a chain's writable descriptors.

def Vsq.max_tx source · line 575 · raw

U32

The most bytes of one transmit chain: a header and 64 KiB of payload (a longer payload is cut). Only the header is read through Bend.

def Vsq.tx.stage source · line 581 · raw

@-R:Type -> @rw:Bool -> @+segs:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Iov> -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Stg>

What the tx pass makes of a chain whose header says op and len: an RW's payload staged on the host (as much of it as the chain holds, at most Vsq.max_tx() - 44 bytes), else nothing staged.

def Vsq.tx.item source · line 593 · raw

@-R:Type -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @+h:U32 -> @+r:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+hdr:List<&2, U32> -> @acc:List<&2, TxItem> -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, List<&2, TxItem>)>

Reads one transmit chain's header, stages its payload, pushes it used with length 0, and keeps the item.

def Vsq.tx.serve source · line 601 · raw

@-R:Type -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @c:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain -> @acc:List<&2, TxItem> -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, List<&2, TxItem>)>

def Vsq.tx.done source · line 610 · raw

@-R:Type -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @acc:List<&2, TxItem> -> @used:Bool -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsTxq>

def Vsq.tx.step source · line 615 · raw

@-R:Type -> @r:Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Maybe<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain>) -> @acc:List<&2, TxItem> -> @used:Bool -> @k:(@_:Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, List<&2, TxItem>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsTxq>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsTxq>

After a pop: stops on an empty queue, else serves the chain and continues with k.

def Vsq.tx.go source · line 627 · raw

@fuel:Nat -> @-R:Type -> @st:Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, List<&2, TxItem>) -> @used:Bool -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsTxq>

Pops and serves transmit chains, at most fuel of them; st is the queue and the items so far (newest first).

def Vsq.rx.deliver source · line 642 · raw

@-R:Type -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @c:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain -> @+frame:List<&2, U32> -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq>

Writes the header and the frame over a receive chain and pushes it used with 12 + frame length.

def Vsq.rx.fits source · line 651 · raw

@c:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain -> @+frame:List<&2, U32> -> Bool

Whether the header and the frame fit the chain's writable room.

def Vsq.rx.serve source · line 658 · raw

@-R:Type -> @fits:Bool -> @q0:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @c:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain -> @frame:List<&2, U32> -> @used:Bool -> @k:(@_:Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsRxq>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsRxq>

A popped chain: delivers the frame into it, or drops the frame and keeps the chain (continuing with q0, the queue before the pop).

def Vsq.rx.step source · line 670 · raw

@-R:Type -> @q0:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @r:Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Maybe<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain>) -> @+frame:List<&2, U32> -> @rest:List<&2, List<&2, U32>> -> @used:Bool -> @k:(@_:Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsRxq>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsRxq>

After a pop: stops on an empty queue with the frame and the rest left, else serves the chain and continues with k.

def Vsq.rx.go source · line 682 · raw

@frames:List<&2, List<&2, U32>> -> @-R:Type -> @st:Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Bool) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsRxq>

Delivers or drops each frame in turn; st is the queue and whether any chain was used. Every step takes one frame, so the frames bound the loop.

def Vsq.tx source · line 697 · raw

@-R:Type -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsTxq>

Takes every available chain of the tx queue (at most num): its header is read, an RW's payload staged, and the chain pushed used with length 0.

def Vsq.rx source · line 705 · raw

@-R:Type -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @frames:List<&2, List<&2, U32>> -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsRxq>

Delivers the queued control packets into the rx queue, one per available chain, in order; a packet larger than the chain's room is dropped and the chain kept.

def Vs.step source · line 714 · raw

@o:VsOut -> @it:TxItem -> VsOut

def Vs.apply source · line 720 · raw

@items:List<&2, TxItem> -> @o:VsOut -> VsOut

Runs the guest's packets through the protocol, in order.

def Vs.tx.out source · line 727 · raw

@o:VsOut -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @used:Bool -> VsTx

def Vs.tx.fin source · line 732 · raw

@-R:Type -> @vs:Vsock -> @t:VsTxq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsTx>

def Vsock.tx source · line 739 · raw

@-R:Type -> @vs:Vsock -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsTx>

The tx queue's packets through the protocol: host commands, and packets for the guest queued in the device state.

def Vsock.take_out source · line 744 · raw

@vs:Vsock -> Pair(Vsock, List<&2, List<&2, U32>>)

def Vsock.put_back source · line 749 · raw

@vs:Vsock -> @left:List<&2, List<&2, U32>> -> Vsock

def VConn.data_hdr source · line 773 · raw

@+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @c:VConn -> @+n:U32 -> List<&2, U32>

The header of a data packet of n bytes of c.

def Vs.rx.fill source · line 780 · raw

@-R:Type -> @+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+c:VConn -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @+h:U32 -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+n:U32 -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(VConn, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq)>

One data packet of n bytes of c into the chain (h, w): the header, then the held bytes from where c left off.

def Vs.rx.put.next source · line 790 · raw

@-R:Type -> @r:Pair(VConn, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq) -> @k:(@_:Pair(VConn, VsDat) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(VConn, VsDat)>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(VConn, VsDat)>

def Vs.rx.put source · line 797 · raw

@small:Bool -> @-R:Type -> @+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+n0:U32 -> @+c:VConn -> @q0:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @+h:U32 -> @+w:List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Desc> -> @+room:U32 -> @used:Bool -> @k:(@_:Pair(VConn, VsDat) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(VConn, VsDat)>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(VConn, VsDat)>

A buffer of room bytes: too small for a header and a byte stops the pass with the chain kept (q0); else a packet of what fits goes into it.

def Vs.rx.chain source · line 811 · raw

@-R:Type -> @+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+n0:U32 -> @+c:VConn -> @q0:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @r:Pair(0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq, Maybe<&2, 0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Chain>) -> @used:Bool -> @k:(@_:Pair(VConn, VsDat) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(VConn, VsDat)>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(VConn, VsDat)>

After a pop: no chain stops the pass; a chain takes a packet.

def Vs.rx.step source · line 824 · raw

@stop:Bool -> @-R:Type -> @+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+n0:U32 -> @+c:VConn -> @s:VsDat -> @k:(@_:Pair(VConn, VsDat) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(VConn, VsDat)>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(VConn, VsDat)>

One step for c: nothing to send (n0, what it may send, is 0) or no chain left ends it; else a chain is popped.

def VsDat.open source · line 838 · raw

@s:VsDat -> Bool

def Vs.rx.conn source · line 844 · raw

@fuel:Nat -> @-R:Type -> @+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @st:Pair(VConn, VsDat) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, Pair(VConn, VsDat)>

Packets for c while it may send and buffers come; fuel bounds the chains.

def Vs.rx.done.go source · line 855 · raw

@drained:Bool -> @+c:VConn -> Pair(VConn, List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockCmd>)

c once its pass is over: a hold that went out whole is released.

def Vs.rx.done source · line 862 · raw

@+c:VConn -> Pair(VConn, List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockCmd>)

def VsAll.add source · line 865 · raw

@r:Pair(VConn, List<&2, 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.VsockCmd>) -> @a:VsAll -> VsAll

def Vs.rx.after source · line 870 · raw

@-R:Type -> @p:Pair(VConn, VsDat) -> @k:(@_:VsDat -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsAll>) -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsAll>

def Vs.rx.conns source · line 878 · raw

@-R:Type -> @+cid:0x51718d1816cd36f20955e9590377c5e5/src/lib/u64.U64 -> @+fuel:Nat -> @cs:List<&2, VConn> -> @s:VsDat -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsAll>

The data pass over every connection, in order.

def Vs.rx.data.fin source · line 887 · raw

@vs:Vsock -> @a:VsAll -> VsRx

def Vs.rx.data source · line 892 · raw

@-R:Type -> @vs:Vsock -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> @used:Bool -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsRx>

def Vs.rx.fin source · line 899 · raw

@-R:Type -> @vs:Vsock -> @r:VsRxq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsRx>

def Vs.rx.go source · line 904 · raw

@-R:Type -> @t:Pair(Vsock, List<&2, List<&2, U32>>) -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsRx>

def Vsock.rx source · line 913 · raw

@-R:Type -> @vs:Vsock -> @q:0x51718d1816cd36f20955e9590377c5e5/src/virtio/queue.Vq -> 0x51718d1816cd36f20955e9590377c5e5/src/vmm/abi.Op<R, VsRx>

Delivers the control packets queued for the guest into posted rx buffers (those that find no buffer stay queued), then the host's held data.