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 F00B7A0547; Thu, 28 Oct 2021 17:40:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79C9F41140; Thu, 28 Oct 2021 17:40:40 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id C4D054111A for ; Thu, 28 Oct 2021 17:40:38 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10151"; a="217614380" X-IronPort-AV: E=Sophos;i="5.87,190,1631602800"; d="scan'208";a="217614380" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 08:40:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,190,1631602800"; d="scan'208";a="573789606" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by FMSMGA003.fm.intel.com with ESMTP; 28 Oct 2021 08:40:36 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 08:40:36 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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 08:40:35 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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 via Frontend Transport; Thu, 28 Oct 2021 08:40:35 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.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 08:40:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VLLufEnqTt7DVWHdACDQgVueoZ3mVwg91dB+/lyzX7K086PjOPByCvOmsesBjAPKIokI0ej0TyFxJzH6MrlRhloO5zBpuOukHyhLTjb4laorrdElvX6G3k1sAkX5vUKaDIbs9FuARd59vQkWjhxaW0U6dNMT0boGrwjM+cHs7yVENWnqPY7GylQjYglbYIiWN834P7MYp9ZyOm8IPJwXYqMjqatnDlRw1QPYvN9lpE5040vkzjOK+K5euEVSpbn9euBC5wAlKNv6nISX6nthTrgiXzUsH8Uibj86f/bbIVqnf4lMkRFAMbfAMoVnxAON/rZEZYeHNTHSUP6WQIUI8Q== 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=MMhdJEq7PaLHyNea59eqnBPLjiQOEZH9OJt6/r/huGc=; b=S7grnkyQw0f7fTvMxjzvTvC3pN0oWm9Am6Wvh4uZA8SuIk4YnKyjUvI+ORZyc0H4BlBbmyjotHDmX/JSitboVszfHCSbF5pjeXsqXHMKKa5TXyZ1xzKmEvFvtm32LoYXmqi7nyf9IRdLuF+6K/a/yRq7kL/yD7pcTaUySzL3o7kL3wQIPHBN6RIH500KHyqwL/gprVErjqx4YpNkJYgc6klOlJSzgGf3TLCaxbPOE1EcUjQDSflDeMHibAaJX09naNNoIMK6VWyupYrqlP/XGHmb6f1QCw7UESjC2Uxkzv7fk16i6BfkIyh5jCC+lw8Unm4JZqqHqtiUuG66pC4C8A== 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=MMhdJEq7PaLHyNea59eqnBPLjiQOEZH9OJt6/r/huGc=; b=HOrydu9SsmtC3KXjtJSADcSjmyqJ7J9Ayj+301kIkj1vHHH8WxtYhtCIzd3bNQPTZWMfyDMDMeJEe76rkAQUFRsTY5ntLsMujFGXkH3oJpQvHhYZKak312f/KcsiJYjz7fD5FaY2lLH7CwBdGtc1+4NinwmtNsp7CrOzpIqSZBg= Authentication-Results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) by PH0PR11MB4805.namprd11.prod.outlook.com (2603:10b6:510:32::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.13; Thu, 28 Oct 2021 15:40:35 +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 15:40:34 +0000 Message-ID: <3db19e94-dd25-e9ca-80ee-e4fea233f1cd@intel.com> Date: Thu, 28 Oct 2021 16:40:28 +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: Thomas Monjalon , "Xia, Chenbo" , David Marchand , "Ferruh Yigit" CC: "dev@dpdk.org" References: <25dd76eca01ec57d64be9c0a78ac2752f602984f.1631788595.git.anatoly.burakov@intel.com> <632abf1f-e912-4732-0c4e-893eb8679024@intel.com> <9347411.UhhQB40C69@thomas> From: "Burakov, Anatoly" In-Reply-To: <9347411.UhhQB40C69@thomas> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0336.eurprd04.prod.outlook.com (2603:10a6:10:2b4::15) 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 DU2PR04CA0336.eurprd04.prod.outlook.com (2603:10a6:10:2b4::15) 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 15:40:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9b653ee7-276a-4e57-2062-08d99a29483e X-MS-TrafficTypeDiagnostic: PH0PR11MB4805: 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: kxszZ1vvJhtXSwsmFeU6Q/+Ucg5Mcd0XXagHcZVJ3tdeMw+46Ax68wIv0ol7jTvN3DVUa54tHpnVep1GvV6n2ffD4cyrg0+YymGCNyaYuN7bebkd43NHuXZmOdYI+tIJpv4/8w4Y34MNMCoDsu6jJ+Mi94tNXYT29P22lh0OYUTIXys+IqA6r+WP6I2P5nqvv/t8FUGjcR4qF9Wx0Q8/F1iuqpMcL7NU/T5PsKGxlB/EUwLyIdSYS1cUY/fGglhRFpv6HFT1jxETKyUXH/pglkFwpUQZdmcfvxLuZcWipxhCfZBJlwqy1vkq3tmvy1EoivCl8GsJD/yWIYR4xvBM+Gy8jl/bUOiLntmGCasHIHM0s/pALjjWLhjxJlnJLAu7blVbuDUAuXOh3iBa7WTpIb4xzw1ZICedkOrnlt4g6zAJEFxLOjR/DokzDO0PMIsoR9Uwuavzzh8t/NrskiBH+ZGyBsy7fIcVFXWVzMqm2ezYI+a/C5g0Wxt6Our+7lXmvJ4dYX+gyD79rQP+7mozi0YG54mTmEaRHwzUCkAYjvouWGUXwv/jEY6UmVfH+XWtG5fQwZ4mizi8x7tf2++wkpeL/uipHjAh/YkUYVEjs1Tmx/7d3oso68GbApbpSiKRvKqQSDjPKyDiSinJ2f9dNfa9hnGvlUCm7IcrSAkBSNxaWYlrm6+e2lMdUepzIwfjyNVWF7cprb80nArIKHH/qVfRzjQ8CPNI+e8k0hiPUyiRD9eTV/wPFEmNs0DQYzcRzaqjmZGGHMrL2D+YcjUVpA== 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)(5660300002)(66556008)(26005)(66476007)(6666004)(83380400001)(6486002)(31696002)(2906002)(36756003)(8936002)(86362001)(316002)(66946007)(186003)(6636002)(110136005)(508600001)(4326008)(16576012)(956004)(2616005)(38100700002)(82960400001)(53546011)(8676002)(31686004)(21314003)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZTlkbmpVREE0dm0rTDBBNWI0Y0xYajUyRWRlZlp2UlBxZ04xdVk3SUR4cXdD?= =?utf-8?B?OGFxN0FVczFqRVZGYWdVSHRkUkRUUWplY2V3WmdzQTJWVE54c0pha0lmK1BI?= =?utf-8?B?MzVBbVg0eWI5NnNqZHlFM2tCR0Q4czgxWFB4eXJkUkJxUnRycHBRdXFTRG5x?= =?utf-8?B?dUUyYzlQSTl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lZ?= =?utf-8?B?QUFOTmVkZWJ6bzRrdHBXQXpXWlhIblFjWTBVKzl1SkgwWXk3ZG5oYnBqVy9Y?= =?utf-8?B?ZEY5bDhTT1hPb3FYc3JrUTlWUWxVR05nY3Avb1NoZ0Nta0NoeEhhMzYzUy82?= =?utf-8?B?RjAvcUJUMkJCZmRYZVc0cHFvamIrekNiam1VRGp2bXNnMHZpRW4vZGFVWjBt?= =?utf-8?B?MTBzaVRVVkhtaFBXSFVZOHRCQVRaVCtUUDNsL1JyY2pGckU1VktFa3lsRWx2?= =?utf-8?Q?b3VUKgXiQi7LPgVEDoTsF1jdcyZQ3NvlfasbYv5L1Q=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9b653ee7-276a-4e57-2062-08d99a29483e X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5093.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2021 15:40:34.8572 (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: 7frAVnV0GOfLiYiDfFsVCCx1blwqRtS0kzsFtWVJNAzM+HzC3ikGNm+dzKM12SBG+8MGgzAAKFCN7MZk9cS/Q8UDWzXKQjmTEdh/3IS3N+c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4805 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 3:53 PM, Thomas Monjalon wrote: > 28/10/2021 13:32, Ferruh Yigit: >> 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. > > Do we have a kernel version check at runtime? > I think we should add a warning if running too old kernel. > Perhaps we should (there's a `uname()` call, should be fairly straightforward to implement), but obviously this would be outside the scope for this patchset. -- Thanks, Anatoly