From: "Carrillo, Erik G" <erik.g.carrillo@intel.com>
To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>,
Stephen Hemminger <stephen@networkplumber.org>
Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [EXT] Re: [RFC 11/15] eventdev: reserve fields in timer object
Date: Tue, 7 Sep 2021 21:02:05 +0000 [thread overview]
Message-ID: <SA2PR11MB5196BAC9E84A9C154786B812B9D39@SA2PR11MB5196.namprd11.prod.outlook.com> (raw)
In-Reply-To: <PH0PR18MB4086703F21517AD8967B6C68DECD9@PH0PR18MB4086.namprd18.prod.outlook.com>
> -----Original Message-----
> From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
> Sent: Wednesday, September 1, 2021 1:48 AM
> To: Stephen Hemminger <stephen@networkplumber.org>; Carrillo, Erik G
> <erik.g.carrillo@intel.com>
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; dev@dpdk.org
> Subject: RE: [EXT] Re: [dpdk-dev] [RFC 11/15] eventdev: reserve fields in
> timer object
>
> >On Tue, 24 Aug 2021 01:10:15 +0530
> ><pbhagavatula@marvell.com> wrote:
> >
> >> From: Pavan Nikhilesh <pbhagavatula@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@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.
>
> The change is in rte_event_timer which is a fastpath object similar to
> rte_mbuf.
> I think fast path objects don't have the above mentioned caveat.
>
> >
> >A better way to make structures internal opaque objects that can be
> >resized. Why is rte_event_timer_adapter exposed in API?
>
> rte_event_timer_adapter has similar API semantics of rte_mempool, the
> objects of the adapter are rte_event_timer objects which have information
> of the timer state.
>
> Erik,
>
> I think we should move the fields in current rte_event_timer structure
> around, currently we have
>
> struct rte_event_timer {
> struct rte_event ev;
> volatile enum rte_event_timer_state state;
> x-------x 4 byte hole x---------x
> uint64_t timeout_ticks;
> uint64_t impl_opaque[2];
> uint8_t user_meta[0];
> } __rte_cache_aligned;
>
> Move to
>
> struct rte_event_timer {
> struct rte_event ev;
> uint64_t timeout_ticks;
> uint64_t impl_opaque[2];
> uint64_t rsvd;
> enum rte_event_timer_state state;
> uint8_t user_meta[0];
> } __rte_cache_aligned;
>
> Since its cache aligned, the size doesn't change.
>
> Thoughts?
>
I'm not seeing any problem with rearranging the members. However, you originally had " uint64_t rsvd[2];" and above, it's just one variable. Did you mean to make it an array?
The following also appears to have no holes:
$ pahole -C rte_event_timer eventdev_rte_event_timer_adapter.c.o
struct rte_event_timer {
struct rte_event ev; /* 0 16 */
uint64_t timeout_ticks; /* 16 8 */
uint64_t impl_opaque[2]; /* 24 16 */
uint64_t rsvd[2]; /* 40 16 */
enum rte_event_timer_state state; /* 56 4 */
uint8_t user_meta[]; /* 60 0 */
/* size: 64, cachelines: 1, members: 6 */
/* padding: 4 */
} __attribute__((__aligned__(64)));
Thanks,
Erik
> Thanks,
> Pavan.
next prev parent reply other threads:[~2021-09-07 21:02 UTC|newest]
Thread overview: 119+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-23 19:40 [dpdk-dev] [RFC 01/15] eventdev: make driver interface as internal pbhagavatula
2021-08-23 19:40 ` [dpdk-dev] [RFC 02/15] eventdev: separate internal structures pbhagavatula
2021-10-14 9:11 ` Jerin Jacob
2021-08-23 19:40 ` [dpdk-dev] [RFC 03/15] eventdev: move eventdevs globals to hugepage mem pbhagavatula
2021-08-23 19:40 ` [dpdk-dev] [RFC 04/15] eventdev: move inline APIs into separate structure pbhagavatula
2021-09-08 12:03 ` Kinsella, Ray
2021-08-23 19:40 ` [dpdk-dev] [RFC 05/15] eventdev: add helper functions for new driver API pbhagavatula
2021-09-08 12:04 ` Kinsella, Ray
2021-08-23 19:40 ` [dpdk-dev] [RFC 06/15] eventdev: use new API for inline functions pbhagavatula
2021-08-30 14:41 ` Jayatheerthan, Jay
2021-08-30 14:46 ` David Marchand
2021-10-02 20:32 ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula
2021-08-23 19:40 ` [dpdk-dev] [RFC 07/15] eventdev: make drivers to use new API pbhagavatula
2021-09-08 6:43 ` Hemant Agrawal
2021-08-23 19:40 ` [dpdk-dev] [RFC 08/15] eventdev: hide event device related structures pbhagavatula
2021-08-23 19:40 ` [dpdk-dev] [RFC 09/15] eventdev: hide timer adapter pmd file pbhagavatula
2021-08-23 19:40 ` [dpdk-dev] [RFC 10/15] eventdev: remove rte prefix for internal structs pbhagavatula
2021-08-30 14:42 ` Jayatheerthan, Jay
2021-08-23 19:40 ` [dpdk-dev] [RFC 11/15] eventdev: reserve fields in timer object pbhagavatula
2021-08-23 20:42 ` Carrillo, Erik G
2021-08-24 5:16 ` Pavan Nikhilesh Bhagavatula
2021-08-24 15:10 ` Stephen Hemminger
2021-09-01 6:48 ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula
2021-09-07 21:02 ` Carrillo, Erik G [this message]
2021-09-07 21:31 ` [dpdk-dev] " Stephen Hemminger
2021-08-23 19:40 ` [dpdk-dev] [RFC 12/15] eventdev: move timer adapters memory to hugepage pbhagavatula
2021-08-24 13:50 ` Carrillo, Erik G
2021-09-01 6:30 ` Pavan Nikhilesh Bhagavatula
2021-08-23 19:40 ` [dpdk-dev] [RFC 13/15] eventdev: promote event vector API to stable pbhagavatula
2021-08-30 14:43 ` Jayatheerthan, Jay
2021-09-08 12:05 ` Kinsella, Ray
2021-08-23 19:40 ` [dpdk-dev] [RFC 14/15] eventdev: make trace APIs internal pbhagavatula
2021-08-30 14:47 ` Jayatheerthan, Jay
2021-08-23 19:40 ` [dpdk-dev] [RFC 15/15] eventdev: promote trace variables to stable pbhagavatula
2021-09-08 12:06 ` Kinsella, Ray
2021-08-24 7:43 ` [dpdk-dev] [RFC 01/15] eventdev: make driver interface as internal Mattias Rönnblom
2021-08-24 7:47 ` Pavan Nikhilesh Bhagavatula
2021-08-24 8:05 ` Pavan Nikhilesh Bhagavatula
2021-08-30 10:25 ` Mattias Rönnblom
2021-08-30 16:00 ` [dpdk-dev] [RFC] eventdev: uninline inline API functions Mattias Rönnblom
2021-08-31 12:28 ` Jerin Jacob
2021-08-31 12:34 ` Mattias Rönnblom
2021-09-28 9:56 ` [dpdk-dev] [RFC 01/15] eventdev: make driver interface as internal Jerin Jacob
2021-10-03 8:26 ` [dpdk-dev] [PATCH v2 01/13] " pbhagavatula
2021-10-03 8:26 ` [dpdk-dev] [PATCH v2 02/13] eventdev: separate internal structures pbhagavatula
2021-10-03 8:26 ` [dpdk-dev] [PATCH v2 03/13] eventdev: allocate max space for internal arrays pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v2 04/13] eventdev: move inline APIs into separate structure pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v2 05/13] eventdev: use new API for inline functions pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v2 06/13] eventdev: hide event device related structures pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v 07/13] eventdev: hide timer adapter PMD file pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v2 " pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v2 08/13] eventdev: remove rte prefix for internal structs pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v2 09/13] eventdev: rearrange fields in timer object pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v2 10/13] eventdev: move timer adapters memory to hugepage pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v2 11/13] eventdev: promote event vector API to stable pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v2 12/13] eventdev: make trace APIs internal pbhagavatula
2021-10-03 8:27 ` [dpdk-dev] [PATCH v2 13/13] eventdev: mark trace variables as internal pbhagavatula
2021-10-06 6:49 ` [dpdk-dev] [PATCH v3 01/14] eventdev: make driver interface " pbhagavatula
2021-10-06 6:49 ` [dpdk-dev] [PATCH v3 02/14] eventdev: separate internal structures pbhagavatula
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 03/14] eventdev: allocate max space for internal arrays pbhagavatula
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 04/14] eventdev: move inline APIs into separate structure pbhagavatula
2021-10-14 9:20 ` Jerin Jacob
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 05/14] drivers/event: invoke probing finish function pbhagavatula
2021-10-14 9:22 ` Jerin Jacob
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 06/14] eventdev: use new API for inline functions pbhagavatula
2021-10-11 9:51 ` Gujjar, Abhinandan S
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 07/14] eventdev: hide event device related structures pbhagavatula
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 08/14] eventdev: hide timer adapter PMD file pbhagavatula
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 09/14] eventdev: remove rte prefix for internal structs pbhagavatula
2021-10-11 9:58 ` Gujjar, Abhinandan S
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 10/14] eventdev: rearrange fields in timer object pbhagavatula
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 11/14] eventdev: move timer adapters memory to hugepage pbhagavatula
2021-10-07 20:49 ` Carrillo, Erik G
2021-10-08 5:38 ` Pavan Nikhilesh Bhagavatula
2021-10-08 15:57 ` Carrillo, Erik G
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 12/14] eventdev: promote event vector API to stable pbhagavatula
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 13/14] eventdev: make trace APIs internal pbhagavatula
2021-10-11 9:59 ` Gujjar, Abhinandan S
2021-10-06 6:50 ` [dpdk-dev] [PATCH v3 14/14] eventdev: mark trace variables as internal pbhagavatula
2021-10-06 7:11 ` David Marchand
2021-10-14 9:28 ` Jerin Jacob
2021-10-14 9:05 ` [dpdk-dev] [PATCH v3 01/14] eventdev: make driver interface " Jerin Jacob
2021-10-14 9:08 ` Jerin Jacob
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 " pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 02/14] eventdev: separate internal structures pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 03/14] eventdev: allocate max space for internal arrays pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 04/14] eventdev: move inline APIs into separate structure pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 05/14] drivers/event: invoke probing finish function pbhagavatula
2021-10-17 15:34 ` Hemant Agrawal
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 06/14] eventdev: use new API for inline functions pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 07/14] eventdev: hide event device related structures pbhagavatula
2021-10-18 7:07 ` Harman Kalra
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 08/14] eventdev: hide timer adapter PMD file pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 09/14] eventdev: remove rte prefix for internal structs pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 10/14] eventdev: rearrange fields in timer object pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 11/14] eventdev: move timer adapters memory to hugepage pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 12/14] eventdev: promote event vector API to stable pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 13/14] eventdev: make trace APIs internal pbhagavatula
2021-10-15 19:02 ` [dpdk-dev] [PATCH v4 14/14] eventdev: mark trace variables as internal pbhagavatula
2021-10-17 5:58 ` Jerin Jacob
2021-10-18 15:06 ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula
2021-10-19 7:01 ` David Marchand
2021-10-17 15:35 ` [dpdk-dev] [PATCH v4 01/14] eventdev: make driver interface " Hemant Agrawal
2021-10-18 23:35 ` [dpdk-dev] [PATCH v5 " pbhagavatula
2021-10-18 23:35 ` [dpdk-dev] [PATCH v5 02/14] eventdev: separate internal structures pbhagavatula
2021-10-18 23:35 ` [dpdk-dev] [PATCH v5 03/14] eventdev: allocate max space for internal arrays pbhagavatula
2021-10-18 23:35 ` [dpdk-dev] [PATCH v5 04/14] eventdev: move inline APIs into separate structure pbhagavatula
2021-10-18 23:36 ` [dpdk-dev] [PATCH v5 05/14] drivers/event: invoke probing finish function pbhagavatula
2021-10-18 23:36 ` [dpdk-dev] [PATCH v5 06/14] eventdev: use new API for inline functions pbhagavatula
2021-10-18 23:36 ` [dpdk-dev] [PATCH v5 07/14] eventdev: hide event device related structures pbhagavatula
2021-10-18 23:36 ` [dpdk-dev] [PATCH v5 08/14] eventdev: hide timer adapter PMD file pbhagavatula
2021-10-18 23:36 ` [dpdk-dev] [PATCH v5 09/14] eventdev: remove rte prefix for internal structs pbhagavatula
2021-10-18 23:36 ` [dpdk-dev] [PATCH v5 10/14] eventdev: rearrange fields in timer object pbhagavatula
2021-10-18 23:36 ` [dpdk-dev] [PATCH v5 11/14] eventdev: move timer adapters memory to hugepage pbhagavatula
2021-10-20 20:24 ` Carrillo, Erik G
2021-10-18 23:36 ` [dpdk-dev] [PATCH v5 12/14] eventdev: promote event vector API to stable pbhagavatula
2021-10-18 23:36 ` [dpdk-dev] [PATCH v5 13/14] eventdev: make trace APIs internal pbhagavatula
2021-10-18 23:36 ` [dpdk-dev] [PATCH v5 14/14] eventdev: mark trace variables as internal pbhagavatula
2021-10-20 4:01 ` [dpdk-dev] [PATCH v5 01/14] eventdev: make driver interface " Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SA2PR11MB5196BAC9E84A9C154786B812B9D39@SA2PR11MB5196.namprd11.prod.outlook.com \
--to=erik.g.carrillo@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=konstantin.ananyev@intel.com \
--cc=pbhagavatula@marvell.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).