nutanix / libvfio-user

framework for emulating devices in userspace
BSD 3-Clause "New" or "Revised" License
164 stars 51 forks source link

Describe the twin-socket feature in the spec #775

Closed mnissler-rivos closed 1 year ago

mnissler-rivos commented 1 year ago

Btw. we might want to keep this open while the implementation MR is still in flight in case we end up deciding to make changes.

jlevon commented 1 year ago

Sorry for the slow reply. On reflection I think I'd prefer two tweaks:

  1. s/enable/supported/
  2. put supported in the reply capabilities as well as the fd/fd index

My thinking here is that it's then much more like a negotiation of capabilities:

  1. client: I support twin socket, please enable it if you do too
  2. server: so do I, and here's the fd you should use

thoughts?

mnissler-rivos commented 1 year ago

Sorry for the slow reply. On reflection I think I'd prefer two tweaks:

1. s/enable/supported/

2. put supported in the reply capabilities as well as the fd/fd index

My thinking here is that it's then much more like a negotiation of capabilities:

1. client: I support twin socket, please enable it if you do too

2. server: so do I, and here's the fd you should use

thoughts?

Works for me. And I'm assuming clients will bail and close the connection on inconsistent replies (such as supported being true, but fd_index absent).

jlevon commented 1 year ago

And I'm assuming clients will bail and close the connection on inconsistent replies (such as supported being true, but fd_index absent).

yes