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 88B5437A4 for ; Tue, 19 Jul 2016 16:18:56 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 19 Jul 2016 07:18:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,389,1464678000"; d="scan'208";a="1024815098" Received: from dwdohert-dpdk.ir.intel.com ([163.33.210.152]) by fmsmga002.fm.intel.com with ESMTP; 19 Jul 2016 07:18:54 -0700 To: Eli Britstein , Tetsuya Mukawa , "dev@dpdk.org" References: <8CEF83825BEC744B83065625E567D7C21A04F18C@IRSMSX108.ger.corp.intel.com> <7be321ba-9eb7-2932-ae73-dc7a33b225e6@igel.co.jp> Cc: "Iremonger, Bernard" From: Declan Doherty Message-ID: Date: Tue, 19 Jul 2016 15:14:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] SRIOV hot unplug X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jul 2016 14:18:56 -0000 On 07/19/2016 12:18 PM, Eli Britstein wrote: > > >> -----Original Message----- >> From: Tetsuya Mukawa [mailto:mukawa@igel.co.jp] >> Sent: Tuesday, 19 July, 2016 5:49 AM >> To: Eli Britstein; dev@dpdk.org >> Cc: Iremonger, Bernard >> Subject: Re: [dpdk-dev] SRIOV hot unplug >> >> Hi Eli, >> >> On 2016/07/18 17:47, Eli Britstein wrote: >>> Hi Bernard, >>> >>> Thank you for your answer. >>> However, to do this, I have to have some communication protocol to the >> VM's application in order for it to do this sequence and acknowledge that it is >> now safe to proceed with detaching the device. >>> This implies some kind of integration from the host side, which I would like >> to avoid. >> >> I guess you should have some kind of communication channel to notice the >> hotpluging events from host to VM. > [Eli Britstein] > In order just to notice the hotplugging events inside the VM, I can use add some udev action in the VM, in /etc/udev/rules.d/XXX > However, those are asynchronous events. The host proceeds with unplugging without waiting for the VM to acknowledge it. > >> >>> Do you think might there be any other way for the application to handle >> such event in a smooth way? >> >> So far, I guess having one more virtio-net device will be easiest way. > [Eli Britstein] > Could you please elaborate your meaning? How do you mean to use this extra virtio-net device? > > To clarify: I would like to have my bond device automatically set the vNIC as its primary, and close/remove the VF before it is unplugged. > > Thanks, > Eli The only that I can think of which would allow bonding to support this is if you could force a link down notification to the VF. The bonding driver should automatically then fail over to the vNIC, but again this is asynchronous event so I'm not sure how you could confirm this action from the host other than by monitoring traffic? Also I don't know if the DPDK environment has been tested to support the removal of dynamic hot-plugging you are suggesting via the udev action. There are no hooks that I'm aware of which would detect that the PCI device is no longer available and then clean the resources away in DPDK. > > Also could you please drop the footer/disclaimer on replies to the mailing list (see http://dpdk.org/ml)