From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 67C752C2B for ; Fri, 7 Jul 2017 10:25:43 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1705A209D7; Fri, 7 Jul 2017 04:25:43 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 07 Jul 2017 04:25:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=vg0s9yfhJ3VU+o8 Bi4PzB09+I32QiZgVUQs9zL7ej0M=; b=qgHuS6Y0LGvuw1Ujz6oEi+DPEVQth7x j+91sbF54YDUF99ps8HNRTUbXjL6kw6znafe7Hwe13NK3pju+l/2ITNPoPfFnwPb 2wf/XjTNI40KX+vWv97vOxet+AV6dRhl8E/mFDi1pxMO4ql9mN5CKh3XeufUwkEW e6PQDsC2IEvA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=vg0s9yfhJ3VU+o8Bi4PzB09+I32QiZgVUQs9zL7ej0M=; b=FZGauqYZ N41wv5BWou2HuPU3zXaM0JNP1GFZv335OJ0k0PLBdCBK7tF1cV3Z6kovgJEmbCmm CGEl3iAZ64DfI8HUk0z+QJHW5vnt21uPNz0wiT7egAn8rI7PpF+m1QQ/ndBHaqNA XJ39iIFZIlqWdX0hFD7+/+9yKWsf7NxvRNThq1PotLfUFgEf96pL8DRpMpdVbs84 AYs3wOPRbSS8Kc9Y8kr5as3B50mWET/iWaXqtokCAR2+/E6/qxD1s7dAXPkIyyhl z7hdIdZ3ovCbC88Wp6HFIwfwPvsk5W0jJO/0zbvsRw5FuCnBMMy4fmvS68BFRKiT KGAPKvPKhkWzBA== X-ME-Sender: X-Sasl-enc: 1CLrvIF5bcfOTimBy2nVe5yMd7Ou1kKmuop0cDvgp4wK 1499415942 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 95E187E2C1; Fri, 7 Jul 2017 04:25:42 -0400 (EDT) From: Thomas Monjalon To: Wei Dai Cc: dev@dpdk.org, wenzhuo.lu@intel.com, konstantin.ananyev@intel.com, jingjing.wu@intel.com, helin.zhang@intel.com, yuan.peng@intel.com Date: Fri, 07 Jul 2017 10:25:41 +0200 Message-ID: <9394960.Tm5hhKpHD9@xps> In-Reply-To: <1498817556-64379-3-git-send-email-wei.dai@intel.com> References: <1498748282-69914-1-git-send-email-wei.dai@intel.com> <1498817556-64379-1-git-send-email-wei.dai@intel.com> <1498817556-64379-3-git-send-email-wei.dai@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5 2/4] net/ixgbe: add support of reset 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, 07 Jul 2017 08:25:43 -0000 Hi, 30/06/2017 12:12, Wei Dai: > +/* > + * Reest PF device. > + */ > +static int > +ixgbe_dev_reset(struct rte_eth_dev *dev) > +{ > + int ret; > + > + /* To avoid unexpected behavior in VF, disable PF reset */ > + if (dev->data->sriov.active) > + return -ENOTSUP; > + > + ret = eth_ixgbe_dev_uninit(dev); > + if (ret) > + return ret; > + > + ret = eth_ixgbe_dev_init(dev); > + > + return ret; > +} rte_eth_dev_reset() just do + rte_eth_dev_stop(port_id); + ret = dev->dev_ops->dev_reset(dev); and dev_reset() just do + ret = eth_ixgbe_dev_uninit(dev); + ret = eth_ixgbe_dev_init(dev); It is doing one more thing, the check of SR-IOV. Unfortunately, this restriction is not documented. This is the documentation of the new API: /** + * Reset a Ethernet device. + * + * @param port_id + * The port identifier of the Ethernet device. + */ +int rte_eth_dev_reset(uint8_t port_id); It is really really too short. >>From the beginning of this proposal we are asking you to better explain why this API is needed. It still does not appear in the doc. Are you adding it to offer a new service to DPDK application developpers? Or is it just a secret sauce that you will explain only to your customers? This is what is expected to be documented: - why/when this API must be used - what the API will do - what is needed to do after