You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operations on the mock queues are usually done through the load and store methods of Ref. While this was initially convenient, it makes harder to implement checks or conversions (such as endianess transformations) for certain fields. It's also less readable, as the developer needs to identify what's being read or written by its location in the ring.
I see two options to improve this:
Avoid returning Ref and ArrayRef from SplitQueueRing, implementing instead methods with concrete types for each data field being accessed.
Avoid the use of primitive types in tests, always wrapping them in structs with descriptive names and accessor methods.
Option (1) sounds more reasonable to me, but I don't have an strong opinion about them.
The text was updated successfully, but these errors were encountered:
Operations on the mock queues are usually done through the
load
andstore
methods ofRef
. While this was initially convenient, it makes harder to implement checks or conversions (such as endianess transformations) for certain fields. It's also less readable, as the developer needs to identify what's being read or written by its location in the ring.I see two options to improve this:
Ref
andArrayRef
fromSplitQueueRing
, implementing instead methods with concrete types for each data field being accessed.Option (1) sounds more reasonable to me, but I don't have an strong opinion about them.
The text was updated successfully, but these errors were encountered: