[dpdk-dev] [RFC 11/15] eventdev: reserve fields in timer object

Stephen Hemminger stephen at networkplumber.org
Tue Aug 24 17:10:52 CEST 2021


On Tue, 24 Aug 2021 01:10:15 +0530
<pbhagavatula at marvell.com> wrote:

> From: Pavan Nikhilesh <pbhagavatula at marvell.com>
> 
> Reserve fields in rte_event_timer data structure to address future
> use cases.
> Also, remove volatile from rte_event_timer.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>

Reserve fields are not a good idea. They don't solve future API/ABI problems.

The issue is that you need to zero them and check they are zero otherwise
they can't safely be used later.  This happened with the Linux kernel
system calls where in several cases a flag field was added for future.
The problem is that old programs would work with any garbage in the flag
field, and therefore the flag could not be extended.

A better way to make structures internal opaque objects that
can be resized.  Why is rte_event_timer_adapter exposed in API?


More information about the dev mailing list