On Fri, Feb 02, 2024 at 10:38:10AM +0100, Mattias Rönnblom wrote: > On 2024-02-01 17:59, Bruce Richardson wrote: > > On Wed, Jan 24, 2024 at 12:34:50PM +0100, Mattias Rönnblom wrote: > > > On 2024-01-19 18:43, Bruce Richardson wrote: > > > > Clarify the meaning of the NEW, FORWARD and RELEASE event types. > > > > For the fields in "rte_event" struct, enhance the comments on each to > > > > clarify the field's use, and whether it is preserved between enqueue and > > > > dequeue, and it's role, if any, in scheduling. > > > > > > > > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> > > > > --- > > > > <snip> > > > Is the normalized or unnormalized value that is preserved? > > > > > Very good point. It's the normalized & then denormalised version that is > > guaranteed to be preserved, I suspect. SW eventdevs probably preserve > > as-is, but HW eventdevs may lose precision. Rather than making this > > "implementation defined" or "not preserved" which would be annoying for > > apps, I think, I'm going to document this as "preserved, but with possible > > loss of precision". > > > > This makes me again think it may be worth noting that Eventdev -> API > priority normalization is (event.priority * PMD_LEVELS) / EVENTDEV_LEVELS > (rounded down) - assuming that's how it's supposed to be done - or something > to that effect. > Following my comment on the thread on the other patch about looking at numbers of bits of priority being valid, I did a quick check of the evdev PMDs by using grep for "max_event_priority_levels" in each driver. According to that (and resolving some #defines), I see:
0 - dpaa, dpaa2 1 - cnxk, dsw, octeontx, opdl 4 - sw 8 - dlb2, skeleton So it looks like switching to a bit-scheme is workable, where we measure supported event levels in powers-of-two only. [And we can cut down priority fields if we like]. Question for confirmation. For cases where the eventdev does not support per-event prioritization, I suppose we should say that the priority field is not preserved, as well as being ignored? /Bruce