[dpdk-dev] [PATCH v2] vfio: use right index when tracking devices in a vfio group

Burakov, Anatoly anatoly.burakov at intel.com
Wed May 10 11:11:47 CEST 2017


> From: Alejandro Lucero [mailto:alejandro.lucero at netronome.com]
> Sent: Wednesday, May 10, 2017 9:54 AM
> To: dev at dpdk.org
> Cc: Burakov, Anatoly <anatoly.burakov at intel.com>;
> jerin.jacob at caviumnetworks.com; thomas at monjalon.net
> Subject: [PATCH v2] vfio: use right index when tracking devices in a vfio
> group
> 
> 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 <alejandro.lucero at netronome.com>
> ---


Acked-by: Anatoly  Burakov <anatoly.burakov at intel.com>





More information about the dev mailing list