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 1A592D148 for ; Fri, 24 Mar 2017 09:32:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490344325; x=1521880325; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Ys2j8BQ5jFfDEPT/u3dMfpwIXeVprD3Qq4NU2aN0XHU=; b=v1t96fFU1BZPXIgg24dloE66BnLNzFsVzLxQ0O75ZbGemfkWY614h7Z5 hVgrF4o4DOhq1LBDn3lkXWPdzhc3Vw==; Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Mar 2017 01:32:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,214,1486454400"; d="scan'208";a="70245372" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 24 Mar 2017 01:32:03 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 24 Mar 2017 01:32:03 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 24 Mar 2017 01:32:03 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.253]) by shsmsx102.ccr.corp.intel.com ([169.254.2.212]) with mapi id 14.03.0248.002; Fri, 24 Mar 2017 16:31:59 +0800 From: "Wu, Jingjing" To: "Zhao1, Wei" , "Yigit, Ferruh" , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH 3/3] net/i40e: implement device reset on port Thread-Index: AQHSk9ujZIIdPiJSP0+UHhKUl/ZIFqGKTjSAgAkhcgCAEFpRMA== Date: Fri, 24 Mar 2017 08:31:59 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810D132BC@SHSMSX103.ccr.corp.intel.com> References: <1488516984-34702-1-git-send-email-wei.zhao1@intel.com> <1488516984-34702-4-git-send-email-wei.zhao1@intel.com> <08c8c198-7202-f45c-80d9-580a15bc7569@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 3/3] net/i40e: implement device reset on port 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, 24 Mar 2017 08:32:05 -0000 > > > > > +static int > > > +i40evf_handle_vf_reset(struct rte_eth_dev *dev) { > > > + struct i40e_adapter *adapter =3D > > > + I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); > > > + > > > + if (!dev->data->dev_started) > > > + return 0; > > > + > > > + adapter->reset_number =3D 1; > > > + i40e_vf_reset_dev(dev); > > > > What happens if user called this function for PF ? >=20 > This is an illegal operation, so I will may be add an check of whether it= is vf > port, if not , a return command to avoid illegal operation. > VF driver is probed when it is the VF (by device id). So I don't think it Will be called when it is PF. Thanks Jingjing