From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] ethdev: remove useless parameter in callback process Date: Fri, 29 Dec 2017 14:29:21 +0100 Message-ID: <19178544.sblBIO1mag@xps> References: <53c8669c-79b9-2f6d-4008-7679aa2cf377@intel.com> <20171228221013.1141-1-thomas@monjalon.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: bernard.iremonger@intel.com, ferruh.yigit@intel.com To: dev@dpdk.org Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id C5B32239 for ; Fri, 29 Dec 2017 14:29:38 +0100 (CET) In-Reply-To: <20171228221013.1141-1-thomas@monjalon.net> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 28/12/2017 23:10, Thomas Monjalon: > The pointer to the user parameter of the callback registration is > automatically pass to the callback function. > There is no point to allow changing this user parameter by a caller. > That's why this parameter is always set to NULL by PMDs and set only > in ethdev layer before calling the callback function. > > The history is that the user parameter was initially used > by the callback implementation to pass some information > between the application and the driver: > c1ceaf3ad056 ("ethdev: add an argument to internal callback function") > Then a new parameter has been added to leave the user parameter > to its standard usage of context given at registration: > d6af1a13d7a1 ("ethdev: add return values to callback process API") > > The NULL parameter in the internal callback processing function > is now removed. It makes clear that the callback parameter is user > managed and opaque from a DPDK point of view. > > Signed-off-by: Thomas Monjalon > Reviewed-by: Ferruh Yigit > --- > v2: add history explanation This patch is now part of the patchset v3 for new ethdev notifications.