From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A0AC61B27F for ; Fri, 22 Dec 2017 04:08:13 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2017 19:08:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,438,1508828400"; d="scan'208";a="4690385" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.224.153]) ([10.241.224.153]) by orsmga007.jf.intel.com with ESMTP; 21 Dec 2017 19:08:12 -0800 To: Thomas Monjalon , dev@dpdk.org Cc: bernard.iremonger@intel.com References: <20171128220951.15317-1-thomas@monjalon.net> From: Ferruh Yigit Message-ID: <53c8669c-79b9-2f6d-4008-7679aa2cf377@intel.com> Date: Thu, 21 Dec 2017 19:08:12 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171128220951.15317-1-thomas@monjalon.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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: Fri, 22 Dec 2017 03:08:14 -0000 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