vfio: expand non-viable group error message

Message ID 20190426162230.21158-1-ktraynor@redhat.com (mailing list archive)
State Accepted, archived
Headers
Series vfio: expand non-viable group error message |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS

Commit Message

Kevin Traynor April 26, 2019, 4:22 p.m. UTC
  "VFIO group is not viable" error message is correct
but not very user friendly for something which can
usually be easily rectified.

Add some additional text to give more of a hint.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 lib/librte_eal/linux/eal/eal_vfio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Anatoly Burakov April 26, 2019, 4:31 p.m. UTC | #1
On 26-Apr-19 5:22 PM, Kevin Traynor wrote:
> "VFIO group is not viable" error message is correct
> but not very user friendly for something which can
> usually be easily rectified.
> 
> Add some additional text to give more of a hint.
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
>   lib/librte_eal/linux/eal/eal_vfio.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
> index 19e70bb66..6892a2c14 100644
> --- a/lib/librte_eal/linux/eal/eal_vfio.c
> +++ b/lib/librte_eal/linux/eal/eal_vfio.c
> @@ -686,5 +686,7 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
>   		return -1;
>   	} else if (!(group_status.flags & VFIO_GROUP_FLAGS_VIABLE)) {
> -		RTE_LOG(ERR, EAL, "  %s VFIO group is not viable!\n", dev_addr);
> +		RTE_LOG(ERR, EAL, "  %s VFIO group is not viable! "
> +				"Not all devices in IOMMU group bound to VFIO or unbound\n",
> +				dev_addr);
>   		close(vfio_group_fd);
>   		rte_vfio_clear_group(vfio_group_fd);
> 

Come on, everyone knows /that/!

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
  
Rami Rosen April 27, 2019, 6:58 a.m. UTC | #2
> On 26-Apr-19 5:22 PM, Kevin Traynor wrote:
> > "VFIO group is not viable" error message is correct
> > but not very user friendly for something which can
> > usually be easily rectified.
> >
> > Add some additional text to give more of a hint.
> >
> > Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> > ---


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

Reviewd-by: Rami Rosen <ramirose@gmail.com>
  
Thomas Monjalon May 3, 2019, 8:43 p.m. UTC | #3
27/04/2019 08:58, Rami Rosen:
> > On 26-Apr-19 5:22 PM, Kevin Traynor wrote:
> > > "VFIO group is not viable" error message is correct
> > > but not very user friendly for something which can
> > > usually be easily rectified.
> > >
> > > Add some additional text to give more of a hint.
> > >
> > > Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> 
> Reviewd-by: Rami Rosen <ramirose@gmail.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
index 19e70bb66..6892a2c14 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.c
+++ b/lib/librte_eal/linux/eal/eal_vfio.c
@@ -686,5 +686,7 @@  rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
 		return -1;
 	} else if (!(group_status.flags & VFIO_GROUP_FLAGS_VIABLE)) {
-		RTE_LOG(ERR, EAL, "  %s VFIO group is not viable!\n", dev_addr);
+		RTE_LOG(ERR, EAL, "  %s VFIO group is not viable! "
+				"Not all devices in IOMMU group bound to VFIO or unbound\n",
+				dev_addr);
 		close(vfio_group_fd);
 		rte_vfio_clear_group(vfio_group_fd);