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 695EC4550C for ; Thu, 27 Jun 2024 16:00:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DFE240E09; Thu, 27 Jun 2024 16:00:49 +0200 (CEST) Received: from fhigh4-smtp.messagingengine.com (fhigh4-smtp.messagingengine.com [103.168.172.155]) by mails.dpdk.org (Postfix) with ESMTP id 7FE6940BA3; Thu, 27 Jun 2024 16:00:47 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 1DBBF1140207; Thu, 27 Jun 2024 10:00:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 27 Jun 2024 10:00:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1719496847; x=1719583247; bh=/jKtO1n5UV6G4wZDX9I1SCQ8p3IlvwGGz5rUVICdh04=; b= E+U/z9YxihtPl3790BUgAWisMiV6GLxib4YGG2KUDhV3MC2VWtwdM6nHpsLDRGXl av+LZmzMEEjuahmngiJgJ+nIyV4GF0HvtGdthUJOjSz/OSvWcnAU25MoxIkE9XDK LxkejxrsZoVLKuRYeymcJ6w4yev/OjWPYuGSYMV4W1a1u4FCepwkWRc9H5LlYN/B WgdnVW7YDXIIM6EnkEnN32qZwYsU3xvTCcssimyHlmXlQNjIm+RqY7tNWYWPc/qN S+KyzIISgV4cUXuDTzRVlFrr5ZDPcBecTeFSBWrsPYkC3x2fdlKnT8iln+JVib6P heRaSiY+GY2P5JJU8g5Omg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1719496847; x= 1719583247; bh=/jKtO1n5UV6G4wZDX9I1SCQ8p3IlvwGGz5rUVICdh04=; b=V nABoaLKg8k4zB13zDAXJetjzT3uR1uREjX/CiK/CXIS4apQIWKUrnZ3GELTe8qLG KQp1mVgYfZgIosEySJja1QS7NLjHkL5JWElv6UTWqCIp9N4HctbJTObQzZW11+oC xh9wKRv03zlPdZvIxd8ENVFz1tm5/pTWNnVjbsprCMZMQSta9esCM0jbu+3pJ3WH 84tjyh8VjIK+RGSVmU0ytIe0CTgvnwAqcyrVEoKNUO9MeRr2s/LwUA/wL5j3oP3W qrxTwk/7XGl01Je4H5YAUwZStOCmWv2uY0YuCii/wBBUeQCIG98MuXbf1QHWcR5x zCowuXftyJwdwsh4Hi97w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrtdeggdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepjeduveehieevuddutdevfffgtdegkeeuveejffejgedtgeegkefg vdeugfefkeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Jun 2024 10:00:44 -0400 (EDT) From: Thomas Monjalon To: Chaoyong He Cc: dev@dpdk.org, stable@dpdk.org, oss-drivers@corigine.com, Zerun Fu , mukawa@igel.co.jp, stable@dpdk.org, Chaoyong He , Long Wu , Peng Zhang Subject: Re: [PATCH v3 1/2] bus/pci: fix secondary process PCI uio resource map problem Date: Thu, 27 Jun 2024 16:00:42 +0200 Message-ID: <2723233.FGBNh6B6GM@thomas> In-Reply-To: <20240419032630.1215256-2-chaoyong.he@corigine.com> References: <20240129092231.3531217-1-chaoyong.he@corigine.com> <20240419032630.1215256-1-chaoyong.he@corigine.com> <20240419032630.1215256-2-chaoyong.he@corigine.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 19/04/2024 05:26, Chaoyong He: > From: Zerun Fu > > For the primary process, the logic loops all BARs and will skip > the map of BAR with an invalid physical address (0), also will > assign 'uio_res->nb_maps' with the real mapped BARs number. But > for the secondary process, instead of loops all BARs, the logic > using the 'uio_res->nb_map' as index. If the device uses continuous > BARs there will be no problem, whereas if it uses discrete BARs, > it will lead to mapping errors. > > Fix this problem by also loops all BARs and skip the map of BAR > with an invalid physical address in secondary process. > > Fixes: 9b957f378abf ("pci: merge uio functions for linux and bsd") > Cc: mukawa@igel.co.jp > Cc: stable@dpdk.org > > Signed-off-by: Zerun Fu > Reviewed-by: Chaoyong He > Reviewed-by: Long Wu > Reviewed-by: Peng Zhang You should have kept the ack from Anatoly here. > drivers/bus/pci/pci_common_uio.c | 40 ++++++++++++++++++++------------ > 1 file changed, 25 insertions(+), 15 deletions(-) There are too many changes in this sensitive code. Please could you introduce a first patch for the renaming of the variable "i"? It should make this patch simpler to read. Thank you