Skip to contentSkip to conversation

eal/vfio: reduce severity of startup messages

PATCH Superseded Stephen Hemminger 3 participants 4 messages Jun 11, 2020 – Jul 7, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eal/vfio: reduce severity of startup messages

The startup of VFIO is too noisy. Logging is expensive on some systems, and distracting to the user.

It should not be logging at NOTICE level, reduce it to INFO level. It really should be DEBUG here but that would hide it by default.

---
 lib/librte_eal/linux/eal_vfio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_eal/linux/eal_vfio.c +2 -2
index d26e1649a54e..cb869bfafaf0 100644
@@ -891,7 +891,7 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
 		/* we have successfully initialized VFIO, notify user */
 		const struct vfio_iommu_type *t =
 				default_vfio_cfg->vfio_iommu_type;
-		RTE_LOG(NOTICE, EAL, "  using IOMMU type %d (%s)\n",
+		RTE_LOG(INFO, EAL, "  using IOMMU type %d (%s)\n",
 				t->type_id, t->name);
 	}
 
@@ -1069,7 +1069,7 @@ rte_vfio_enable(const char *modname)
 
 	/* check if we have VFIO driver enabled */
 	if (default_vfio_cfg->vfio_container_fd != -1) {
-		RTE_LOG(NOTICE, EAL, "VFIO support initialized\n");
+		RTE_LOG(INFO, EAL, "VFIO support initialized\n");
 		default_vfio_cfg->vfio_enabled = 1;
 	} else {
 		RTE_LOG(NOTICE, EAL, "VFIO support could not be initialized\n");
Signature · 1 line
2.26.2
#1 lore raw

PATCH v2 1/1 eal/vfio: reduce severity of startup messages

The startup of VFIO is too noisy. Logging is expensive on some systems, and distracting to the user.

It should not be logging at NOTICE level, reduce it to INFO level. It really should be DEBUG here but that would hide it by default.

---
v2 - add one more place

 lib/librte_eal/linux/eal_vfio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/librte_eal/linux/eal_vfio.c +3 -3
index d26e1649a54e..88a8c3b959cc 100644
@@ -891,7 +891,7 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
 		/* we have successfully initialized VFIO, notify user */
 		const struct vfio_iommu_type *t =
 				default_vfio_cfg->vfio_iommu_type;
-		RTE_LOG(NOTICE, EAL, "  using IOMMU type %d (%s)\n",
+		RTE_LOG(INFO, EAL, "  using IOMMU type %d (%s)\n",
 				t->type_id, t->name);
 	}
 
@@ -1069,7 +1069,7 @@ rte_vfio_enable(const char *modname)
 
 	/* check if we have VFIO driver enabled */
 	if (default_vfio_cfg->vfio_container_fd != -1) {
-		RTE_LOG(NOTICE, EAL, "VFIO support initialized\n");
+		RTE_LOG(INFO, EAL, "VFIO support initialized\n");
 		default_vfio_cfg->vfio_enabled = 1;
 	} else {
 		RTE_LOG(NOTICE, EAL, "VFIO support could not be initialized\n");
@@ -1145,7 +1145,7 @@ vfio_set_iommu_type(int vfio_container_fd)
 		int ret = ioctl(vfio_container_fd, VFIO_SET_IOMMU,
 				t->type_id);
 		if (!ret) {
-			RTE_LOG(NOTICE, EAL, "  using IOMMU type %d (%s)\n",
+			RTE_LOG(INFO, EAL, "  using IOMMU type %d (%s)\n",
 					t->type_id, t->name);
 			return t;
 		}
Signature · 1 line
2.26.2
Acked-by on v2 1/1
#2 lore raw
Quoted 8 lines · Stephen Hemminger

The startup of VFIO is too noisy. Logging is expensive on some systems, and distracting to the user.

It should not be logging at NOTICE level, reduce it to INFO level. It really should be DEBUG here but that would hide it by default.

---

No objections. They're important for trouble-shooting, but we can always use --log-level in that case.

Signature · 2 lines
Thanks,
Anatoly
#3 lore raw
Quoted 10 lines · Anatoly
Quoted 7 lines · Stephen Hemminger

The startup of VFIO is too noisy. Logging is expensive on some systems, and distracting to the user.

It should not be logging at NOTICE level, reduce it to INFO level. It really should be DEBUG here but that would hide it by default.

Applied, thanks.

Signature · 1 line
David Marchand