[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Question] [vhost] Creating a vhost-user-vsock backend
From: |
DUO Labs |
Subject: |
[Question] [vhost] Creating a vhost-user-vsock backend |
Date: |
Tue, 3 Sep 2024 14:18:36 -0400 |
User-agent: |
Mozilla Thunderbird |
*Note: As it turns out, I posted this on the wrong mailing list at first, so
I'm reposting it here*
I've been studying the example given in `contrib/vhost-user-blk`, and trying to
match the code to what is in the standard
(https://docs.oasis-open.org/virtio/virtio/v1.3/csd01/virtio-v1.3-csd01.html#x1-3050002),
so I can use the code to create my own vhost-user-vsock server.
I think I almost understand it, but I don't get exactly how do you correlate
out_sg and in_sg to the header and ancillary data (for virtio-blk, it would
either be the data to be written or a buffer to read data into, and vsock would
be similar), respectively.
In virtio-blk, I see that there's an inhdr, and outhdr, but vsock doesn't have that, so
I'm not sure how to map the same concept. Similarly, does `elem->out_sg[0]` always
map to the header, and `elem->out_sg[1]` always map to the ancillary data? What about
when you are reading into a buffer --- should it always be read into
`elem->in_sg[0]`, or is that only for virtio-blk?
- [Question] [vhost] Creating a vhost-user-vsock backend,
DUO Labs <=