]> git.droids-corp.org - dpdk.git/commitdiff
ethdev: decrease log level for unneeded actions
authorKevin Traynor <ktraynor@redhat.com>
Thu, 2 Aug 2018 18:39:41 +0000 (19:39 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 5 Aug 2018 13:28:44 +0000 (15:28 +0200)
Change log level of messages from ERR to INFO where
the post condition of the API is success, but no action
was actually needed as the condition already existed.
e.g. calling rte_eth_dev_start() for a device that is
already started.

Fixes: bea1e0c70cfc ("ethdev: convert static log type usage to dynamic")
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
lib/librte_ethdev/rte_ethdev.c

index c7ab15722f98af6ee3bb131c7e470b2d757f3ee1..4c320250589a613e6c8a8ead77099aaecafb9a36 100644 (file)
@@ -796,7 +796,7 @@ rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id)
        RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_start, -ENOTSUP);
 
        if (dev->data->rx_queue_state[rx_queue_id] != RTE_ETH_QUEUE_STATE_STOPPED) {
-               RTE_ETHDEV_LOG(ERR,
+               RTE_ETHDEV_LOG(INFO,
                        "Queue %"PRIu16" of device with port_id=%"PRIu16" already started\n",
                        rx_queue_id, port_id);
                return 0;
@@ -823,7 +823,7 @@ rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id)
        RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_stop, -ENOTSUP);
 
        if (dev->data->rx_queue_state[rx_queue_id] == RTE_ETH_QUEUE_STATE_STOPPED) {
-               RTE_ETHDEV_LOG(ERR,
+               RTE_ETHDEV_LOG(INFO,
                        "Queue %"PRIu16" of device with port_id=%"PRIu16" already stopped\n",
                        rx_queue_id, port_id);
                return 0;
@@ -856,7 +856,7 @@ rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id)
        RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_start, -ENOTSUP);
 
        if (dev->data->tx_queue_state[tx_queue_id] != RTE_ETH_QUEUE_STATE_STOPPED) {
-               RTE_ETHDEV_LOG(ERR,
+               RTE_ETHDEV_LOG(INFO,
                        "Queue %"PRIu16" of device with port_id=%"PRIu16" already started\n",
                        tx_queue_id, port_id);
                return 0;
@@ -881,7 +881,7 @@ rte_eth_dev_tx_queue_stop(uint16_t port_id, uint16_t tx_queue_id)
        RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_stop, -ENOTSUP);
 
        if (dev->data->tx_queue_state[tx_queue_id] == RTE_ETH_QUEUE_STATE_STOPPED) {
-               RTE_ETHDEV_LOG(ERR,
+               RTE_ETHDEV_LOG(INFO,
                        "Queue %"PRIu16" of device with port_id=%"PRIu16" already stopped\n",
                        tx_queue_id, port_id);
                return 0;
@@ -1286,7 +1286,7 @@ rte_eth_dev_start(uint16_t port_id)
        RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_start, -ENOTSUP);
 
        if (dev->data->dev_started != 0) {
-               RTE_ETHDEV_LOG(ERR,
+               RTE_ETHDEV_LOG(INFO,
                        "Device with port_id=%"PRIu16" already started\n",
                        port_id);
                return 0;
@@ -1318,7 +1318,7 @@ rte_eth_dev_stop(uint16_t port_id)
        RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_stop);
 
        if (dev->data->dev_started == 0) {
-               RTE_ETHDEV_LOG(ERR,
+               RTE_ETHDEV_LOG(INFO,
                        "Device with port_id=%"PRIu16" already stopped\n",
                        port_id);
                return;