From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0042.outbound.protection.outlook.com [104.47.42.42]) by dpdk.org (Postfix) with ESMTP id 170FA2C58 for ; Thu, 14 Sep 2017 09:01:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=O45E3W1Z7QHHKQQ521pv0VVlKUvl39OWMcX+kFvWZoY=; b=mXf3n0g6VbpIiXjBnEhQN04PjYykHyJYc8mozuFWUzd0mrcWygQTJrA3fI3t9EXiVoneJVFdyVZhvvRptstMIp6ln/ouMx6/38n3TxqX88N7E3EPjbeC27vk+t4sjNip2JrzkMCdwOAY62ulxzmuPc2ZCDAbLkglPqdd5y2o6sg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Shijith.Thotton@cavium.com; Received: from localhost.localdomain (14.140.2.178) by BN6PR07MB3058.namprd07.prod.outlook.com (10.172.106.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Thu, 14 Sep 2017 07:01:11 +0000 Date: Thu, 14 Sep 2017 12:30:55 +0530 From: Shijith Thotton To: "Yang, Qiming" Cc: "dev@dpdk.org" , "Tan, Jianfeng" , "Hu, Xuekun" , Gregory Etelson , "Yigit, Ferruh" , "Patil, Harish" Message-ID: <20170914070053.GA23787@localhost.localdomain> References: <20170913104840.GA14229@localhost.localdomain> <95faf7af-367a-ff42-ed16-b8bf3fdea466@intel.com> <88A92D351643BA4CB23E303155170626630E6054@SHSMSX103.ccr.corp.intel.com> <50bb4358-cd0c-003f-1ae7-a953ef569807@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: PN1PR01CA0090.INDPRD01.PROD.OUTLOOK.COM (10.174.144.158) To BN6PR07MB3058.namprd07.prod.outlook.com (10.172.106.140) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fce5b55d-5bde-4e56-a50c-08d4fb3e638e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN6PR07MB3058; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3058; 3:mO692Aghg67hhCaP/Q2muY9SzYRaszuYDnxhAqqPGhazpgCCqV1t3+soo559vLhLN9v+yTQbrE00VJJS8eroOxy6zmC0OtQmPDc0L2DWPvSH246VEYcTmk+vrajLtifaeK/lTQZf0nY02cQi/dIOFL60EIwZ1H67sbsFE8kyJ8BWVVnDS8IiqsLawHq3y0IykZwZp+dEbPwVTeGifALM/k5ka0PVfvQN2QIUwxvJ1/66akySHzSE0rwVMYnZXIUj; 25:3xR70WaR/sl0vpcqXwISSdI9lD6Vc0pqzBzMWF/qWe19sx9OwXrFVn3AGaXMzowIixX9FAEX9wmz4JxYIVfRpqeYtHUue3eOCBBgGR9A6ySNa1/cgEX3zUfBcmzXQHcLPvEsVi+uaExftcakwmUTaWDrTvasbC8xIAIvyHV77TtWgeSIbXx3Iqfug9wDgkLeDRE5ImaRGBcfLRVngCzBYAi13VfoGqcwsLxcaprnesiN7S/jQJ41FlROPLAsrtSHRcnJIYwD4IUuCv5frpT/uRDjOU8e14ThR1zb3L7Vk2/JE5hEqbNTALmVlCYp46t9ZuUTCX8Kiwh44vc7SNyB7g==; 31:IBc9kctNvyKTNth3YrvUZsjR7EKqNux8nPI9aqf5K/J18iRIxZBg2N+5KDMLW4uKuR9oCamqczRkhLxyHags4aBFor9Oefh8DAEcvpW3vEqtUnYQdSpi/1m6QxNa2RdLBFhguMCJdQp0WV1PCKR10Ehy6GZp9o0gSFMrPqXz5AtJ5/xGIvVbPMmNHTqp++cYwGH2ytXzXGsmEaqQOecDj0dQcpt7HpM6c4ioFdqUYJ4= X-MS-TrafficTypeDiagnostic: BN6PR07MB3058: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3058; 20:IZrdeNBwO+D7rWRUcaW9NhhDAy9lEp/YOTgmtGqxpyOtlkhzVc0i3O6fVWZRx3RLnb6o3EqUXPSv5Tk3GIkXBotXvgevIXKBep+JAG5d4pdE4jfDtFUcFH49raPZylQgB6Mmp/rnaHcZxhNCzpotXNjca1SLNhaeePIB8W4u1vQLDiEtU88d0EQ0J5aZ+whFI4rxZQZ1Is+uBtoFSTv+/Xq0z2XZZw8Vj+oLUW5FJGiwkrD+oC9sr/PDd+wca+as0GUATZxNHWHmJSHW3NblwhBYgScObM6n1LUMutJBxzbdWxeDzMYQWsgdZz1WgyA5j5rlaFp/+1jHdiNDqskAnQI0BiDfd+149hlq1sw53ByQDm53JEFFH665V1tRTatVxEuslX66nKRhx2onN28j2utCsnSKvS811XGciG0K8GSRSINm6WNfHs3bSQNpNw1xHVPTCMomKn+8Eu7nkRUpdVuZ8tLqlqlh/QCh/Mm/J2HowKGgBwze7rEHpMTr/h3bMzI7i6Cg0NPg8peKERFdRmym+f364hY8pii+NFruijHRHBoAZ799xfikB18vKPmFTd3+Ur7ErHIWYMF3KoG4pP0QrWI6mdSwLqcs6knNiMI= X-Exchange-Antispam-Report-Test: UriScan:(265634631926514)(228905959029699)(17755550239193); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3058; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3058; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3058; 4:C2za/77fyy9HYRoQk743TwumaAXHQGJasG0xgjcWZYBrLf2SGfstipD3T7XbbkWn8DMcd1xbmETGg0nww2IF0GFteb6Ku7+H3buvAv0u9it/C8HG4eYzDpVOdiMvfGKlRPxKpfkFVJCCjr96IpzAj+SeC73u7TQboTNVoKgz7KFQnCyPmyhzp2Ur4gxl4iaR6F34eG8mU5lI6/pLJ00QQL3ad72J76u74UDfUcpuWibsw/2Bckt/o11e7K5+3EWk0N7ZLf/BaFunqvoEBf8QEJBBhqWMOiXI72NAJW7y2ePp6IprQvfojrlBGKt0ails3cTnFGyKLPAERj7jIY+TURhM4kNlMjEyH9L4M1+PNIWD20+JPcKfkodrjku3XjcV X-Forefront-PRVS: 0430FA5CB7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(376002)(346002)(189002)(43544003)(13464003)(24454002)(199003)(377454003)(4326008)(83506001)(478600001)(93886005)(229853002)(61506002)(5660300001)(6246003)(50466002)(53546010)(47776003)(25786009)(16526017)(110136004)(107886003)(16586007)(316002)(68736007)(66066001)(6506006)(72206003)(6666003)(42882006)(6916009)(2906002)(9686003)(55016002)(106356001)(53936002)(101416001)(50986999)(105586002)(2950100002)(23726003)(1076002)(3846002)(54356999)(76176999)(54906002)(6116002)(4001350100001)(97736004)(33656002)(189998001)(5009440100003)(81156014)(8676002)(81166006)(8936002)(305945005)(7736002)(110426004)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3058; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3058; 23:h+MxFgAvIFZhYwP5ziM7CiM0cnkreh2pphQgWt8O5?= =?us-ascii?Q?O11hSORHXb80DgV1HP4FVvCCBi4w+QZnT5guqj19CvXUi69hYPPt89ZPD5UU?= =?us-ascii?Q?cu+UcjIAwBI3FcKsVT84rEBs8BVxWMkePvKFoOI0D+z19AnQXBCJ/qXVCFij?= =?us-ascii?Q?2oNGM2DkuCvV4ZqTu7mhIAC5brPfDWGKG+dIVOLOxjIhdkRhF/pWi/eJAtTF?= =?us-ascii?Q?Yq0gVyjjmMg1jWNXFWJTYst8WL7QdYGlZwV3v4KJs86u4bcGBC6vJ44Djm/x?= =?us-ascii?Q?UzGAvD7UAnJgF22IgfCT3zv+ZIo0NOm93jjKEEigy+aRhrI8JEkMhzOf3qqv?= =?us-ascii?Q?6Q3WD3RYIJgWOxA3zi7pYfMICtq/iu5W+4xWov9eASjTYCROLaKwUiaBgNoM?= =?us-ascii?Q?ClSrTo/w/BoIwNPDmtjYrddAmhFifSwuDo9LtaS7tQD5he77uayCEUIPPJVX?= =?us-ascii?Q?3Cp5n89+8vvrOXUP2uHV9/8FDuZhyLe+HNCcLpiLNIW9OlcEoJ6e3CNWJQ7x?= =?us-ascii?Q?K0XoGalU7uqADYHAAjDUduenkHukJE+vCb027l78OkpjiXBpYgF09CvtOH4V?= =?us-ascii?Q?4DlZW/Kfm8YLVQdXDCkwLTYEraQbSM/rthNb/U46/8nr848KCpmlzjjgY8Sa?= =?us-ascii?Q?6s//lKanQpTRjdBDHCDoNpXsbfV57pgOxNOqM6XnoocvLwD8s0yFXzX+Suvo?= =?us-ascii?Q?qKFnKTod2GLrJLAY0s41g2Or8lzi3SaWabMIWaSpYK8FfqL8I+qoeW5BuZSB?= =?us-ascii?Q?nmeDOahfRoj5ZZfl6QWwoJYmvDnQQpoQTLXNuu0KiCoVLgAYB3OnH4rX5pEr?= =?us-ascii?Q?xsukEwV7IFETJAprtV2VcMnbDD2eZupGZz5V8FnHVrU0eQwjE5Fk+KapbnjT?= =?us-ascii?Q?jFGzH7KP458IwHg8owyikHiliyk07gfaOQNwg4JRfo7pOKomEWtyFuGtm6Yd?= =?us-ascii?Q?LLbA0dZfCN7E0OPYCu3zeGm6NXoZcxNB65P3LQroW77sscKzrvBnqGIffyz+?= =?us-ascii?Q?uOd4RBZih3fQQwxYTyt538Ys/lfRtRQH3bZ7/8jGHRWKUS60NG7fxWXjxbEo?= =?us-ascii?Q?JVW8UpbhvcBsQpxjcpisUGky6kLRsemOjsxqS0LNWk3LavInMOHTVu73Sfyt?= =?us-ascii?Q?8W4m0wkDmzYr8cYmSM29fy608LJQaPZ5Rkwzz+Ye/u7t3SeMuznmqaXoXaOn?= =?us-ascii?Q?Wmcp/23t1FCPnBrF0lIFWbHfxjzcoftWlLizvzL2DN4VPuPPtwoAYxw4WM5d?= =?us-ascii?Q?U9jU3wMnObh3nYXbCWlvK4Yd1QmUBNuh7FjAPc/BslRu+K+3fHjP/OLVW7Ea?= =?us-ascii?Q?4mJz9fxfklpsnjGDWucTN4VKyGfJaNVEXqZ7zFef1L5Eylr93mWKLPIYxhZQ?= =?us-ascii?Q?xLHxZYPtj3ihpvV4VpCKNjAxOIrDl9D+Yl0JXSgDe9GrCc6K1u2bcMBuutLb?= =?us-ascii?Q?/mkMuvYMYRSyTGTYISbXE/0zCmkUcX+h8c8G51StRkBXkI6BnJA?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3058; 6:wok6s0avDVc150/xsC52iyoeGXonm54KoDzOOSLoWqHG4cRBsxCRlpmR6f1yl1lD7kF/z77v14bexGfCpZcoTOMylq4BHfkJKlUvFilfoaTYss659aoHZkwJtGwYbPZuCf1p2c0A3RgMuL4dqAQxEVy4xipQ3rOJfku806E3lq5WBflqFxFnb1RKjn0PdtG1nHxLrmiYBBcS3NcRC9TTFoATecONoWLeSGWIkY0yfqCYOumZRiNLv1iMclreJxQ/iv95viGcuASD4CnsVC2LWJeKKm8f4PSuifzNgZM7baHEmoR/yli/2skB5UnWUPRMpng4YtNxusmPB0gfW4ZrTQ==; 5:ufgFRMIS9FVfJYDWx045TtlCPT5C3JyIaivJiW/mtERbXrh+afuatVhCqZzJhZAZUaV21fOB20sLuXxVFN7UNPLHQ0cvpSI8uY/77b6+YBzTUBkv9apC2Xm19LipKa3qgV6v6Fl4ZbfxlY3tUseFfQ==; 24:wUYFzQRI6EfaYxGvyiUmq61qI9Bd/S0Myj185SqIw3pQkHU4L6wtQ4mXganPA/SuBLBINOie2mOHKGY3obyMyiiycTL8UVDIy9EK7VgHIXY=; 7:/RRRYc+VztVJy57ZclCYpPJgFhf1rvzwtEUOIUm30c8cfXicpRVwVj6sTGRTlI9+GthQDXlDgaeeHOLpQbgJb6nDTAzhx8qITvzONHy8nTzkcnD96R6e/HxGQodN+VQRAdDzqdcsJJjlDtnGdUv2MmLBVI5AMjhTqqXnazaaX5VplJMVN0S4ETkjO0jCq0z/dICcPcAQOiPDjzt8yLvPHug+ThMpRj1HUHlmYoW8AnE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2017 07:01:11.9169 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3058 Subject: Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2017 07:01:19 -0000 On Thu, Sep 14, 2017 at 03:16:05AM +0000, Yang, Qiming wrote: > > -----Original Message----- > > From: Yigit, Ferruh > > Sent: Thursday, September 14, 2017 1:06 AM > > To: Hu, Xuekun ; Shijith Thotton > > ; Yang, Qiming > > ; Gregory Etelson > > Cc: dev@dpdk.org; Tan, Jianfeng > > Subject: Re: [dpdk-dev] vf init issue with patch igb_uio: issue FLR during open > > and release of device file > > > > On 9/13/2017 3:25 PM, Hu, Xuekun wrote: > > > I met the same issue too, only with i40e 2.1.26 PF kernel driver. > > > > > > -----Original Message----- > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit > > > Sent: Wednesday, September 13, 2017 7:04 PM > > > To: Shijith Thotton ; Yang, Qiming > > > ; Gregory Etelson > > > Cc: dev@dpdk.org; Tan, Jianfeng > > > Subject: Re: [dpdk-dev] vf init issue with patch igb_uio: issue FLR > > > during open and release of device file > > > > > > On 9/13/2017 11:48 AM, Shijith Thotton wrote: > > >> On Wed, Sep 13, 2017 at 07:51:30AM +0000, Yang, Qiming wrote: > > >>> Hi, Shijith > > >>> > > >>> > > >>> > > >>> VF init error will happen after apply your patch, error log as below. If > > >>> revert your commit, all things work well. And this issue is not only occur > > >>> in i40 VF but also ixgbe. > > > > Hi Qiming, > > > > I can reproduce the issue for the case: > > > > 1- i40e 2.1.26 PF kernel driver (NOT reproduced with 1.6.27-k) > > 2- DPDK app run on host, so both PF and VF are in host. Linux driver for PF and > > DPDK for VF. (When VF used in a VM, Linux PF on host and DPDK VF on guest, > > this works fine) > > > > And I confirm the function igbuio_pci_open() added with below patch is causing > > it. > > > Hi, Shijith > Could you tell why this adding is necessary? And confirm why this function will cause the vf init issue. As Harish said, it seems not only reproduced in intel NICs. Reset was added in open to make the device ready for init. I'm not sure about the exact cause of this issue and was unable to reproduce the same with LiquidIO VFs. Reset happens during open and if VFs are not ready by the time init happens in PMD, it can fail. Issue could be in firmware as we don't see it for all versions. If there are no other way to fix this, I think, it is best to remove reset during open as it breaks PMD from multiple vendors. Please try removing igbuio_pci_open. Thanks, Shijith > > igbuio_pci_open() does: > > pci_reset_function(dev); > > pci_set_master(dev); > > > > Don't know yet root cause of the error, will dig more. > > > > >>> > > >>> 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=yes nonstop_tsc=no -> using > > >>> unreliable 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 > > >>> 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 > > >>> Reviewed-by: Jianfeng Tan > > >>> Acked-by: Ferruh Yigit > > >>> Acked-by: Gregory Etelson > > >>> > > >>> > > >>> > > >>> Best Regard, > > >>> > > >>> Yang Qiming > > >>> > > >>> > > >> > > >> Hi Yang Qiming, > > >> > > >> We didn't face this issue while preparing patch. I think, Gregory > > >> tested it for Intel NICs. Adding more people to the loop for help. > > >> > > > > > > I will try to reproduce the issue. > > > > > >> Shijith > > >> > > > >