From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 9248C234 for ; Wed, 10 May 2017 15:31:08 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2651320A0C; Wed, 10 May 2017 09:31:08 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 10 May 2017 09:31:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=AUATSiWg/s5wQct /oTvIcuPlXaRwpw3DrOQzUC18Cbs=; b=sEFma56IRq6J1jaFyuFNbUmQuqipBZp R9h33I/sny/oTAOfQ30NVL+EltYAKbNWoTcYcE9utpDMh8x5YXNn67UoEZyiED5p 2bisubDDRCrcKuoQJXA7h9wBKGRE61y7MARXfsJUDMcyFPGzl0ty0m6Xfxd5lBT0 f16YyVCTTKfo= 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-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=AUATSiWg/s5wQct/oTvIcuPlXaRwpw3DrOQzUC18Cbs=; b=k1XqtJ24 ZVGYfaeeYtMB/kJY0m7o3pwvH0wbN1+b2sfWvgGbXXRatQsUJZ06oVX/XyA9LJBh mWp16nublDoKe0JohhgWYGn911Y+kbZO76kWwVvVlT4J/cprJ12NPLFRAh7qWYMD x/Dti8R+05aIMfhrijkqecSPwgXrqwFHt2V9BV1K3xANvFTnNGf9jyXEzlgz++GQ hthYT9+Pfk3rF8CCbyj5Old2r4ivYgdYbiqQpZ0fsYNQ6MBqLlH+74e7ZOs1zAHe eEk6+niA7ZNzrxOb7z8//KssAUJPex6kkzsX9DM1I42f74BSbcp0XNHy0wIrlPvv D6Ev4Gu35cwgBg== X-ME-Sender: X-Sasl-enc: vBGZ7cSGLHhsBz/7XlJ4tqfnmmZxg8xCRoyPf0hWwQbS 1494423067 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D4AE3240A5; Wed, 10 May 2017 09:31:07 -0400 (EDT) From: Thomas Monjalon To: Alejandro Lucero Cc: dev@dpdk.org, "Burakov, Anatoly" , "jerin.jacob@caviumnetworks.com" Date: Wed, 10 May 2017 15:31:06 +0200 Message-ID: <21359258.pi0qq8Dcof@xps> In-Reply-To: References: <1494406463-24517-1-git-send-email-alejandro.lucero@netronome.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] vfio: use right index when tracking devices in a vfio group 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: , X-List-Received-Date: Wed, 10 May 2017 13:31:08 -0000 10/05/2017 11:11, Burakov, Anatoly: > From: Alejandro Lucero [mailto:alejandro.lucero@netronome.com] > > > > Previous fix for properly handling devices from the same VFIO group > > introduced another bug where the file descriptor of a kernel vfio group is > > used as the index for tracking number of devices of a vfio group struct > > handled by dpdk vfio code. Instead of the file descriptor itself, the vfio group > > object that file descriptor is registered with has to be used. > > > > This patch introduces specific functions for incrementing or decrementing > > the device counter for a specific vfio group using the vfio file descriptor as a > > parameter. Note the code is not optimized as the vfio group is found > > sequentially going through the vfio group array but this should not be a > > problem as this is not related to packet handling at all. > > > > Fixes: a9c349e3a100 ("vfio: fix device unplug when several devices per > > group") > > > > Signed-off-by: Alejandro Lucero > > Acked-by: Anatoly Burakov Applied, thanks