From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 3F0EF1B1BE for ; Thu, 18 Jan 2018 05:23:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2018 20:23:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,375,1511856000"; d="scan'208";a="11272853" Received: from jguo15x-mobl3.ccr.corp.intel.com (HELO [10.67.68.51]) ([10.67.68.51]) by fmsmga008.fm.intel.com with ESMTP; 17 Jan 2018 20:23:51 -0800 To: Thomas Monjalon References: <1515679534-22473-2-git-send-email-jia.guo@intel.com> <1516013331-18939-1-git-send-email-jia.guo@intel.com> <10337288.PlhJV8PepH@xps> Cc: dev@dpdk.org, stephen@networkplumber.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, gaetan.rivet@6wind.com, konstantin.ananyev@intel.com, jblunck@infradead.org, shreyansh.jain@nxp.com, jingjing.wu@intel.com, helin.zhang@intel.com, motih@mellanox.com From: "Guo, Jia" Message-ID: <54cdd881-2482-242b-c4a3-867c28d14223@intel.com> Date: Thu, 18 Jan 2018 12:23:50 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <10337288.PlhJV8PepH@xps> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH V11 1/3] eal: add uevent monitor api and callback func 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, 18 Jan 2018 04:23:54 -0000 On 1/18/2018 5:59 AM, Thomas Monjalon wrote: > 15/01/2018 11:48, Jeff Guo: >> + * It registers the callback for the specific event. Multiple >> + * callbacks cal be registered at the same time. >> + * >> + * @param device_name >> + * The device name. >> + * @param cb_fn >> + * callback address. >> + * @param cb_arg >> + * address of parameter for callback. >> + * >> + * @return >> + * - On success, zero. >> + * - On failure, a negative value. >> + */ >> +int rte_dev_callback_register(char *device_name, rte_dev_event_cb_fn cb_fn, >> + void *cb_arg); > What is the device name? > > I think we should register a callback for a rte_device or NULL (all devices). please see my v12 patch, the device name have been info to user. i think a device name for a callback might be fulfill , since if use NULL for all device, a callback could not belong to a NULL point. if there are any advantage by callback for a rte_device, please explicit outline it. and i think it must be a improvement and anyway if need i will try to make it better. and what ever a callback for a rte_device or a device name for a callback, i think that is not our gap, i guess what you care about is that the new and firstly hot plug in device monitor , so i would add null check for identify these new device callback. am i right?