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 5244BA0547; Thu, 28 Oct 2021 13:32:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 186E741100; Thu, 28 Oct 2021 13:32:53 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id D328140DF4 for ; Thu, 28 Oct 2021 13:32:50 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="230239639" X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="230239639" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 04:32:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,189,1631602800"; d="scan'208";a="498362663" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga008.jf.intel.com with ESMTP; 28 Oct 2021 04:32:48 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx605.amr.corp.intel.com (10.18.126.85) 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 04:32:48 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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 04:32:47 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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 04:32:47 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.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 04:32:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LFjTajvnMCRmf7ixZ7hK/98fA3DUuBpHy5LNw0V/blg2Uq5aV5rPGhItqHh2cg6aPYkuNfid2bA0xyYmLveX8pm8WI8Q47jRKa+4ikrapcy74W1TNzMjkKHGW167/Fr77oWmD+Cc+oTtV1Qmx7/ZdrWcTUJ0WfgyYf0dPr1VugRqPXMLLFgExK2lGBeCNj7ougIT00ILaGkyGPbOAGpyGNHkk+37tSoSx+R9wdXUM2ET5x8gC+kQZ+fHZdJmTp1vnte0GQqtkaRgIh0DVbi3kZlrnNkmzYUtwGjPdsXttSNk48GEoRh3/cU0t+sxTkj3OMEgye94Q2OzQUIWbLsIIw== 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=khHwdUev7PQQlBk1P7OF38GXCbLbTDy4ZFVTFbbtLc4=; b=PmqJwJd/0oYe4ognD4DCD+bqSKArDdkploHYYcCvNcxvUeyWRFwiEWixbS/Ff/jQpQ/+tnz3HuEfnTmwXhq88KjyuwuUG9qIROpYjs80O7X340gi85mBHsc37y53wIEVUIded78GqrcEZujKskEdPXcABcJJI9/cLed07a+HgYEOThElSBnLRDoKYxrd3lcsqVRXJ+FAaSeJY/sWONSnvj+YPlJ/8TfVHP8B2kumHVSgo9euED0YX+3cKai8MFwHPul/eQdDStNxQJ1+rbJEm9R39Jt3I5+r6h1vsgwwbwG0LvF2Iq10mqaYmFl+YiSGdnC6pcuhfoPLdoi/vn6MBg== 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=khHwdUev7PQQlBk1P7OF38GXCbLbTDy4ZFVTFbbtLc4=; b=QJivJn2qPKj3/Hrnj4EyUVG7xeYxgqnWEc0QlkkwGm/E9gkwzfWuvS6RjcdVYSJzgxBKXb0dLM0xkrH9PRiFWsMFCS7nnGEC3XQnwaAIlZA5Oi9PQBsHFR/hGjduOaRkXGXR7s+6XYgOs5B9llcqzATJGHSfHCXuTuJL3yr1jgk= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5005.namprd11.prod.outlook.com (2603:10b6:a03:2d3::21) by BYAPR11MB2951.namprd11.prod.outlook.com (2603:10b6:a03:90::10) 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 11:32:46 +0000 Received: from SJ0PR11MB5005.namprd11.prod.outlook.com ([fe80::cd8e:780f:5a1c:298a]) by SJ0PR11MB5005.namprd11.prod.outlook.com ([fe80::cd8e:780f:5a1c:298a%7]) with mapi id 15.20.4649.015; Thu, 28 Oct 2021 11:32:45 +0000 Message-ID: <632abf1f-e912-4732-0c4e-893eb8679024@intel.com> Date: Thu, 28 Oct 2021 12:32:39 +0100 Content-Language: en-US To: "Xia, Chenbo" , "Burakov, Anatoly" , "dev@dpdk.org" , David Marchand , Thomas Monjalon References: <25dd76eca01ec57d64be9c0a78ac2752f602984f.1631788595.git.anatoly.burakov@intel.com> <8b8fd2e4-e7eb-26cd-ad32-2f284eacc24c@intel.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0316.eurprd04.prod.outlook.com (2603:10a6:10:2b5::21) To SJ0PR11MB5005.namprd11.prod.outlook.com (2603:10b6:a03:2d3::21) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DU2PR04CA0316.eurprd04.prod.outlook.com (2603:10a6:10:2b5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Thu, 28 Oct 2021 11:32:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4fe51b9-a368-49de-32ee-08d99a06a9a2 X-MS-TrafficTypeDiagnostic: BYAPR11MB2951: 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: jQCDBwv6e9o36gX9+PNA4UITvJ4d8KGrdomP30dnMkllWHwfjJyChrr8NKHyqJ6WnCSn1BoOkZJtfmmtVaEOx4WkYpbO77LjZsnHKDee7PM85XVEYZZHKAckSXA6EO0PGb/ZfqRadfjBpNbt+BaEb0kWiUG4w3DkVZkbCay9WAKw0UJ8y6J+ZRda7XrA+NU79B8FEA2VWzOT3rzPPW8zdDKpTkQspNl8adO6R6iprvcseJElA5ZP0xtlyt5ncKVYzD3U2y21ODvyCNrjGEpMFEtj0nFoUuw6cfYmx3QR4YQ4v2P74XYG6RLgV/kYJflkT0C4eE3R0caNYGAw7tOVl/rdNiSUh5iJCWg90ps4/LmGQIUb+blg2Q+X/FapRkH7PbTn6rOjgQWZ9t5tpd1RfAA35Y8i+TwXu4N9+NY5kRGxBDqmpac/TfYoxCgNLjN1MbqHBg+jBEZhR+sNef1uh9azlGBDNXCHWJgzcniHjQ9pIGxsFLdK7d/DQbYPGPWP3aOfx97hDCMmAIeKSR9o/i8DdLBfWBqNwsyOtCQH2un6uFHz/4wbpKcmq4K+YhHV0JJE3uqgCD0N08Rw4eYAzk886XT3hdtv+Y1jppiaIsAAId3b4dWYNvKQqn2rpDkEOR/MLVDpruAN4ekAeHa2zK77QxHsPQ8Lsd90M5eKpLgomBxiQ5e+HOU/9rp0D4D8aSPfUTqSoEYG3P0nt7h+0k66srF+QbFfxK0mcP4MFFw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5005.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(508600001)(86362001)(82960400001)(6666004)(5660300002)(44832011)(31686004)(6486002)(31696002)(316002)(2906002)(36756003)(8676002)(38100700002)(66946007)(16576012)(110136005)(66556008)(66476007)(53546011)(186003)(83380400001)(2616005)(8936002)(956004)(26005)(21314003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bkk3TWJVamRpL3JJbFh3VTFtTUovcFhtcC9DeXA1Mm5vZC9qVU0yUmVIZzlI?= =?utf-8?B?ZFpYbmV4WDNybFU0WHZ1d0RZdWNWY29JUkZtTGphOUFyb0VNNVowdkNoWGlH?= =?utf-8?B?eEZIQ3NFNElRSnliUVpEajBiZSt0Z2dVb0pCOE5FNDlVanVDcDdSYlZzUkk5?= =?utf-8?B?UUc2RzU2ZVIxdWgyUXlaN3lHNzl3alNHT2hSMkpBOHVIaTRvc29NTkRaYlIr?= =?utf-8?B?alJmWk5jbmZzQXN3VUdqaStXSmJUNnE1TG1qVGJnVkc3Z3pWUFFsb0NSbjFo?= =?utf-8?B?UUdHakp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zRmdnREeHg5cXlj?= =?utf-8?B?Y3B6MjFRb3FBUDhQUDhlVHN0RVRrRVhRWlJ5UGJwbXRGWmVnMGFsVUYyZ1dt?= =?utf-8?Q?ETnneW0uE3u/TTlc1cJxuTE=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d4fe51b9-a368-49de-32ee-08d99a06a9a2 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5005.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2021 11:32:45.8525 (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: +JY6Xp6Gv5eCJi9hp6qf/brV/LI3E+Ay70WdkvgWt+G0lOLEmxFd1ZmINRpoxJ3Nl9+NPjdE9ZiSVPaSzq9Zxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2951 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 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.