DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Neil Horman <nhorman@tuxdriver.com>,
	John McNamara <john.mcnamara@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	David Marchand <david.marchand@redhat.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>,
	Ori Kam <orika@mellanox.com>, Akhil Goyal <akhil.goyal@nxp.com>
Subject: Re: [dpdk-dev] [PATCH] doc: deprecate using MAX values as array size
Date: Tue, 25 Feb 2020 12:03:25 +0100	[thread overview]
Message-ID: <8793457.2WqB4rESCP@xps> (raw)
In-Reply-To: <VE1PR04MB66393E4CAC9575BF19837E4FE6EC0@VE1PR04MB6639.eurprd04.prod.outlook.com>

> > > Adding the deprecation notice as reminder for next ABI breakage release
> > > (20.11).
> > > This one time breakage is required to be able to extend enum/define
> > > without breaking ABI.
> > >
> > > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > > ---
> > > +* lib: will fix extending some enum/define breaking the ABI. There are
> > multiple
> > > +  samples in DPDK that enum/define terminated with a ``.*MAX.*`` value
> > which is
> > > +  used by iterators, and arrays holding these values are sized with this
> > > +  ``.*MAX.*`` value. So extending this enum/define increases the ``.*MAX.*``
> > > +  value which increases the size of the array and depending on how/where the
> > > +  array is used this may break the ABI.
> > > +  ``RTE_ETH_FLOW_MAX`` is one sample of the mentioned case, adding a
> > new flow
> > > +  type will break the ABI because of ``flex_mask[RTE_ETH_FLOW_MAX]``
> > array
> > > +  usage in following public struct hierarchy:
> > > +  ``rte_eth_fdir_flex_conf -> rte_fdir_conf -> rte_eth_conf (in the middle)``.
> > > +  Need to identify this kind of usages and fix in 20.11, otherwise this blocks
> > > +  us extending existing enum/define.
> > > +  One solution can be using a fixed size array instead of ``.*MAX.*`` value.
> > 
> We admit that the issue is there and we can discuss the possible solutions for this issue.
> 
> For the deprecation notice.
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

I think we'll need a new coding style guideline to avoid shuch issue in future.
Anyway, about fixing the issue in 20.11,
Acked-by: Thomas Monjalon <thomas@monjalon.net>



  reply	other threads:[~2020-02-25 11:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 14:20 Ferruh Yigit
2020-02-21 10:25 ` Ferruh Yigit
2020-02-24  6:18   ` Akhil Goyal
2020-02-25 11:03     ` Thomas Monjalon [this message]
2020-02-24  8:51   ` Andrew Rybchenko
2020-02-25 13:52 ` David Marchand
2020-02-25 14:53 ` David Marchand

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=8793457.2WqB4rESCP@xps \
    --to=thomas@monjalon.net \
    --cc=akhil.goyal@nxp.com \
    --cc=arybchenko@solarflare.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=john.mcnamara@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=nhorman@tuxdriver.com \
    --cc=orika@mellanox.com \
    /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).