fuchsia.mem.Data & Buffer's deprecation

5 views
Skip to first unread message

Adam Perry

unread,
Oct 5, 2021, 1:22:14 PM10/5/21
to fidl-dev
I'm looking at the docs for fuchsia.mem.Data and I noticed that Buffer has been deprecated in favor of using a property on the VMO itself. Should this guidance also apply to Data since one of its variants is a Buffer? Should existing clients of Data migrate to a new "maybe-inline" type with only a VMO for the large variant?

--
Adam Perry

James Robinson

unread,
Oct 5, 2021, 2:20:20 PM10/5/21
to Adam Perry, fidl-dev
Hi Adam,

I think fuchsia.mem/Data is fine (although it's tricky to use correctly) and we should introduce a VMO entry to the union to replace the Buffer member. Doing this will be a bit difficult as there are many users of fuchsia.mem/Data in the system but could be done in the following way:

- Add a VMO entry to the union, but do not set it anywhere
- Teach all of the codepaths and libraries that consume fuchsia.mem/Data how to consume data from a VMO
- Wait at least one Fuchsia milestone
- Teach codepaths and libraries that produce fuchsia.mem/Data instances to write to the VMO instead of the Buffer
- Wait at least one Fuchsia milestone
- Remove the fuchsia.mem/Buffer entry from the union.

Note that this is only possible because Data is a flexible union. There are also some clones of this type that are structs or non flexible unions that use Buffer - those should migrate to use a flexible type (such as fuchsia.mem/Data) or one that knows about VMOs.

- James

--
All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
---
You received this message because you are subscribed to the Google Groups "fidl-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fidl-dev+u...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/fidl-dev/CA%2BvriKfx_SR4G6gnr4C0S5sdtn1KGd9VUNhidhMPCyc5EBWggw%40mail.gmail.com.

Adam Perry

unread,
Oct 6, 2021, 4:24:02 PM10/6/21
to James Robinson, fidl-dev
That makes sense to me! Is fxb/85452 the right place to track this?
--
Adam Perry

James Robinson

unread,
Oct 6, 2021, 4:26:19 PM10/6/21
to Adam Perry, fidl-dev
Yup!

https://groups.google.com/a/fuchsia.dev/g/api-council/c/UJBAYTYpamU/m/goPElqsnBQAJ is a longer email about fuchsia.mem/Buffer deprecation. Perhaps I should have cross-posted that - the api-council list is open the world, but difficult to follow as a non API council member since there's no way to subscribe currently as far as I know.

- James

Reply all
Reply to author
Forward
0 new messages