From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6813EA052A; Fri, 10 Jul 2020 19:10:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 149251DCBF; Fri, 10 Jul 2020 19:10:52 +0200 (CEST) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by dpdk.org (Postfix) with ESMTP id 9FDE01DCA0 for ; Fri, 10 Jul 2020 19:10:50 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id E53AB580192; Fri, 10 Jul 2020 13:10:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Fri, 10 Jul 2020 13:10:49 -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=fm1; bh= HUFnKlkDUUKc8zlHu9w/M3uRMiTGM1F6zFpK4svK1qE=; b=Ith7vregUBLQjLiM L+vyileCbugTyxH65oMYnkT1Ky23cLJ731e/CkFjSxMyn0oHlFRxlHSu9GwXhaIT w5kggNdQ/xUeAIdepZUKy/Wn7/6Cn8EfXviCtGJ/3Bf1TwhcOnDIVL5fH6HlkfYT mfQCIN7d1lRXxGDDjOvHZpBgd358Ww8ku7WelgStYvYdKUB0EnkNJGfcm1l7nLcm xPIotDqtJLT4xj1ws1etHTisNx+5d1ncXMtejEcuZsK7LwRz15IGxWIxkb5/otjD zoZdkYLIVUmJlkvqkys7htplZ/inxmZ0mMnd7yipaItx/zn0wI5m0ePANalJCSUw 07eyXg== 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=fm3; bh=HUFnKlkDUUKc8zlHu9w/M3uRMiTGM1F6zFpK4svK1 qE=; b=A1NHah93J3hvotwjr5SxhzuPWRZlXa+AV2m52bRPC9Jw9yYnDp0vUxdw+ 06Vp+tQtKT941BJFd1nPokbTiJ+gzuakTbNzGUdBDcPqtFq4MhIajsOx96UuZBC6 DMNONSNMKZpjxkMOlJ5n45HzLxhbIgW3WcJJNrMWjBB40k61IiuufLZnZhc8ad+9 4Ns5vvtDPNy3FA2hddBpD3ZeHHhQfUrYo5lRqJZ0QKJUloS3XdkXDnyrhesypUIp iVAmczkWIkXOvqO/I2UjdDLs3bSJOw0d+FNCytoo2pvbGzaTogCsnktLCClvf80p 2aaLM14NbUKSMvmRHSobDHcLqEw1A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrvddugdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkjghfggfgtgesthfure dttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedugefgvdefudfftdefge elgffhueekgfffhfeujedtteeutdejueeiiedvffegheenucfkphepjeejrddufeegrddv tdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 76A3C30653C5; Fri, 10 Jul 2020 13:10:47 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, ferruh.yigit@intel.com, grive@u256.net, alvinx.zhang@intel.com, beilei.xing@intel.com, jia.guo@intel.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, dmitry.kozliuk@gmail.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, talshn@mellanox.com, john.mcnamara@intel.com Date: Fri, 10 Jul 2020 19:10:46 +0200 Message-ID: <3104256.ebP8yiEEYA@thomas> In-Reply-To: <20200710115324.3902559-1-thomas@monjalon.net> References: <20200710115324.3902559-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] pci: keep API compatibility with mmap values 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 10/07/2020 13:53, Thomas Monjalon: > The function pci_map_resource() returns MAP_FAILED in case of error. > When replacing the call to mmap() by rte_mem_map(), > the error code became NULL, breaking the API. > This function is probably not used outside of DPDK, > but it is still a problem for two reasons: > - the deprecation process was not followed > - the Linux function pci_vfio_mmap_bar() is broken for i40e > > The error code is reverted to the Unix value MAP_FAILED. > Windows needs to define this special value (-1 as in Unix). > After proper deprecation process, the API could be changed again > if really needed. > > Because of the switch from mmap() to rte_mem_map(), > another part of the API was changed: "int additional_flags" > are defined as "additional flags for the mapping range" > without mentioning it was directly used in mmap(). > Currently it is directly used in rte_mem_map(), > that's why the values rte_map_flags must be mapped (sic) on the mmap ones > in case of Unix OS. > > These are side effects of a badly defined API using Unix values. > > Bugzilla ID: 503 This is urgent. i40e does not probe in some cases. If no test is done, I don't merge it and Intel will complain about validation issue in 20.08-rc1. And next time, I won't rush on bug fixing.