From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id C8DFC1B53 for ; Thu, 28 Dec 2017 22:54:21 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3081A21B8A; Thu, 28 Dec 2017 16:54:21 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 28 Dec 2017 16:54:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=Ytpu0gLjmBFgAlz57cElhfbtU1 hFc0DxGvasey8X+co=; b=DPTG41nkNM6RZA8buvAyMIjk4+2yYej5NUZOTrcdKg L6rSC2vuvUgi5Umy/28edpy5gc0LByTXNSTD47GSaMosUr+du204GVGkXAnxoDOD urZxzLEUYL9XB5df+2wvMDgKqWkrjrpu6eODvf1ZJId1GgTgx1+SbKybsGhZjFOk U= 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-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Ytpu0g LjmBFgAlz57cElhfbtU1hFc0DxGvasey8X+co=; b=JyONR1fEoHuNfQscA+JNUs Q8ujdTXfAXip6oLvH855NASB6vvSRb2SADF6r6C28uaCKtZID2iikXhO00jNv6vG IyJVsllYQmdte63r465DU8KCp39JREk7iu8aeMwv2bg0m2JryjK9jkLJ5Gog9IzO aoT2osXcvWw5V+J7AKzIeDWAbxvyGxltX2C4f9iMSsiuLCTPT2wH26xYYmNUpl6k 6oxyT8WF7AheT4c5U+Y/qZ2A4DYd1vfiw7e03GZp74CH90ZsWtNZ0s5HuICrMHfF vbUUmCAw54zlXrhGfTm23dP/VYFE2mWNAzQtz4EQ/8En2a1UNMvZkU+GKwCCZLEg == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A46B4240DB; Thu, 28 Dec 2017 16:54:20 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Ferruh Yigit , bernard.iremonger@intel.com Date: Thu, 28 Dec 2017 22:54:07 +0100 Message-ID: <1953628.EychQmWvfA@xps> In-Reply-To: <53c8669c-79b9-2f6d-4008-7679aa2cf377@intel.com> References: <20171128220951.15317-1-thomas@monjalon.net> <53c8669c-79b9-2f6d-4008-7679aa2cf377@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] ethdev: remove useless parameter in callback process 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: , X-List-Received-Date: Thu, 28 Dec 2017 21:54:22 -0000 22/12/2017 04:08, Ferruh Yigit: > On 11/28/2017 2:09 PM, Thomas Monjalon wrote: > > 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. > > It can be helpful to mention a little from history: > > user cb_arg overwrite introduced by [1], to enable driver pass a pointer to user > callback function and carry some information back from app to driver. > > Later to prevent usage of cb_arg as both input and output, an explicit output > (ret_param) added [2] to _rte_eth_dev_callback_process() but previous cb_arg > overwriting kept without any user. > > [1]: c1ceaf3ad056 ("ethdev: add an argument to internal callback function") > > [2]: 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 Applied