For any bus that does not support device iteration, rte_dev_iterator_init
both returned an error code and logged an error message.
An application (like testpmd) that only wants to list devices, would have
no choice but to inspect a bus object to avoid spewing error logs.
Make those log messages debug level, and remove the check in testpmd.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test-pmd/config.c | 4 ----
lib/eal/common/eal_common_dev.c | 7 +++----
2 files changed, 3 insertions(+), 8 deletions(-)
@@ -641,10 +641,6 @@ device_infos_display(const char *identifier)
if (identifier && da.bus != next)
continue;
- /* Skip buses that don't have iterate method */
- if (!next->dev_iterate)
- continue;
-
snprintf(devstr, sizeof(devstr), "bus=%s", next->name);
RTE_DEV_FOREACH(dev, devstr, &dev_iter) {
@@ -592,18 +592,17 @@ rte_dev_iterator_init(struct rte_dev_iterator *it,
* one layer specified.
*/
if (bus == NULL && cls == NULL) {
- RTE_LOG(ERR, EAL,
- "Either bus or class must be specified.\n");
+ RTE_LOG(DEBUG, EAL, "Either bus or class must be specified.\n");
rte_errno = EINVAL;
goto get_out;
}
if (bus != NULL && bus->dev_iterate == NULL) {
- RTE_LOG(ERR, EAL, "Bus %s not supported\n", bus->name);
+ RTE_LOG(DEBUG, EAL, "Bus %s not supported\n", bus->name);
rte_errno = ENOTSUP;
goto get_out;
}
if (cls != NULL && cls->dev_iterate == NULL) {
- RTE_LOG(ERR, EAL, "Class %s not supported\n", cls->name);
+ RTE_LOG(DEBUG, EAL, "Class %s not supported\n", cls->name);
rte_errno = ENOTSUP;
goto get_out;
}