DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Chautru, Nicolas" <nicolas.chautru@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	"trix@redhat.com" <trix@redhat.com>,
	"mdr@ashroe.eu" <mdr@ashroe.eu>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	"stephen@networkplumber.org" <stephen@networkplumber.org>,
	"techboard@dpdk.org" <techboard@dpdk.org>
Subject: RE: [PATCH v1] bbdev: allow operation type enum for growth
Date: Fri, 17 Jun 2022 16:12:22 +0000	[thread overview]
Message-ID: <BY5PR11MB445116277FFC3FC5AB19A18FF8AF9@BY5PR11MB4451.namprd11.prod.outlook.com> (raw)
In-Reply-To: <6579285.Sb9uPGUboI@thomas>


> From: Thomas Monjalon <thomas@monjalon.net>
> 
> This solution is what I proposed to the techboard some years ago, but the
> preference was to completely remove the MAX values.
> 

Thanks, good to see you had similar thought! I don't believe there is an actual recommendation captured in term of how to remove completely MAX values in that case below. I believe that this option is still compatible with the spirit of keeping AB future proof. 

> 
> 13/06/2022 20:24, Nicolas Chautru:
> > Updating the last enum for rte_bbdev_op_type to allow for enum
> > insertion.
> 
> Please explain that the reason is to keep ABI compatible, and you want to keep
> the MAX value for array needs.
> 
> > --- a/lib/bbdev/rte_bbdev.c
> > +++ b/lib/bbdev/rte_bbdev.c
> > @@ -1122,7 +1122,10 @@ struct rte_mempool *
> >  		"RTE_BBDEV_OP_TURBO_DEC",
> >  		"RTE_BBDEV_OP_TURBO_ENC",
> >  		"RTE_BBDEV_OP_LDPC_DEC",
> > -		"RTE_BBDEV_OP_LDPC_ENC",
> > +		"RTE_BBDEV_OP_RESERVED_1",
> > +		"RTE_BBDEV_OP_RESERVED_2",
> > +		"RTE_BBDEV_OP_RESERVED_3",
> > +		"RTE_BBDEV_OP_RESERVED_4",
> 
> As Stephen said, you should make sure that using these values with the API
> functions will lead to a clear and expected error.

Yes will do this. 

> 
> > @@ -748,7 +748,7 @@ enum rte_bbdev_op_type {
> >  	RTE_BBDEV_OP_TURBO_ENC,  /**< Turbo encode */
> >  	RTE_BBDEV_OP_LDPC_DEC,  /**< LDPC decode */
> >  	RTE_BBDEV_OP_LDPC_ENC,  /**< LDPC encode */
> > -	RTE_BBDEV_OP_TYPE_COUNT,  /**< Count of different op types */
> > +	RTE_BBDEV_OP_TYPE_COUNT = 8,  /**< Count of different op types */
> 
> You must update the comment to explain there may be a padding, it is not
> exactly the count.
> Maybe "MAX" is a better fit than "COUNT" in this case.
> 

OK



  reply	other threads:[~2022-06-17 16:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 18:24 Nicolas Chautru
2022-06-13 18:24 ` Nicolas Chautru
2022-06-13 19:48   ` Stephen Hemminger
2022-06-13 20:19     ` Chautru, Nicolas
2022-06-17  8:21   ` Thomas Monjalon
2022-06-17 16:12     ` Chautru, Nicolas [this message]
2022-06-23 16:09     ` Ray Kinsella

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=BY5PR11MB445116277FFC3FC5AB19A18FF8AF9@BY5PR11MB4451.namprd11.prod.outlook.com \
    --to=nicolas.chautru@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mdr@ashroe.eu \
    --cc=stephen@networkplumber.org \
    --cc=techboard@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=trix@redhat.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).