From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <wei.dai@intel.com>
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id 62F11374
 for <dev@dpdk.org>; Tue, 20 Jun 2017 09:56:16 +0200 (CEST)
Received: from orsmga005.jf.intel.com ([10.7.209.41])
 by orsmga104.jf.intel.com with ESMTP; 20 Jun 2017 00:56:15 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.39,364,1493708400"; d="scan'208";a="115226213"
Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78])
 by orsmga005.jf.intel.com with ESMTP; 20 Jun 2017 00:55:54 -0700
Received: from pgsmsx106.gar.corp.intel.com ([169.254.9.226]) by
 PGSMSX101.gar.corp.intel.com ([169.254.1.101]) with mapi id 14.03.0319.002;
 Tue, 20 Jun 2017 15:55:53 +0800
From: "Dai, Wei" <wei.dai@intel.com>
To: "Wu, Jingjing" <jingjing.wu@intel.com>, "Lu, Wenzhuo"
 <wenzhuo.lu@intel.com>, "Ananyev, Konstantin" <konstantin.ananyev@intel.com>, 
 "Zhang, Helin" <helin.zhang@intel.com>
CC: "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [PATCH 7/7] net/i40e: add support of restoration
Thread-Index: AQHS1sOmkpXttfqaOkqszHj5F1Uax6IYkdCAgBTwVwA=
Date: Tue, 20 Jun 2017 07:55:52 +0000
Message-ID: <49759EB36A64CF4892C1AFEC9231E8D650AA6323@PGSMSX106.gar.corp.intel.com>
References: <1495873329-43303-1-git-send-email-wei.dai@intel.com>
 <1495873329-43303-8-git-send-email-wei.dai@intel.com>
 <9BB6961774997848B5B42BEC655768F810D9CA6E@SHSMSX103.ccr.corp.intel.com>
In-Reply-To: <9BB6961774997848B5B42BEC655768F810D9CA6E@SHSMSX103.ccr.corp.intel.com>
Accept-Language: zh-CN, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTkzMDdkZDktODBkOC00NzY5LWE3ZTItMTBiN2VkZmU5NGJmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkVyRDZMVVdKYUhnNVptc1lDZWIwZXlDOFZpRVZPR3dTYkQrdjdNbWdpWHM9In0=
x-ctpclassification: CTP_IC
dlp-product: dlpe-windows
dlp-version: 10.0.102.7
dlp-reaction: no-action
x-originating-ip: [172.30.20.205]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH 7/7] net/i40e: add support of restoration
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 20 Jun 2017 07:56:16 -0000

> -----Original Message-----
> From: Wu, Jingjing
> Sent: Wednesday, June 7, 2017 3:50 PM
> To: Dai, Wei <wei.dai@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>;
> Ananyev, Konstantin <konstantin.ananyev@intel.com>; Zhang, Helin
> <helin.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH 7/7] net/i40e: add support of restoration
>=20
>=20
>=20
> > -----Original Message-----
> > From: Dai, Wei
> > Sent: Saturday, May 27, 2017 4:22 PM
> > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>; Zhang, Helin <helin.zhang@intel.com>;
> > Wu, Jingjing <jingjing.wu@intel.com>
> > Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>
> > Subject: [PATCH 7/7] net/i40e: add support of restoration
> >
> > export dev_uninit and dev_init for restoration to reset port but keep
> > same port id.
> >
> > Signed-off-by: Wei Dai <wei.dai@intel.com>
> > ---
> >  drivers/net/i40e/i40e_ethdev.c    | 2 ++
> >  drivers/net/i40e/i40e_ethdev_vf.c | 5 +++++
> >  2 files changed, 7 insertions(+)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> > b/drivers/net/i40e/i40e_ethdev.c index 4c49673..9512ca4 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -449,6 +449,8 @@ static const struct eth_dev_ops i40e_eth_dev_ops =
=3D
> {
> >  	.dev_start                    =3D i40e_dev_start,
> >  	.dev_stop                     =3D i40e_dev_stop,
> >  	.dev_close                    =3D i40e_dev_close,
> > +	.dev_init                     =3D eth_i40e_dev_init,
> > +	.dev_uninit                   =3D eth_i40e_dev_uninit,
> >  	.promiscuous_enable           =3D i40e_dev_promiscuous_enable,
> >  	.promiscuous_disable          =3D i40e_dev_promiscuous_disable,
> >  	.allmulticast_enable          =3D i40e_dev_allmulticast_enable,
>=20
>=20
> you can just get int and unint func point by eth_dev->driver.eth_dev_init=
 and
> eth_dev->driver.eth_dev_init
>=20
> No need to define ops here.

I'm sorry that struct rte_eth_dev doesn't have member driver.
The struct rte_eth_dev_data, struct rte_pci_device and struct rte_pci_devic=
e don't have
Any member to refer dev_init() and dev_uninit.