Skip to contentSkip to conversation

ethdev: adjust error log level

PATCH Applied Martin Klozik 3 participants 3 messages Feb 13, 2018 – Feb 15, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethdev: adjust error log level

DPDK API does not propagate the reason of device allocation failure from rte_eth_dev_allocate() up to the DPDK application (e.g. Open vSwitch).
Log level of associated log entries was changed to warning. So user can find additional details in log files also in production systems, where debug messages cannot be turned on.

---
 lib/librte_ether/rte_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_ether/rte_ethdev.c +2 -2
index a6ce2a5..0590f0c 100644
@@ -277,12 +277,12 @@ rte_eth_dev_allocate(const char *name)
 
 	port_id = rte_eth_dev_find_free_port();
 	if (port_id == RTE_MAX_ETHPORTS) {
-		RTE_PMD_DEBUG_TRACE("Reached maximum number of Ethernet ports\n");
+		RTE_LOG(ERR, EAL, "Reached maximum number of Ethernet ports\n");
 		goto unlock;
 	}
 
 	if (rte_eth_dev_allocated(name) != NULL) {
-		RTE_PMD_DEBUG_TRACE("Ethernet Device with name %s already allocated!\n",
+		RTE_LOG(ERR, EAL, "Ethernet Device with name %s already allocated!\n",
 				name);
 		goto unlock;
 	}
Signature · 13 lines
2.7.4

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
Acked-by on v1 1/1 Applied
#1 lore raw

13/02/2018 16:03, Martin Klozik:

Quoted 8 lines

DPDK API does not propagate the reason of device allocation failure from rte_eth_dev_allocate() up to the DPDK application (e.g. Open vSwitch).
Log level of associated log entries was changed to warning. So user can find additional details in log files also in production systems, where debug messages cannot be turned on.

Applied, thanks

#2 lore raw
In reply to Martin Klozik
Quoted 21 lines · On Tue, 13 Feb 2018 15:03:47 +0000 Martin Klozik <[email protected]>…

DPDK API does not propagate the reason of device allocation failure from rte_eth_dev_allocate() up to the DPDK application (e.g. Open vSwitch).
Log level of associated log entries was changed to warning. So user can find additional details in log files also in production systems, where debug messages cannot be turned on.

---
 lib/librte_ether/rte_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_ether/rte_ethdev.c +0 -1
index a6ce2a5..0590f0c 100644
@@ -277,12 +277,12 @@ rte_eth_dev_allocate(const char *name)
 
 	port_id = rte_eth_dev_find_free_port();
 	if (port_id == RTE_MAX_ETHPORTS) {
-		RTE_PMD_DEBUG_TRACE("Reached maximum number of Ethernet ports\n");

lib/librte_ether/rte_ethdev.c rte_eth_dev_allocate(const char *name) · line 288

Quoted 10 lines
lib/librte_ether/rte_ethdev.c +2 -1
+		RTE_LOG(ERR, EAL, "Reached maximum number of Ethernet ports\n");
 		goto unlock;
 	}
 
 	if (rte_eth_dev_allocated(name) != NULL) {
-		RTE_PMD_DEBUG_TRACE("Ethernet Device with name %s already allocated!\n",
+		RTE_LOG(ERR, EAL, "Ethernet Device with name %s already allocated!\n",
 				name);
 		goto unlock;
 	}

Should be NOTICE not ERROR. Since this is a recoverable condition.