From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 308C1A0093; Fri, 17 Jun 2022 10:21:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12D0A40DDD; Fri, 17 Jun 2022 10:21:42 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 3F80E40698; Fri, 17 Jun 2022 10:21:41 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 620BA3200993; Fri, 17 Jun 2022 04:21:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 17 Jun 2022 04:21:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1655454098; x= 1655540498; bh=wqtEnnV7gAu72YrATcoODbPUHc7y2/b6AtuaPV9hz+k=; b=L HwbLx3s4vmc3I9N2xrDdSKMawBrX2cwiPJ66jtlEAGB4ltHxicu7ALP0EEhWWxvF +KdQeknoumuy0j/STHlfrdn0yfIKikMQxyZI1q5Q/dz02xXPIWF8GpSI045V0gxD IPJyAxMKrY4LWj0WaYlR3mNKrb0gWdvNQKB7z+WkdKMZUxsB4nVoI8NCYFFukN0K 1ZGhNj6FplWwKG+iDZoCutYP2Qva65qWVqMQnhad7asObMMTg1ezhddrVJLM1I8o /i3EDTVXZIq48itAjFdqOH04ymWNUlElf40hjlVX7reeUHhfTHRuR2yH1AMzfPIx rCrsFDGBOv+fEVcQ4VjFA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1655454098; x= 1655540498; bh=wqtEnnV7gAu72YrATcoODbPUHc7y2/b6AtuaPV9hz+k=; b=s mbATt9/OO9wCZtlPSMlG1howYRZ3KrHZc5w0KgYEAvudarDLhsuVnfXuQSB3OzD+ 8UYRjeAkLuxcZB4GfiDnCQ86WO0/WzuENxOCDVzLvxfDreldzw0XBfIw/rpZkx2B 5YaoyYalKRfM9c1W9/uXUANbo41ZvljPMR3rkUJYAfvLy48pZrKzuplxOaOynMVy JMQk2ONTC/LXmCoEFcCWs15zcjNWmXOehwNX/KviUzCiZcr3z4rzLAsIw5aSN779 MqdR7IFkhO1cJUhtO//hmlTKlN83qIGWeX2EXCSKcaGk3UdqdB1blzJo5eb9/YSs +8ISzNrWQ4RRmSyDDsJCw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddvhecutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgrshcu ofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrf grthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieekgfek udehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Jun 2022 04:21:37 -0400 (EDT) From: Thomas Monjalon To: Nicolas Chautru Cc: dev@dpdk.org, maxime.coquelin@redhat.com, trix@redhat.com, mdr@ashroe.eu, bruce.richardson@intel.com, hemant.agrawal@nxp.com, david.marchand@redhat.com, stephen@networkplumber.org, techboard@dpdk.org Subject: Re: [PATCH v1] bbdev: allow operation type enum for growth Date: Fri, 17 Jun 2022 10:21:36 +0200 Message-ID: <6579285.Sb9uPGUboI@thomas> In-Reply-To: <1655144675-14363-2-git-send-email-nicolas.chautru@intel.com> References: <1655144675-14363-1-git-send-email-nicolas.chautru@intel.com> <1655144675-14363-2-git-send-email-nicolas.chautru@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This solution is what I proposed to the techboard some years ago, but the preference was to completely remove the MAX values. 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. > @@ -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.