-
I am integrating bundles into helio/dragonfly but I am having trouble to understand how bundles are extended.
so based on my understanding, I could add non-contiguous ids (i.e. 2, 5, 7, 18) to the ring. Moreover, their order can be arbitrary. In fact it will be arbitrary when I reinsert them on completion. Now given all this, how can we advance a buffer id when processing a bundle CQE? the docs say:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 14 replies
-
They are contiguous in the sense that they are consumed contiguously from the buffer ring. So if you add buffer IDs 0, 1, 2, 3 - then that's the order in which they are returned to you. Same if you add 5, 4, 3, 2, 1, then you'd get buffer ID 5 set and if it's a bundle, then 4, 3, 2, 1 may be the next ones. If they are distontig in your buffer ring, then you could always just iterate the buffer ring on completions to see which ones completed. |
Beta Was this translation helpful? Give feedback.
Sorry I'm rambling, I mean previous head. My point is that this level of indirection already exists, it's your buffer ring itself, just indexed by a cached head. You can obviously have a separate table that's indexed by bid, I guess that makes sense too.