From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EDCF2A0547; Thu, 28 Oct 2021 15:00:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D245541140; Thu, 28 Oct 2021 15:00:20 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id E8C0E40DF4 for ; Thu, 28 Oct 2021 15:00:19 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="217573840" X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="217573840" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 06:00:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="597786361" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP; 28 Oct 2021 06:00:18 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 28 Oct 2021 06:00:18 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 28 Oct 2021 06:00:18 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.170) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 28 Oct 2021 06:00:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LcndHt+IOipAwbLwVZuDgNrbJ51N2qWPOdq4nV7XUyOaG/UY/J1UdEzUSfvI8jj1AE9hM9gv7QhIpX1D2ku2umVnAeEzEOTaqJTi+/8iPVSX+MEwlBIPrHvQ/zcYzKkr5q9svL4TaJ2lMuwLKNanqdOlkCGHy5JOi5kzaNozRJhmB69uzQu73sLPUl8W3/uCV2VXQa6O7hOlAAQX80Ju/Qt70bI4iU7yxxli7GTcNLEh+vOig4+J5hdcTD0PP2BT7y5jZ2PKGMoyFBAe+acKNdeiBSUfIT3v4HKbjsV3DdS7lzYMWAwwLDc+042VPsbs2sMp8txSdchNeEAL9kFB3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=et9nun+JfXQNBT83+7Y2rh2oVSAZVNz2pEtBN4Ff73U=; b=dWlDBljccdEQguRhjSi3CzdPen3fqCcagH7kAmXp/57XCc+25f0gsDKBooSM2qKVMgW8Iub5yoDlirExXdvNeBO4U9nLpuH5yRz3dnCnwLt7lVsnagDpC314Xu8zTRUEnhBuQIGaCy4QzuQEdoNXUPIKqjpohXQUA4AlrwLvTtdb7pj5ag7qhSkgmAO1NvHIauIfk1l6d4DVtpVgC1qcxIqs4NEzSxeEpsMUySQd6myC813bjAHWLWbNA5/Gm14bOgDTbS7ZV6Xl1OilhC8x+7GRctYh4Nhp4TrBf3Do8+ZFadCQBwoUCh5HhDjzADhbL1DkvU8odQejRAc5t4MR2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=et9nun+JfXQNBT83+7Y2rh2oVSAZVNz2pEtBN4Ff73U=; b=KnS4DUhqWATcWkg9o9aO6tlGUHDmw3jXWkHTwQVMMuKztnKqrYmhJ2HdRdZFaPmB70vFdBtJYHM4T6IrD2a8E16YSr2SaAJiQDy19mfyfbmiKhStQUz9JzP09Vp+5+GDLtN7BHX/t4jmu3MciTw9iGahSZvJ97bTphbCWoqvgq8= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) by PH0PR11MB4933.namprd11.prod.outlook.com (2603:10b6:510:33::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Thu, 28 Oct 2021 13:00:16 +0000 Received: from PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::a80e:d881:3c58:9730]) by PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::a80e:d881:3c58:9730%3]) with mapi id 15.20.4649.015; Thu, 28 Oct 2021 13:00:16 +0000 Message-ID: Date: Thu, 28 Oct 2021 14:00:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.2.1 Content-Language: en-US To: Ferruh Yigit , "Xia, Chenbo" , "dev@dpdk.org" , David Marchand , Thomas Monjalon References: <25dd76eca01ec57d64be9c0a78ac2752f602984f.1631788595.git.anatoly.burakov@intel.com> <8b8fd2e4-e7eb-26cd-ad32-2f284eacc24c@intel.com> <632abf1f-e912-4732-0c4e-893eb8679024@intel.com> From: "Burakov, Anatoly" In-Reply-To: <632abf1f-e912-4732-0c4e-893eb8679024@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2P250CA0004.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:231::9) To PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) MIME-Version: 1.0 Received: from [192.168.1.10] (212.17.34.161) by DU2P250CA0004.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:231::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Thu, 28 Oct 2021 13:00:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99269529-6035-4380-a5c8-08d99a12e354 X-MS-TrafficTypeDiagnostic: PH0PR11MB4933: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7/QdTZxl9vVCA9VmzuiELhHqZxbWv5fnp2elxGLF/gsEMOzHSjlT3GP5m3MPVvk+5rrn5sBbjpNR+pg2qxiM+AbA1fF3VtquXr3pYNLH0MCXN/t2I7I7cWVNGQ26oNtx8Pjy5QVI/nL3e9QATBIYT46QknunUYiBIrjZ3FlkUfD6P/Y8y9xVBfVH9rHee3UzWxjLm7MAummC3sgV3z2PDOEDSWxgnU6NfDJtljnopD3HSeb9MDCbwe8nOdyOmtBYbtaP9a/XZBSxXRnEaRyMmgWWqSYMk8YXK9SQJUDcS9iGBhdq4gxLv4YsjFIaX+Hrmv28SGPLLCPE9rtOcywMELHOm1YjF8fe3PQwsh0BWG8h3b1kHsgpr+0zpJsxw7x0V6Nyu/mOpwe3J7fdG1cSTLSVh3oDgUYcT6qc+6hOHj+yMzlb1nYzTk5AIjgcgjQWGXvZ+9Rg2ojZJrt7nwYRdWi/OkDWLTSoyTe7xY+eB6r1MftODxzGdREl4fW/FWjsqNB3a5ux5fs1uU6GnwRUpkyd515CJr20Fok1Y/wbHI6O+EBadM81IjsellarYO7BP34Oy30JxG3ZoFrf7FYNGFUiKRkXNvE9TE4NcDe8cOIBh9k1f9WiMkcWLQp7q926t7UZQ4pjd9y6K/8w4qcPmdSUQ7QcPS23VRDN3gKx2SNxRwqckXqrg6qBOP7bJdK+kv7piyUA7/GnTqlfZXqGCVNzJtWpdTdkbGSafARHl6K6JiXqgDLLz4CJc+qRJIsHkDP6YkKopHaAXvfgLW9HZw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5093.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8936002)(53546011)(31686004)(508600001)(83380400001)(2616005)(38100700002)(66476007)(8676002)(66556008)(956004)(66946007)(6666004)(31696002)(110136005)(16576012)(316002)(5660300002)(186003)(86362001)(2906002)(82960400001)(36756003)(6486002)(26005)(21314003)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bVBraGN6bjF0dFg0cjhEbVB1ajV1Q083NjVhc3did0JGTWpuV2JrcEdzb0pU?= =?utf-8?B?dUpaZElpYVJqbWtVTkV4UHpqaXQyQUtOY3RaZDhhSzMzbGU3V1dxNnpTa3Iw?= =?utf-8?B?VDJwSTc0TmRGdmxQcGVZeVM2LzB6QmpPUm5nM0doUlRGaDJuZ083Qk9RLzhZ?= =?utf-8?B?T1lXQlp0Qk1xb3oybDVVTk9HQW90S2s4OWxXWGNXY1U0K3NBWlhiMGFtMEU5?= =?utf-8?B?L0RMSG03WFZFNG5VUnVJS2Z4MTZ1T2xxZEJlY3QyVit1SEJqais3WDE3SERs?= =?utf-8?B?Y1ZhOXByY1J5V3pITHcxUFpUZXNVM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WDNzN2oyYUlnNEdoeFMrUzVk?= =?utf-8?B?R1dRK3FrK29LZGxRWHdZZXY2d01ORVRNRGV4Y2dPYmJhcWJVWVhvQ2dsK1V4?= =?utf-8?B?Z1FKcHJvRzJXaXNiQUNuNGhPNS80eHFtTDlrSFNzZkMwZGJ0THBzRmowMlNZ?= =?utf-8?B?OG1zYytjKzdQeUJZTFpyQy9UaEJRPT0=?= X-MS-Exchange-CrossTenant-Network-Message-Id: 99269529-6035-4380-a5c8-08d99a12e354 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5093.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2021 13:00:16.7553 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: aweGrK5sPwpq/CpAB+Z7/UTY+eWh4wQEzuVNnc+BtxXmFg2Tn4OqcvOVFtBvMne2BRPEIFXz8m8R7rQKXime/UrMTZ9P0NJWX9qlZD9mcAQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4933 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v1 1/2] vfio: make API return values consistent X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 28-Oct-21 12:32 PM, Ferruh Yigit wrote: > On 10/28/2021 12:11 PM, Xia, Chenbo wrote: >>> -----Original Message----- >>> From: Burakov, Anatoly >>> Sent: Thursday, October 28, 2021 6:30 PM >>> To: Xia, Chenbo ; dev@dpdk.org >>> Subject: Re: [dpdk-dev] [PATCH v1 1/2] vfio: make API return values >>> consistent >>> >>> Hi Chenbo, >>> >>>> And do we need backport? As 'return -1' does not align with the API >>>> doxygen. >>>> >>>> Thanks, >>>> Chenbo >>>> >>> Maybe it's the FreeBSD implementation that needs to be adjusted then, >>> because none of those functions are valid on FreeBSD, and the >>> documentation for VFIO functions explicitly mentions that on FreeBSD, >>> they should return an error. I went with adjusting Linux implementation >>> to minimize the amount of changes we have to make (and only change code >>> path that no one uses in the first place), but maybe that was a wrong >>> decision. >>> >>> I'm not sure if changing the API return value to match what was >>> documented counts as an API change, so maybe backport to stable is not >>> advised here. >> >> It's not a API change. My point is whether VFIO is present, users just >> use >> the API to check if vfio support is there. In a kernel version that >> does not >> support VFIO, he uses 'if(rte_vfio_is_enabled(XXX))' to check as the >> doxygen >> says its return value should be 1 as true or 0 as false. He will get >> true (-1) >> but VFIO is not there. That's why I think it's a bug and should be >> backported. >> >> But I think we can first discuss if we should drop the dummy >> implementation >> as DPDK requires Linux kernel version >= 4.4 now so VFIO is always >> present. >> I think it depends on by saying 'DPDK requires kernel version >= 4.4'. >> It's >> a real _requirement_ or only a recommendation? >> >> Ferruh, David & Thomas, What do you think? >> > > My understanding is, it is a requirement. DPDK does not guarantee > support for > kernels < 4.4. I'll resubmit with some changes then. I'll drop the fallback entirely, and check FreeBSD implementations for bugginess, and maybe correct the doxygen comment where necessary. -- Thanks, Anatoly