From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id E62F62C8 for ; Wed, 5 Jul 2017 11:04:28 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2017 02:04:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,311,1496127600"; d="scan'208";a="1168221421" Received: from jguo15x-mobl3.ccr.corp.intel.com (HELO [10.67.68.76]) ([10.67.68.76]) by fmsmga001.fm.intel.com with ESMTP; 05 Jul 2017 02:04:26 -0700 To: Thomas Monjalon References: <1495986280-26207-1-git-send-email-jia.guo@intel.com> <1643564.1KfnGSoeuV@xps> <3931985.8o2Ck0PCcH@xps> Cc: dev@dpdk.org, helin.zhang@intel.com, jingjing.wu@intel.com From: "Guo, Jia" Message-ID: Date: Wed, 5 Jul 2017 17:04:25 +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: <3931985.8o2Ck0PCcH@xps> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal: add uevent api for hot plug 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: Wed, 05 Jul 2017 09:04:29 -0000 On 7/5/2017 3:32 PM, Thomas Monjalon wrote: > 05/07/2017 05:02, Guo, Jia: >> hi, thomas >> >> >> On 7/5/2017 7:45 AM, Thomas Monjalon wrote: >>> Hi, >>> >>> This is an interesting step for hotplug in DPDK. >>> >>> 28/06/2017 13:07, Jeff Guo: >>>> + netlink_fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); >>> It is monitoring the whole system... >>> >>>> +int >>>> +rte_uevent_get(int fd, struct rte_uevent *uevent) >>>> +{ >>>> + int ret; >>>> + char buf[RTE_UEVENT_MSG_LEN]; >>>> + >>>> + memset(uevent, 0, sizeof(struct rte_uevent)); >>>> + memset(buf, 0, RTE_UEVENT_MSG_LEN); >>>> + >>>> + ret = recv(fd, buf, RTE_UEVENT_MSG_LEN - 1, MSG_DONTWAIT); >>> ... and it is read from this function called by one driver. >>> It cannot work without a global dispatch. >> the rte_uevent-connect is called in func of pci_uio_alloc_resource, so >> each socket is created by by each uio device. so i think that would not >> affect each driver isolate to use it. > Ah OK, I missed it. > >>> It must be a global mechanism, probably a service core. >>> The question is also to know whether it should be a mandatory >>> service in DPDK or an optional helper? >> a global mechanism would be good, but so far, include mlx driver, we all >> handle the hot plug event in driver by app's registered callback. maybe >> a better global would be try in the future. but now is would work for all >> pci uio device. > mlx drivers have a special connection to the kernel through the associated > mlx kernel drivers. That's why the PMD handle the events in a specific way. > > You are adding event handling for UIO. > Now we need also VFIO. > > I am wondering how it could be better integrated in the bus layer. absolutely, hot plug for VFIO must be request more for the live migration, and we plan to add it at next level, when we go thought all uio hot plug feature integration done. so, could i expect an ack if there aren't other concern about uio uevent here. thanks. >> and more, if in pci uio device to use hot plug , i think it might be >> mandatory.