On 8/30/23 10:48, Stefano Garzarella wrote: > On Sun, Aug 27, 2023 at 08:29:30PM +0200, Laszlo Ersek wrote: >> The last patch in the series states and fixes the problem; prior patches >> only refactor the code. > > Thanks for the fix and great cleanup! > > I fully reviewed the series and LGTM. > > An additional step that we can take (not in this series) crossed my > mind, though. In some places we repeat the following pattern: > > vhost_user_write(dev, &msg, NULL, 0); > ... > > if (reply_supported) { > return process_message_reply(dev, &msg); > } > > So what about extending the vhost_user_write_msg() added in this series > to support also this cases and remove some code. > Or maybe integrate vhost_user_write_msg() in vhost_user_write().
Good idea, I'd just like someone else to do it -- and as you say, after this series :) This series is relatively packed with "thought" already (in the last patch), plus a week ago I knew absolutely nothing about vhost / vhost-user. (And, I read the whole blog series at <https://www.redhat.com/en/virtio-networking-series> in 1-2 days, while analyzing this issue, to understand the design of vhost.) So I'd prefer keeping my first contribution in this area limited -- what you are suggesting touches on some of the requests that require genuine responses, and I didn't want to fiddle with those. (I think your patch should be fine BTW!) Laszlo