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 BF0C2A0547; Thu, 28 Oct 2021 16:53:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B14741140; Thu, 28 Oct 2021 16:53:08 +0200 (CEST) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id C96184111A for ; Thu, 28 Oct 2021 16:53:06 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 71AEA3201D40; Thu, 28 Oct 2021 10:53:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 28 Oct 2021 10:53:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= fRqk3b4IlSBwG9oEi6kDBASHcC7hg3wRLoJ9sz+QmJw=; b=Z6pfiv0JKaj1D36B DOPPiUIAcIi77OAqLtbU3jQiLJH013LjcjbmVRfznR31gDmN3Lbm76W25K9msdhT yVwrPRYMpzdvC6LAfyEwT5EbYysff0nyZ3m7TqpeB7XSXP5K1DQkFdUNyPsWClq0 UvYFIlJxMfftrIoRoyUO0RIEgzi/c3GmhKi0eiU26vyUsPzO/FauIhZJONa1jtyy r9eClVn4uh09i5ENQTAjfhe6EIZWELH1ni7iohA8w+maWbn2ZnNHFD4Q4l1IDGAZ 8cQ2c3pLTCsiH8JBXG6RMZYlin7gYwh/0fdfFJcVHleYp42WRKtELiBXh3dN1On7 tg18qQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=fRqk3b4IlSBwG9oEi6kDBASHcC7hg3wRLoJ9sz+Qm Jw=; b=HYhsjGEyZWz4zMd4oWnKGJHB5SLaRqWH6wTcbGnYuSNhkZbpZPKeSbdVJ cswXFKWJ3O5huFs4+XQrwiQnLZ8foQUEsKe9C/Rrb+oFrg7mRUBVYAynMf2X81de hO3ugHPk16TfaHlpJS0e2q7CubkuySvyKJJai0PJ2FfuZr6HjML7rT1SoQqJfN4r xY4GjO7dbvWGoNyjYPQOaI/kG259xQ2J6VU7PbwLrb6os6wVWn7hv68m6JPohpO2 Wl/hLkXv+V9h3nZpE7Fnyp3uV117cO/LYHzFW+ajbwrLRBuy4TNV1mFCkSVCio6T CwHm+bLJTo2EB/d/GNNMU78XraF0A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdegvddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 28 Oct 2021 10:53:02 -0400 (EDT) From: Thomas Monjalon To: "Xia, Chenbo" , "Burakov, Anatoly" , David Marchand , Ferruh Yigit Cc: "dev@dpdk.org" Date: Thu, 28 Oct 2021 16:53:00 +0200 Message-ID: <9347411.UhhQB40C69@thomas> In-Reply-To: <632abf1f-e912-4732-0c4e-893eb8679024@intel.com> References: <25dd76eca01ec57d64be9c0a78ac2752f602984f.1631788595.git.anatoly.burakov@intel.com> <632abf1f-e912-4732-0c4e-893eb8679024@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 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.