From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by dpdk.org (Postfix) with ESMTP id 9F847AD84 for ; Mon, 20 Jun 2016 18:17:00 +0200 (CEST) Received: by mail-pa0-f43.google.com with SMTP id bz2so52286397pad.1 for ; Mon, 20 Jun 2016 09:17:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K4ZJmoaiE0+PzmAFGnUcJh0RoEqPL9nfIj8PDOiN6d8=; b=jmQ9e/qmORw/78dgP7LDhurLwDyUKTCGBpf3B0GLuuvARUSZnrZyHBoWJK1o7Jjxlc 8c8k3p2z1VWmObHrsqgPKLhWFidm3NVVBRJa+1ssp3HIk6wFHmXtkpYkkwib7b2DJhT3 z61/Y8SiFAxrAGbk5P/yQrc+TapCDWq7VwxmwtcVOc2rwSyw5VFtvHM/bygXzm21GsGs hPhWpdLMs3hu1iAm9/VwlCHOf69G0cAZml/SjghMXgLQ3C5OYRr0IGZvdSJ95jfM4Cqg PLJ0fU178Hcqv6bJWuhxE2uH/dYjb5xxVMvnknfmaoJdZ0VuJeAFn3pJWAAu5Y2eEQOR O88Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K4ZJmoaiE0+PzmAFGnUcJh0RoEqPL9nfIj8PDOiN6d8=; b=UoNC0lzJdQJJmNBKQwe8M8JZVRSKfjgQm34vioddWeQmx5Okhd6ItZkHFJ6so86mg7 Jn+ePuUojeFfzYbKW6LauXNx8wKDNOr/C4OX3XwdA3Puh6VbuGw+6SNmGMQC4fKM3h90 AlJliNQ8u1z155aIFvnSbPFJ/pVo+uWrPZaeOSWaie2Fqy6NIzr4+uI7jWthX2Mca+xX Bakv/OQchsypGaLzkEQALgb6QerPXr0Ask2hpnddkMsf0ov3paweTSfPSln31Wo8kvfl PBCMqY+xzVLiWqw3CQDXX4XdX7wT9GUNgncLZP2gpYYUZWbeZwZgPQdMmzotjS4uuQIT 7cVw== X-Gm-Message-State: ALyK8tL3xw11EpTfiecSk7CTN6+AziDWRZr1GaDE1BHZVgLrKc2pWlWQGGxNDnEJWfd+4Q== X-Received: by 10.66.89.228 with SMTP id br4mr22873283pab.110.1466439419945; Mon, 20 Jun 2016 09:16:59 -0700 (PDT) Received: from xeon-e3 (static-50-53-69-251.bvtn.or.frontiernet.net. [50.53.69.251]) by smtp.gmail.com with ESMTPSA id 6sm62551390pfx.68.2016.06.20.09.16.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 09:16:59 -0700 (PDT) Date: Mon, 20 Jun 2016 09:17:14 -0700 From: Stephen Hemminger To: Jerin Jacob Cc: Wenzhuo Lu , , , , , , , , Message-ID: <20160620091714.276c186c@xeon-e3> In-Reply-To: <20160620091410.GA9323@localhost.localdomain> References: <1465191653-28408-1-git-send-email-wenzhuo.lu@intel.com> <1466403870-6840-1-git-send-email-wenzhuo.lu@intel.com> <1466403870-6840-2-git-send-email-wenzhuo.lu@intel.com> <20160620091410.GA9323@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v6 1/4] lib/librte_ether: support device reset 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: Mon, 20 Jun 2016 16:17:01 -0000 On Mon, 20 Jun 2016 14:44:11 +0530 Jerin Jacob wrote: > On Mon, Jun 20, 2016 at 02:24:27PM +0800, Wenzhuo Lu wrote: > > Add an API to reset the device. > > It's for VF device in this scenario, kernel PF + DPDK VF. > > When the PF port down->up, APP should call this API to > > reset VF port. Most likely, APP should call it in its > > management thread and guarantee the thread safe. It means > > APP should stop the rx/tx and the device, then reset the > > device, then recover the device and rx/tx. > > Following is _a_ use-case for Device reset. But may be not be _the_ use > case. IMO, We need to first say expected behavior of this API and add a use-case > later. > > Other use-case would be, PCIe VF with functional level reset for SRIOV > migration. > Are we on same page? In my experience with Linux devices, this is normally handled by the device driver in the start routine. Since any use case which needs this is going to do a stop/reset/start sequence, why not just have the VF device driver do this in the start routine?. Adding yet another API and state transistion if not necessary increases the complexity and required test cases for all devices.