patch 'lib: add newline in logs' has been queued to stable release 22.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 7 02:30:21 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/09/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/31a09fab4baa0714b799487c7e84aa1133fee682

Thanks.

Luca Boccassi

---
>From 31a09fab4baa0714b799487c7e84aa1133fee682 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Wed, 6 Dec 2023 11:59:59 +0100
Subject: [PATCH] lib: add newline in logs

[ upstream commit 8e2407e46782d43f9a1d83d72e279a4f86389bcd ]

Fix places leading to a log message not terminated with a newline.

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
Reviewed-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
---
 lib/eal/common/eal_common_options.c |  2 +-
 lib/eal/linux/eal_hugepage_info.c   |  2 +-
 lib/eal/linux/eal_interrupts.c      |  2 +-
 lib/ethdev/ethdev_pci.h             |  2 +-
 lib/ethdev/rte_ethdev.c             | 40 ++++++++++++++---------------
 lib/lpm/rte_lpm6.c                  |  6 ++---
 lib/power/guest_channel.c           |  2 +-
 lib/power/rte_power_pmd_mgmt.c      |  6 ++---
 8 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index 2d6535781b..43b16805da 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -2142,7 +2142,7 @@ rte_vect_set_max_simd_bitwidth(uint16_t bitwidth)
 	struct internal_config *internal_conf =
 		eal_get_internal_configuration();
 	if (internal_conf->max_simd_bitwidth.forced) {
-		RTE_LOG(NOTICE, EAL, "Cannot set max SIMD bitwidth - user runtime override enabled");
+		RTE_LOG(NOTICE, EAL, "Cannot set max SIMD bitwidth - user runtime override enabled\n");
 		return -EPERM;
 	}
 
diff --git a/lib/eal/linux/eal_hugepage_info.c b/lib/eal/linux/eal_hugepage_info.c
index 581d9dfc91..36a495fb1f 100644
--- a/lib/eal/linux/eal_hugepage_info.c
+++ b/lib/eal/linux/eal_hugepage_info.c
@@ -403,7 +403,7 @@ inspect_hugedir_cb(const struct walk_hugedir_data *whd)
 	struct stat st;
 
 	if (fstat(whd->file_fd, &st) < 0)
-		RTE_LOG(DEBUG, EAL, "%s(): stat(\"%s\") failed: %s",
+		RTE_LOG(DEBUG, EAL, "%s(): stat(\"%s\") failed: %s\n",
 				__func__, whd->file_name, strerror(errno));
 	else
 		(*total_size) += st.st_size;
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index d52ec8eb4c..0b25dffe3b 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -1542,7 +1542,7 @@ rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
 		/* only check, initialization would be done in vdev driver.*/
 		if ((uint64_t)rte_intr_efd_counter_size_get(intr_handle) >
 		    sizeof(union rte_intr_read_buffer)) {
-			RTE_LOG(ERR, EAL, "the efd_counter_size is oversized");
+			RTE_LOG(ERR, EAL, "the efd_counter_size is oversized\n");
 			return -EINVAL;
 		}
 	} else {
diff --git a/lib/ethdev/ethdev_pci.h b/lib/ethdev/ethdev_pci.h
index 320e3e0093..ddb559aa95 100644
--- a/lib/ethdev/ethdev_pci.h
+++ b/lib/ethdev/ethdev_pci.h
@@ -31,7 +31,7 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
 	struct rte_pci_device *pci_dev)
 {
 	if ((eth_dev == NULL) || (pci_dev == NULL)) {
-		RTE_ETHDEV_LOG(ERR, "NULL pointer eth_dev=%p pci_dev=%p",
+		RTE_ETHDEV_LOG(ERR, "NULL pointer eth_dev=%p pci_dev=%p\n",
 			(void *)eth_dev, (void *)pci_dev);
 		return;
 	}
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 4f50e2fa80..e1f18fd8a4 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -631,7 +631,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
 	uint16_t pid;
 
 	if (name == NULL) {
-		RTE_ETHDEV_LOG(ERR, "Cannot get port ID from NULL name");
+		RTE_ETHDEV_LOG(ERR, "Cannot get port ID from NULL name\n");
 		return -EINVAL;
 	}
 
@@ -2097,41 +2097,41 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 		nb_rx_desc = cap.max_nb_desc;
 	if (nb_rx_desc > cap.max_nb_desc) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for nb_rx_desc(=%hu), should be: <= %hu",
+			"Invalid value for nb_rx_desc(=%hu), should be: <= %hu\n",
 			nb_rx_desc, cap.max_nb_desc);
 		return -EINVAL;
 	}
 	if (conf->peer_count > cap.max_rx_2_tx) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Rx queue(=%u), should be: <= %hu",
+			"Invalid value for number of peers for Rx queue(=%u), should be: <= %hu\n",
 			conf->peer_count, cap.max_rx_2_tx);
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && !cap.rx_cap.locked_device_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use locked device memory for Rx queue, which is not supported");
+			"Attempt to use locked device memory for Rx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_rte_memory && !cap.rx_cap.rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use DPDK memory for Rx queue, which is not supported");
+			"Attempt to use DPDK memory for Rx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use mutually exclusive memory settings for Rx queue");
+			"Attempt to use mutually exclusive memory settings for Rx queue\n");
 		return -EINVAL;
 	}
 	if (conf->force_memory &&
 	    !conf->use_locked_device_memory &&
 	    !conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to force Rx queue memory settings, but none is set");
+			"Attempt to force Rx queue memory settings, but none is set\n");
 		return -EINVAL;
 	}
 	if (conf->peer_count == 0) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Rx queue(=%u), should be: > 0",
+			"Invalid value for number of peers for Rx queue(=%u), should be: > 0\n",
 			conf->peer_count);
 		return -EINVAL;
 	}
@@ -2141,7 +2141,7 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 			count++;
 	}
 	if (count > cap.max_nb_queues) {
-		RTE_ETHDEV_LOG(ERR, "To many Rx hairpin queues max is %d",
+		RTE_ETHDEV_LOG(ERR, "To many Rx hairpin queues max is %d\n",
 		cap.max_nb_queues);
 		return -EINVAL;
 	}
@@ -2286,41 +2286,41 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 		nb_tx_desc = cap.max_nb_desc;
 	if (nb_tx_desc > cap.max_nb_desc) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for nb_tx_desc(=%hu), should be: <= %hu",
+			"Invalid value for nb_tx_desc(=%hu), should be: <= %hu\n",
 			nb_tx_desc, cap.max_nb_desc);
 		return -EINVAL;
 	}
 	if (conf->peer_count > cap.max_tx_2_rx) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Tx queue(=%u), should be: <= %hu",
+			"Invalid value for number of peers for Tx queue(=%u), should be: <= %hu\n",
 			conf->peer_count, cap.max_tx_2_rx);
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && !cap.tx_cap.locked_device_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use locked device memory for Tx queue, which is not supported");
+			"Attempt to use locked device memory for Tx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_rte_memory && !cap.tx_cap.rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use DPDK memory for Tx queue, which is not supported");
+			"Attempt to use DPDK memory for Tx queue, which is not supported\n");
 		return -EINVAL;
 	}
 	if (conf->use_locked_device_memory && conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to use mutually exclusive memory settings for Tx queue");
+			"Attempt to use mutually exclusive memory settings for Tx queue\n");
 		return -EINVAL;
 	}
 	if (conf->force_memory &&
 	    !conf->use_locked_device_memory &&
 	    !conf->use_rte_memory) {
 		RTE_ETHDEV_LOG(ERR,
-			"Attempt to force Tx queue memory settings, but none is set");
+			"Attempt to force Tx queue memory settings, but none is set\n");
 		return -EINVAL;
 	}
 	if (conf->peer_count == 0) {
 		RTE_ETHDEV_LOG(ERR,
-			"Invalid value for number of peers for Tx queue(=%u), should be: > 0",
+			"Invalid value for number of peers for Tx queue(=%u), should be: > 0\n",
 			conf->peer_count);
 		return -EINVAL;
 	}
@@ -2330,7 +2330,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
 			count++;
 	}
 	if (count > cap.max_nb_queues) {
-		RTE_ETHDEV_LOG(ERR, "To many Tx hairpin queues max is %d",
+		RTE_ETHDEV_LOG(ERR, "To many Tx hairpin queues max is %d\n",
 		cap.max_nb_queues);
 		return -EINVAL;
 	}
@@ -6152,7 +6152,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id,
 	}
 
 	if (reassembly_capa == NULL) {
-		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly capability to NULL");
+		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly capability to NULL\n");
 		return -EINVAL;
 	}
 
@@ -6182,7 +6182,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id,
 	}
 
 	if (conf == NULL) {
-		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly info to NULL");
+		RTE_ETHDEV_LOG(ERR, "Cannot get reassembly info to NULL\n");
 		return -EINVAL;
 	}
 
@@ -6205,7 +6205,7 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id,
 	if (dev->data->dev_configured == 0) {
 		RTE_ETHDEV_LOG(ERR,
 			"Device with port_id=%u is not configured.\n"
-			"Cannot set IP reassembly configuration",
+			"Cannot set IP reassembly configuration\n",
 			port_id);
 		return -EINVAL;
 	}
diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c
index 8d21aeddb8..79c75d8dfc 100644
--- a/lib/lpm/rte_lpm6.c
+++ b/lib/lpm/rte_lpm6.c
@@ -279,7 +279,7 @@ rte_lpm6_create(const char *name, int socket_id,
 
 	rules_tbl = rte_hash_create(&rule_hash_tbl_params);
 	if (rules_tbl == NULL) {
-		RTE_LOG(ERR, LPM, "LPM rules hash table allocation failed: %s (%d)",
+		RTE_LOG(ERR, LPM, "LPM rules hash table allocation failed: %s (%d)\n",
 				  rte_strerror(rte_errno), rte_errno);
 		goto fail_wo_unlock;
 	}
@@ -289,7 +289,7 @@ rte_lpm6_create(const char *name, int socket_id,
 			sizeof(uint32_t) * config->number_tbl8s,
 			RTE_CACHE_LINE_SIZE);
 	if (tbl8_pool == NULL) {
-		RTE_LOG(ERR, LPM, "LPM tbl8 pool allocation failed: %s (%d)",
+		RTE_LOG(ERR, LPM, "LPM tbl8 pool allocation failed: %s (%d)\n",
 				  rte_strerror(rte_errno), rte_errno);
 		rte_errno = ENOMEM;
 		goto fail_wo_unlock;
@@ -300,7 +300,7 @@ rte_lpm6_create(const char *name, int socket_id,
 			sizeof(struct rte_lpm_tbl8_hdr) * config->number_tbl8s,
 			RTE_CACHE_LINE_SIZE);
 	if (tbl8_hdrs == NULL) {
-		RTE_LOG(ERR, LPM, "LPM tbl8 headers allocation failed: %s (%d)",
+		RTE_LOG(ERR, LPM, "LPM tbl8 headers allocation failed: %s (%d)\n",
 				  rte_strerror(rte_errno), rte_errno);
 		rte_errno = ENOMEM;
 		goto fail_wo_unlock;
diff --git a/lib/power/guest_channel.c b/lib/power/guest_channel.c
index 969a9e5aaa..0117b856bb 100644
--- a/lib/power/guest_channel.c
+++ b/lib/power/guest_channel.c
@@ -89,7 +89,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
 	flags |= O_NONBLOCK;
 	if (fcntl(fd, F_SETFL, flags) < 0) {
 		RTE_LOG(ERR, GUEST_CHANNEL, "Failed on setting non-blocking mode for "
-				"file %s", fd_path);
+				"file %s\n", fd_path);
 		goto error;
 	}
 	/* QEMU needs a delay after connection */
diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power/rte_power_pmd_mgmt.c
index ca1840387c..f9a2606e6c 100644
--- a/lib/power/rte_power_pmd_mgmt.c
+++ b/lib/power/rte_power_pmd_mgmt.c
@@ -684,7 +684,7 @@ int
 rte_power_pmd_mgmt_set_pause_duration(unsigned int duration)
 {
 	if (duration == 0) {
-		RTE_LOG(ERR, POWER, "Pause duration must be greater than 0, value unchanged");
+		RTE_LOG(ERR, POWER, "Pause duration must be greater than 0, value unchanged\n");
 		return -EINVAL;
 	}
 	pause_duration = duration;
@@ -707,7 +707,7 @@ rte_power_pmd_mgmt_set_scaling_freq_min(unsigned int lcore, unsigned int min)
 	}
 
 	if (min > scale_freq_max[lcore]) {
-		RTE_LOG(ERR, POWER, "Invalid min frequency: Cannot be greater than max frequency");
+		RTE_LOG(ERR, POWER, "Invalid min frequency: Cannot be greater than max frequency\n");
 		return -EINVAL;
 	}
 	scale_freq_min[lcore] = min;
@@ -727,7 +727,7 @@ rte_power_pmd_mgmt_set_scaling_freq_max(unsigned int lcore, unsigned int max)
 	if (max == 0)
 		max = UINT32_MAX;
 	if (max < scale_freq_min[lcore]) {
-		RTE_LOG(ERR, POWER, "Invalid max frequency: Cannot be less than min frequency");
+		RTE_LOG(ERR, POWER, "Invalid max frequency: Cannot be less than min frequency\n");
 		return -EINVAL;
 	}
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:35.448715053 +0000
+++ 0004-lib-add-newline-in-logs.patch	2024-03-07 01:05:34.594935686 +0000
@@ -1 +1 @@
-From 8e2407e46782d43f9a1d83d72e279a4f86389bcd Mon Sep 17 00:00:00 2001
+From 31a09fab4baa0714b799487c7e84aa1133fee682 Mon Sep 17 00:00:00 2001
@@ -6 +6 @@
-Fix places leading to a log message not terminated with a newline.
+[ upstream commit 8e2407e46782d43f9a1d83d72e279a4f86389bcd ]
@@ -8 +8 @@
-Cc: stable at dpdk.org
+Fix places leading to a log message not terminated with a newline.
@@ -26 +26 @@
-index a6d21f1cba..e9ba01fb89 100644
+index 2d6535781b..43b16805da 100644
@@ -29 +29 @@
-@@ -2141,7 +2141,7 @@ rte_vect_set_max_simd_bitwidth(uint16_t bitwidth)
+@@ -2142,7 +2142,7 @@ rte_vect_set_max_simd_bitwidth(uint16_t bitwidth)
@@ -52 +52 @@
-index d4919dff45..eabac24992 100644
+index d52ec8eb4c..0b25dffe3b 100644
@@ -78 +78 @@
-index 3858983fcc..b9d99ece15 100644
+index 4f50e2fa80..e1f18fd8a4 100644
@@ -81 +81 @@
-@@ -724,7 +724,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
+@@ -631,7 +631,7 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
@@ -90 +90 @@
-@@ -2394,41 +2394,41 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -2097,41 +2097,41 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
@@ -139 +139 @@
-@@ -2438,7 +2438,7 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -2141,7 +2141,7 @@ rte_eth_rx_hairpin_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
@@ -148 +148 @@
-@@ -2597,41 +2597,41 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
+@@ -2286,41 +2286,41 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
@@ -197 +197 @@
-@@ -2641,7 +2641,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
+@@ -2330,7 +2330,7 @@ rte_eth_tx_hairpin_queue_setup(uint16_t port_id, uint16_t tx_queue_id,
@@ -206 +206 @@
-@@ -6716,7 +6716,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id,
+@@ -6152,7 +6152,7 @@ rte_eth_ip_reassembly_capability_get(uint16_t port_id,
@@ -215 +215 @@
-@@ -6752,7 +6752,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id,
+@@ -6182,7 +6182,7 @@ rte_eth_ip_reassembly_conf_get(uint16_t port_id,
@@ -224 +224 @@
-@@ -6780,7 +6780,7 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id,
+@@ -6205,7 +6205,7 @@ rte_eth_ip_reassembly_conf_set(uint16_t port_id,
@@ -234 +234 @@
-index 873cc8bc26..24ce7dd022 100644
+index 8d21aeddb8..79c75d8dfc 100644
@@ -237 +237 @@
-@@ -280,7 +280,7 @@ rte_lpm6_create(const char *name, int socket_id,
+@@ -279,7 +279,7 @@ rte_lpm6_create(const char *name, int socket_id,
@@ -246 +246 @@
-@@ -290,7 +290,7 @@ rte_lpm6_create(const char *name, int socket_id,
+@@ -289,7 +289,7 @@ rte_lpm6_create(const char *name, int socket_id,
@@ -255 +255 @@
-@@ -301,7 +301,7 @@ rte_lpm6_create(const char *name, int socket_id,
+@@ -300,7 +300,7 @@ rte_lpm6_create(const char *name, int socket_id,
@@ -265 +265 @@
-index cc05347425..a6f2097d5b 100644
+index 969a9e5aaa..0117b856bb 100644
@@ -268 +268 @@
-@@ -90,7 +90,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
+@@ -89,7 +89,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
@@ -278 +278 @@
-index 38f8384085..6f18ed0adf 100644
+index ca1840387c..f9a2606e6c 100644
@@ -281 +281 @@
-@@ -686,7 +686,7 @@ int
+@@ -684,7 +684,7 @@ int
@@ -290 +290 @@
-@@ -709,7 +709,7 @@ rte_power_pmd_mgmt_set_scaling_freq_min(unsigned int lcore, unsigned int min)
+@@ -707,7 +707,7 @@ rte_power_pmd_mgmt_set_scaling_freq_min(unsigned int lcore, unsigned int min)
@@ -299 +299 @@
-@@ -729,7 +729,7 @@ rte_power_pmd_mgmt_set_scaling_freq_max(unsigned int lcore, unsigned int max)
+@@ -727,7 +727,7 @@ rte_power_pmd_mgmt_set_scaling_freq_max(unsigned int lcore, unsigned int max)


More information about the stable mailing list