From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 144A8A053A; Tue, 4 Aug 2020 18:03:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 97DB92BA8; Tue, 4 Aug 2020 18:03:33 +0200 (CEST) Received: from mail-il1-f196.google.com (mail-il1-f196.google.com [209.85.166.196]) by dpdk.org (Postfix) with ESMTP id F1399F04 for ; Tue, 4 Aug 2020 18:03:31 +0200 (CEST) Received: by mail-il1-f196.google.com with SMTP id t18so34678884ilh.2 for ; Tue, 04 Aug 2020 09:03:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=P6iS52tXzt6vJO+qSGH3kE7DM8o/fOYDyzbUE5zQnLU=; b=Q1qBxyNIEUBwZJFuvmiaSqFvOs43Q7AvERuBtt8z5ksz+vmYoXvkXGtPnuTo+YxEFg da1NGlvTlSfRJqMXdPA9UwnBYiyCHBLHCGdj8KsyXnLok0Q1qbMaoqYbGOscuBa7rDD3 u1DifF2fnmCKWfnJr2mAOqLczzjiEVie79bg/iCgz1anZNYq+oHxYFrbPq8Y61uZgu59 INCmB+7j9Zdv7QUIyeJeF7ZKwp9+2o6BwHBJPefjFj7RUz7mWYdJ61DCYzN0tTBmZmZp /vnS2CvIfr6KN+xC/a6w76048z3MUY8yI3hVsderLjzVZm3itZHt2bihWGEQtfrYaDYr VOTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=P6iS52tXzt6vJO+qSGH3kE7DM8o/fOYDyzbUE5zQnLU=; b=k1EA0iPte/NfA1aZXNTyeo9rsiTBJFsqcyrVvZdo4xtQYL5lH4ZyWdeX/1Xy3AGVDT uEKCK0IfAgAEe/Czjjt2RNkch/ZEr5H+IfItm1HZeGTeuc+LH9xTeUwnqW0ILpSLksyn 34amkpFWZAW+IGrg4lPxZmzUyXxRUikz5NlaLW/1zrDq8YnrzV+kyUIjqc80D1Exoyoq 7qI3gobDR3DFGIEpOibTRK6PU7z18cdJ9vUABjuiAP5lFbEWaKr8extbdWssCTHZQqTW L1DT1ayJ/n1LajY5XpTMNUJT9KxhTy+fYyWF+t8ihE8AjD9b+7TFwOnbdisE25sP6NIM l8LQ== X-Gm-Message-State: AOAM533VuldaUx5CtsY35JbrtyerKf7oucILjMlEnohLSghlHU0N+DAF LUZniQ6L0HtzTjl59cnNsefNDfz3FFyTSqsu/lY= X-Google-Smtp-Source: ABdhPJzi01OTrklVr9SCS6Ql8BygeY1OsAtM0vPRE2uHibofgk6Cw4UaMH+3PceQfMAQElsDaCR5JfgA8Jfhur34Na0= X-Received: by 2002:a92:6a07:: with SMTP id f7mr5607626ilc.271.1596557011236; Tue, 04 Aug 2020 09:03:31 -0700 (PDT) MIME-Version: 1.0 References: <20200802105137.1666-1-pbhagavatula@marvell.com> <20200803072903.1209-1-pbhagavatula@marvell.com> <20200804104153.GA1464@bricha3-MOBL.ger.corp.intel.com> <20200804142451.GA1704@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20200804142451.GA1704@bricha3-MOBL.ger.corp.intel.com> From: Jerin Jacob Date: Tue, 4 Aug 2020 21:33:14 +0530 Message-ID: To: Bruce Richardson Cc: Pavan Nikhilesh , Jerin Jacob , Ray Kinsella , Neil Horman , John McNamara , Marko Kovacevic , dpdk-dev , Thomas Monjalon , David Marchand Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2] doc: add reserve fields to eventdev public structures X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Aug 4, 2020 at 7:55 PM Bruce Richardson wrote: > > On Tue, Aug 04, 2020 at 05:07:12PM +0530, Jerin Jacob wrote: > > On Tue, Aug 4, 2020 at 4:12 PM Bruce Richardson > > wrote: > > > > > > On Mon, Aug 03, 2020 at 12:59:03PM +0530, pbhagavatula@marvell.com wrote: > > > > From: Pavan Nikhilesh > > > > > > > > Add 64 byte padding at the end of event device public structure to allow > > > > future extensions. > > > > > > > > Signed-off-by: Pavan Nikhilesh > > > > Acked-by: Jerin Jacob > > > > --- > > > > v2 Changes: > > > > - Modify commit title. > > > > - Add patch reference to doc. > > > > > > > > doc/guides/rel_notes/deprecation.rst | 11 +++++++++++ > > > > 1 file changed, 11 insertions(+) > > > > > > > > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst > > > > index ea4cfa7a4..ec5db68e9 100644 > > > > --- a/doc/guides/rel_notes/deprecation.rst > > > > +++ b/doc/guides/rel_notes/deprecation.rst > > > > @@ -151,3 +151,14 @@ Deprecation Notices > > > > Python 2 support will be completely removed in 20.11. > > > > In 20.08, explicit deprecation warnings will be displayed when running > > > > scripts with Python 2. > > > > + > > > > +* eventdev: A 64 byte padding is added at the end of the following structures > > > > + in event device library to support future extensions: > > > > + ``rte_event_crypto_adapter_conf``, ``rte_event_eth_rx_adapter_conf``, > > > > + ``rte_event_eth_rx_adapter_queue_conf``, ``rte_event_eth_tx_adapter_conf``, > > > > + ``rte_event_timer_adapter_conf``, ``rte_event_timer_adapter_info``, > > > > + ``rte_event_dev_info``, ``rte_event_dev_config``, ``rte_event_queue_conf``, > > > > + ``rte_event_port_conf``, ``rte_event_timer_adapter``, > > > > + ``rte_event_timer_adapter_data``. > > > > + Reference: > > > > + http://patches.dpdk.org/project/dpdk/list/?series=10728&archive=both&state=* > > > > -- > > > > > > I don't like this idea of adding lots of padding to the ends of these > > > structures. For some structures, such as the public arrays for devices it > > > may be necessary, but for all the conf structures passed as parameters to > > > functions I think we can do better. Since these structures are passed by > > > the user to various functions, function versioning can be used to ensure > > > that the correct function in eventdev is always called. From there to the > > > individual PMDs, we can implement ABI compatibility by either: > > > 1. including the length of the struct as a parameter to the driver. (This is > > > a bit similar to my proposal for rawdev [1]) > > > 2. including the ABI version as a parameter to the driver. > > > > But, Will the above solution work if the application is dependent on > > struct size? > > i.e change of s1 size will change offset of s3 i.e > > app_sepecific_struct_s3. Right? > > i.e DPDK version should not change the offset of s3. Right? > > > > example, > > struct app_struct { > > struct dpdk_public_struct_s1 s1; > > struct dpdk_public_struct_s2 s2; > > struct app_sepecific_struct_s3 s3; > > } > > > Not sure what exactly you mean here. The actual offsets and sizes of the > structs will obviously change as you change the struct, but the end > compiled app has no idea of structs, all it knows of is offsets, which is > why you provide ABI compatible versions of the functions which use "legacy" > copies of the structs to ensure correct offsets. It's pretty much standard > practice for ABI versioning. Currently, We have only function versioning(not structure versioning). Are you suggesting having structure versioning? Will it complicate the code in terms of readability and supporting multiple structure versions aginst its support functions. > > The real complication arises because the actual eventdev driver functions > are not called directly with the linker resolving symbol versioning. > Instead they are called using function pointers from the code. This is why > one needs to add in the additional parameter to the driver APIs so that the > ABI info - be it struct size or version - can be passed from the versioned > eventdev library function through to the driver. If I understand it correctly, it is easy for rawdev subsystem as config structure as _opaque_. But in the case for ethdev, cryptodev, eventdev, config structure are not opaque. If we take structure versioning, Is n't call for adding structure version change to functions that's been associated with(Kind of M x N case to make a structure change. Here M means offending structure to make change and N means function associated with structure) > > Regards, > /Bruce