[v4,3/5] ethdev: add newline to telemetry log string

Message ID 20230120033456.29710-4-fengchengwen@huawei.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series support dmadev/ethdev stats reset |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

fengchengwen Jan. 20, 2023, 3:34 a.m. UTC
  The telemetry related code may invoke RTE_ETHDEV_LOG to display
information, the newline character is not added automatically to the
RTE_ETHDEV_LOG, therefore, the newline character must be explicitly
added to the log string.

Fixes: 5514319e7b43 ("telemetry: fix passing full params string to command")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 lib/ethdev/rte_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 5d5e18db1e..9eeae61024 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -5880,7 +5880,7 @@  eth_dev_handle_port_xstats(const char *cmd __rte_unused,
 	port_id = strtoul(params, &end_param, 0);
 	if (*end_param != '\0')
 		RTE_ETHDEV_LOG(NOTICE,
-			"Extra parameters passed to ethdev telemetry command, ignoring");
+			"Extra parameters passed to ethdev telemetry command, ignoring\n");
 	if (!rte_eth_dev_is_valid_port(port_id))
 		return -1;
 
@@ -5931,7 +5931,7 @@  eth_dev_handle_port_dump_priv(const char *cmd __rte_unused,
 	port_id = strtoul(params, &end_param, 0);
 	if (*end_param != '\0')
 		RTE_ETHDEV_LOG(NOTICE,
-			"Extra parameters passed to ethdev telemetry command, ignoring");
+			"Extra parameters passed to ethdev telemetry command, ignoring\n");
 	if (!rte_eth_dev_is_valid_port(port_id))
 		return -EINVAL;
 
@@ -5973,7 +5973,7 @@  eth_dev_handle_port_link_status(const char *cmd __rte_unused,
 	port_id = strtoul(params, &end_param, 0);
 	if (*end_param != '\0')
 		RTE_ETHDEV_LOG(NOTICE,
-			"Extra parameters passed to ethdev telemetry command, ignoring");
+			"Extra parameters passed to ethdev telemetry command, ignoring\n");
 	if (!rte_eth_dev_is_valid_port(port_id))
 		return -1;
 
@@ -6011,7 +6011,7 @@  eth_dev_handle_port_info(const char *cmd __rte_unused,
 	port_id = strtoul(params, &end_param, 0);
 	if (*end_param != '\0')
 		RTE_ETHDEV_LOG(NOTICE,
-			"Extra parameters passed to ethdev telemetry command, ignoring");
+			"Extra parameters passed to ethdev telemetry command, ignoring\n");
 
 	if (!rte_eth_dev_is_valid_port(port_id))
 		return -EINVAL;