vhost-device icon indicating copy to clipboard operation
vhost-device copied to clipboard

sound: use descriptor_utils.rs to manipulate requests

Open MatiasVara opened this issue 2 years ago • 6 comments

Summary of the PR

This commit makes device.rs to use descriptor_utils.rs API to read/write requests independent of the descriptor distribution. This is a draft PR in which I am still working on.

Thanks for the comments.

Requirements

Before submitting your PR, please make sure you addressed the following requirements:

  • [x] All commits in this PR are signed (with git commit -s), and the commit message has max 60 characters for the summary and max 75 characters for each description line.
  • [x] All added/changed functionality has a corresponding unit/integration test.
  • [x] All added/changed public-facing functionality has entries in the "Upcoming Release" section of CHANGELOG.md (if no such section exists, please create one).
  • [x] Any newly added unsafe code is properly documented.

MatiasVara avatar Dec 15 '23 09:12 MatiasVara

@Ablu @epilys feel free to comment/review. I'll keep it as a draft until virtio-queue is released. Thanks!

MatiasVara avatar Feb 08 '24 15:02 MatiasVara

did a quick pass, mostly the let ... else {return Err(...)} pattern confuses me a bit. I think so far we mostly just used let foo = (...).map_err(Error::WrappingErrror)?

Thanks @Ablu, I will correct that.

MatiasVara avatar Feb 14 '24 10:02 MatiasVara

@Ablu since you have reviewed this earlier, can you do it again please ?

vireshk avatar Apr 25 '24 06:04 vireshk

I still do not like that in https://github.com/MatiasVara/vhost-device/blob/b1fcfcacb0ad0c1594951b0bba022958c90b25ae/vhost-device-sound/src/lib.rs#L312, this PR uses a descriptor. Shall I address that in this PR or in a new one? I shall not use response_descriptor.

MatiasVara avatar Apr 25 '24 10:04 MatiasVara

I still do not like that in https://github.com/MatiasVara/vhost-device/blob/b1fcfcacb0ad0c1594951b0bba022958c90b25ae/vhost-device-sound/src/lib.rs#L312, this PR uses a descriptor. Shall I address that in this PR or in a new one? I shall not use response_descriptor.

How difficult do you think it is? The best thing would be to do it now, but if too difficult, we can merge the code as it is now and then do it later.

stefano-garzarella avatar May 08 '24 14:05 stefano-garzarella

I still do not like that in https://github.com/MatiasVara/vhost-device/blob/b1fcfcacb0ad0c1594951b0bba022958c90b25ae/vhost-device-sound/src/lib.rs#L312, this PR uses a descriptor. Shall I address that in this PR or in a new one? I shall not use response_descriptor.

How difficult do you think it is? The best thing would be to do it now, but if too difficult, we can merge the code as it is now and then do it later.

I agree the best would be to address that in this PR. I will update the PR soon.

MatiasVara avatar May 13 '24 09:05 MatiasVara

I just updated the PR based on last comments. Feel free to review @stefano-garzarella @Ablu

MatiasVara avatar Jun 05 '24 12:06 MatiasVara

@MatiasVara great work! LGTM!

stefano-garzarella avatar Jun 19 '24 09:06 stefano-garzarella

@stsquad @vireshk @epilys please, can you take a look?

stefano-garzarella avatar Jul 16 '24 10:07 stefano-garzarella