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 2DF68A054F; Tue, 18 Feb 2020 15:20:12 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 840F81C10C; Tue, 18 Feb 2020 15:20:11 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 813771C10B for ; Tue, 18 Feb 2020 15:20:10 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2143222128; Tue, 18 Feb 2020 09:20:08 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 18 Feb 2020 09:20:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=qnTRtIpbzPCwhR5Rx9IzDl1hBw8dA0aT+i1p+4ylhlI=; b=MaAwQAQvasGi vXWBd8GLt3jWqFQrb8sB5gCJC7sFuONagEypXa1gEEL/xVNhzL2l6DKpk1Tfjw8L zuvfPWk9ehERNw9tfhqEexQqAeJsSundK+h269CJfdmP8AKlEKxACYPAby5ibRo+ xc7UML1m9HUnIiAZmispQ5ggpM4AKIA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=qnTRtIpbzPCwhR5Rx9IzDl1hBw8dA0aT+i1p+4ylh lI=; b=TePp5uTtrGRxAnGKQEhe5SGsw2IJKrTRLBVbYq/LPrzzjtNl06hCs3HTF wUWFyS6RNrq9JKY/txGdvtKxXvxTh9KgPR+5/YRi5ff6La62I2FA234TgT0mkIQ+ rAuQ2o1W/PnHyM3sTaiiGTTi2Mh+ozolEpdq5epGG1TlY+Tb6xXJ0zuoL0MHfpEQ ivs1UnF/wrgV3Xvq/1JRVKQeREy5jXhVC0GB3P5i68w1h8NN6dLhOLA918MvRZA2 lGOdo0n+a/+xnqne/7oVXrmFsvnCCMv5z0XsMVxzWLn6gR9+3jYjkCOi3DA1WPbp pCHsZCE3iVXvzee/hEHN7ClBtnDmg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrjeekgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 34A953060C28; Tue, 18 Feb 2020 09:20:07 -0500 (EST) From: Thomas Monjalon To: Ciara Power Cc: Ferruh Yigit , Andrew Rybchenko , dev@dpdk.org Date: Tue, 18 Feb 2020 15:20:05 +0100 Message-ID: <5790100.1IzOArtZ34@xps> In-Reply-To: <11739d5f-d506-9d61-8248-011b17b861ea@solarflare.com> References: <20200218104604.30574-1-ciara.power@intel.com> <4afc537a-0710-7721-0bf5-cc27c6d777f6@intel.com> <11739d5f-d506-9d61-8248-011b17b861ea@solarflare.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] ethdev: add comment to warn of ABI breakage 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" 18/02/2020 14:13, Andrew Rybchenko: > On 2/18/20 2:59 PM, Ferruh Yigit wrote: > > On 2/18/2020 10:46 AM, Ciara Power wrote: > >> If a function is added to the eth_dev_ops struct before > >> tx_descriptor_status function, this will cause ABI breakage. This is due > >> to static inline functions using this function, and some other functions > >> above it in the struct, so they cannot change position. A comment is > >> added to inform developers of this possible breakage. > >> > >> Signed-off-by: Ciara Power > >> --- > >> lib/librte_ethdev/rte_ethdev_core.h | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h > >> index 7bf97e24e..1ad04a129 100644 > >> --- a/lib/librte_ethdev/rte_ethdev_core.h > >> +++ b/lib/librte_ethdev/rte_ethdev_core.h > >> @@ -667,6 +667,9 @@ struct eth_dev_ops { > >> /**< Check the status of a Rx descriptor. */ > >> eth_tx_descriptor_status_t tx_descriptor_status; > >> /**< Check the status of a Tx descriptor. */ > >> + /* Static inline functions use functions above this comment. > >> + * New dev_ops functions should be added below to avoid breaking ABI. > >> + */ > >> eth_rx_enable_intr_t rx_queue_intr_enable; /**< Enable Rx queue interrupt. */ > >> eth_rx_disable_intr_t rx_queue_intr_disable; /**< Disable Rx queue interrupt. */ > >> eth_tx_queue_setup_t tx_queue_setup;/**< Set up device TX queue. */ > >> > > > > Reviewed-by: Ferruh Yigit > > LGTM, but may I suggest to make the first line in the comment > empty to make it easier to notice. I.e. > /* > * Static inline functions use functions above this comment. > * ... > */ > > Or even add empty lines before and after the comment. > > Reviewed-by: Andrew Rybchenko In the same idea as Andrew, I would suggest some uppercases, maybe "ABOVE" and "BELOW". Acked-by: Thomas Monjalon