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 0B86AA00BE; Thu, 10 Feb 2022 23:17:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D8F3410E5; Thu, 10 Feb 2022 23:17:03 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 102C84013F for ; Thu, 10 Feb 2022 23:17:02 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A75F15C0160; Thu, 10 Feb 2022 17:17:01 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 10 Feb 2022 17:17:01 -0500 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=fm3; bh=Mxodg7D0FtqrK8 4DBjMV/3WXYLlV88g+a0M0SFNY9x0=; b=MSz8KUR2N0mpCSg6l8ZybTNhPGGU+g 46GgEKkJpHI7IvG1RaZZKaRaNMJJ8zcrlWm4MFXZs1/Svfh8ZYEMo+ZDwD0l3HQM Vy5Xlxiw8vQD5fwX5axInqOZ9dzEc13Omhxx6wd2x7utMbNd6dNc+CE9ac2cQhJb di3jhJ9OjWjWX1lmmO5MYlh3OJPMn33WTjaPkjoXjHB0kaOoG4+6ZuOiYC9gI53s TLUa5iiPS5Hl6z3yQVQA45Egi1PwlRvCthU6E43TKsi6Mu6wbJDM1Us/8GG505rA k4W/sol1IsUwj5oQkmLKwru0ohgdJKchC3FX+U4+yowtVOry6BpxrlNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; 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:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Mxodg7D0FtqrK84DBjMV/3WXYLlV88g+a0M0SFNY9 x0=; b=PN92miUaLMof++9y04KSCnDkzh4bDB+OJOij0K48Ol8UTb8JGA0gvD/4T Si7awJUaCy9m5RfVFNov497zw0vqubmFMcdD2aqESLTyahd8YN3JwIC/6etKe0n5 1lExgtmgqtDIb/6VWqak85atJjDgjxq0tycqp+rl5bncriYQbGOxH3inyT50mSyx wysDLrgF52Gj3SQKck3yhfViOOmSTexRUS+HmxzOspHU3Ah1hKcPiI3DEwfxgH7l WOANIkup4qostANjm8+XfDcbGRntpdPC1x6ErRp7d4twwx9rN7KeaMC4mOily9df iK7Ke9BZpBfHJAd5sDGmgjKtFF0bQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddriedugdduheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 10 Feb 2022 17:16:59 -0500 (EST) From: Thomas Monjalon To: Ferruh Yigit , Kalesh A P , Ray Kinsella Cc: dev@dpdk.org, dev@dpdk.org, ajit.khaparde@broadcom.com, asafp@nvidia.com, David Marchand , Andrew Rybchenko Subject: Re: [dpdk-dev] [PATCH v7 1/4] ethdev: support device reset and recovery events Date: Thu, 10 Feb 2022 23:16:58 +0100 Message-ID: <14555427.JCcGWNJJiE@thomas> In-Reply-To: <87iltx1oir.fsf@mdr78.vserver.site> References: <20201009034832.10302-1-kalesh-anakkur.purayil@broadcom.com> <87iltx1oir.fsf@mdr78.vserver.site> 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 02/02/2022 12:44, Ray Kinsella: > Ferruh Yigit writes: > > On 1/28/2022 12:48 PM, Kalesh A P wrote: > >> --- a/lib/ethdev/rte_ethdev.h > >> +++ b/lib/ethdev/rte_ethdev.h > >> @@ -3818,6 +3818,24 @@ enum rte_eth_event_type { > >> RTE_ETH_EVENT_DESTROY, /**< port is released */ > >> RTE_ETH_EVENT_IPSEC, /**< IPsec offload related event */ > >> RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected */ > >> + RTE_ETH_EVENT_ERR_RECOVERING, > >> + /**< port recovering from an error > >> + * > >> + * PMD detected a FW reset or error condition. > >> + * PMD will try to recover from the error. > >> + * Data path may be quiesced and Control path operations > >> + * may fail at this time. > >> + */ > >> + RTE_ETH_EVENT_RECOVERED, > >> + /**< port recovered from an error > >> + * > >> + * PMD has recovered from the error condition. > >> + * Control path and Data path are up now. > >> + * PMD re-configures the port to the state prior to the error. > >> + * Since the device has undergone a reset, flow rules > >> + * offloaded prior to reset may be lost and > >> + * the application should recreate the rules again. > >> + */ > >> RTE_ETH_EVENT_MAX /**< max value of this enum */ > > > > > > Also ABI check complains about 'RTE_ETH_EVENT_MAX' value check, cc'ed more people > > to evaluate if it is a false positive: > > > > > > 1 function with some indirect sub-type change: > > [C] 'function int rte_eth_dev_callback_register(uint16_t, rte_eth_event_type, rte_eth_dev_cb_fn, void*)' at rte_ethdev.c:4637:1 has some indirect sub-type changes: > > parameter 3 of type 'typedef rte_eth_dev_cb_fn' has sub-type changes: > > underlying type 'int (typedef uint16_t, enum rte_eth_event_type, void*, void*)*' changed: > > in pointed to type 'function type int (typedef uint16_t, enum rte_eth_event_type, void*, void*)': > > parameter 2 of type 'enum rte_eth_event_type' has sub-type changes: > > type size hasn't changed > > 2 enumerator insertions: > > 'rte_eth_event_type::RTE_ETH_EVENT_ERR_RECOVERING' value '11' > > 'rte_eth_event_type::RTE_ETH_EVENT_RECOVERED' value '12' > > 1 enumerator change: > > 'rte_eth_event_type::RTE_ETH_EVENT_MAX' from value '11' to '13' at rte_ethdev.h:3807:1 > > I don't immediately see the problem that this would cause. > There are no array sizes etc dependent on the value of MAX for instance. > > Looks safe? We never know how this enum will be used by the application. The max value may be used for the size of an event array. It looks a real ABI issue unfortunately. PS: I am not Cc'ed in this patchset, so copying what I said on v6 (more than a year ago): Please use the option --cc-cmd devtools/get-maintainer.sh