OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-comment] vsock: define a maximum size for the packet data


On Tue, Feb 22, 2022 at 08:46:29AM +0000, Loghin, Laura wrote:

Hello,

I was thinking that this limit would be used on the TX path (because on the RX, the device is considered to be trusted it will add a shorter buffer). The size of the TX buffer would still be the one from the header or from its descriptor (this is another thing that I think should be explicitly mentioned in the spec even though it's pretty obvious; there is no mention at this moment about what `len` is). The

The size of the TX buffers should be the one from the descriptor. (Now we are using 2 buffers, one for the header and one for the payload, but it is an implementation details).

Then the `len` field in the header contains the amount of bytes used for the payload. So the buffer could be bigger then (hdr + payload).

For TX in the current implementation it never happens because of the way the Linux driver is written, but for RX it happens just this, because the driver allocates the buffer and the device can use only a part of it.

However I agree that we could describe the `len` field better in the specs, also because it's currently not really described.

If you want to send a patch, that would be great!

Thanks,
Stefano



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]