From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 36D1F2BAA for ; Wed, 10 May 2017 11:11:51 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2017 02:11:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,318,1491289200"; d="scan'208";a="1146083898" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga001.fm.intel.com with ESMTP; 10 May 2017 02:11:49 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.12]) by IRSMSX153.ger.corp.intel.com ([163.33.192.75]) with mapi id 14.03.0319.002; Wed, 10 May 2017 10:11:48 +0100 From: "Burakov, Anatoly" To: Alejandro Lucero , "dev@dpdk.org" CC: "jerin.jacob@caviumnetworks.com" , "thomas@monjalon.net" Thread-Topic: [PATCH v2] vfio: use right index when tracking devices in a vfio group Thread-Index: AQHSyWsb4SCfbafuwEyOlSJZEAH+NqHtR/bA Date: Wed, 10 May 2017 09:11:47 +0000 Message-ID: References: <1494406463-24517-1-git-send-email-alejandro.lucero@netronome.com> In-Reply-To: <1494406463-24517-1-git-send-email-alejandro.lucero@netronome.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_PUBLIC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTE0ZmI2ODMtN2FiNi00MjAxLTk0ZTAtNDkxOTgwYjZjMGZkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNi41LjkuMyIsIlRydXN0ZWRMYWJlbEhhc2giOiJWVUI1OWtXRGE3SU5sZWdXZUdSbXVaVVNveEx6aEhHSXVUa2h2UFRvWmVzPSJ9 dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 09:11:52 -0000 > From: Alejandro Lucero [mailto:alejandro.lucero@netronome.com] > Sent: Wednesday, May 10, 2017 9:54 AM > To: dev@dpdk.org > Cc: Burakov, Anatoly ; > jerin.jacob@caviumnetworks.com; thomas@monjalon.net > Subject: [PATCH v2] vfio: use right index when tracking devices in a vfio > group >=20 > Previous fix for properly handling devices from the same VFIO group > introduced another bug where the file descriptor of a kernel vfio group i= s > 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 vfi= o group > object that file descriptor is registered with has to be used. >=20 > This patch introduces specific functions for incrementing or decrementing > the device counter for a specific vfio group using the vfio file descript= or 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. >=20 > Fixes: a9c349e3a100 ("vfio: fix device unplug when several devices per > group") >=20 > Signed-off-by: Alejandro Lucero > --- Acked-by: Anatoly Burakov