From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <qiming.yang@intel.com>
Received: from mga04.intel.com (mga04.intel.com [192.55.52.120])
 by dpdk.org (Postfix) with ESMTP id E48F5199A9
 for <dev@dpdk.org>; Wed, 13 Sep 2017 09:51:34 +0200 (CEST)
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 13 Sep 2017 00:51:33 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.42,386,1500966000"; 
 d="scan'208,217";a="899772092"
Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203])
 by FMSMGA003.fm.intel.com with ESMTP; 13 Sep 2017 00:51:33 -0700
Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by
 FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Wed, 13 Sep 2017 00:51:33 -0700
Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by
 fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Wed, 13 Sep 2017 00:51:32 -0700
Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.168]) by
 SHSMSX151.ccr.corp.intel.com ([169.254.3.98]) with mapi id 14.03.0319.002;
 Wed, 13 Sep 2017 15:51:30 +0800
From: "Yang, Qiming" <qiming.yang@intel.com>
To: "shijith.thotton@caviumnetworks.com" <shijith.thotton@caviumnetworks.com>
CC: "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: vf init issue with patch igb_uio: issue FLR during open and
 release of device file
Thread-Index: AdMsY+cDtYlICV1TTJyXdLDau5GdIA==
Date: Wed, 13 Sep 2017 07:51:30 +0000
Message-ID: <F5DF4F0E3AFEF648ADC1C3C33AD4DBF16F7E0E71@SHSMSX101.ccr.corp.intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzFlZTM5NGMtZDJlZS00MTg0LWFiMWItZTU5NTY1OGQzNzE4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjYzazFOYUhLQlNLZWRVZVdIYTJIT1BHb0ZDNU1ZQVNxQzFGeDRGZ0VRSVk9In0=
x-ctpclassification: CTP_IC
dlp-product: dlpe-windows
dlp-version: 11.0.0.116
dlp-reaction: no-action
x-originating-ip: [10.239.127.40]
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
Subject: [dpdk-dev] vf init issue with patch igb_uio: issue FLR during open
 and release of device file
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: Wed, 13 Sep 2017 07:51:35 -0000

Hi, Shijith

VF init error will happen after apply your patch, error log as below. If re=
vert your commit, all things work well. And this issue is not only occur in=
 i40 VF but also ixgbe.
Could you help to check it soon?

[root@localhost app]# ./testpmd -c 7 -n 4 -- -i
EAL: Detected 10 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: WARNING: cpu flags constant_tsc=3Dyes nonstop_tsc=3Dno -> using unreli=
able clock cycles !
EAL: PCI device 0000:00:03.0 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:154c net_i40e_vf
i40evf_init_vf(): init_adminq failed: -53
i40evf_dev_init(): Init vf failed
EAL: Requested device 0000:00:03.0 cannot be used

commit b58eedfc7dd57eef6d12e2c654a52c834f36084a
Author: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Date: Fri Jul 7 16:43:51 2017 +0530
igb_uio: issue FLR during open and release of device file
Set UIO info device file operations open and release. Call pci reset
function inside open and release to clear device state at start and end.
Copied this behaviour from vfio_pci kernel module code. With this patch,
it is not mandatory to issue FLR by PMD's during init and close.
Bus master enable and disable are added in open and release respectively
to take care of device DMA.
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Gregory Etelson <gregory@weka.io>

Best Regard,
Yang Qiming