From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8E1C343B86 for ; Tue, 5 Mar 2024 10:49:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 877CE40A70; Tue, 5 Mar 2024 10:49:02 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2055.outbound.protection.outlook.com [40.107.92.55]) by mails.dpdk.org (Postfix) with ESMTP id EF14E4026B for ; Tue, 5 Mar 2024 10:49:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lTB1orXcFMBYZpLjp615yBOgtjrEAVEhjwN0Jn9ENIcJihqW+XYgLTk/jopAgWP+BtSoJe9gUQBwNHdtdI02I4z6md7rbKxTOfkeaQMe0y/CfHafNehA+yBBHrJpI0oant9XJMeFeFmWwgRgYhGijQOKWSlzrcz0bBp54wqmsndAZIYyKWeABu5rYFJKEKNIfK4HaOsdKb3OFMHXtu5lKJ8QKUKCT38+XGbgREIf2VnT5K+P5tY+n0xWbmkFfn6O7GGP76sY+8KrP/8LiH+3P3QVSNibWLte22nOR3dVhAA9Xts2XQUnzIE+YuAIvXiotogWNmNEgHpfWYBU3ziAig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9E//IaWGkXXVDEJ+UjrW8v7//dyDaMc+/Z4UByU5znI=; b=igpli4SSjSh4pC6krBzWcV3WgHV6JT0Yi7DzciJRKHEBzFaupC2DXwH4LPCBDL6CUG/uBVgzfWKxo+JaUqe0itr6dQlADu5nZJtjGL6CyM6Cybi0WZQxFALNnLsd1wesC+aS4JH5Sq6QOhVWILIIh6CFWCGZn1RKkgg2X7c12b8kFWtk+6qY5VmNBEuwmqibkWWny9K5J6BH/GTyPUrqdEjzroungwJ8MYngGUlC/bUGcHiN4rLxpbvfGJBSSkFchK6SBepVFggg/7Y9hGhJpPNEbHxOplvDoEBzDW0UGosYWB1lAoRbbhGFmYQuIgDIsMiQJwfi7TlyTG0wr7lEkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9E//IaWGkXXVDEJ+UjrW8v7//dyDaMc+/Z4UByU5znI=; b=owa2OQTam9aEumXPVHqWrdWUcrZn+75BQmsSfN9JXlI+p87ERMixgqolNAWmeoOgP1SonyyGY78meKwZjwYc+ZocTKCxb8wOWZv7/LcBW8Ot3os/lDQE0OWc1SwkassRaG0RD0a2bF266n3oLoZjN8D7orpXZ8vpnGTS7Bk20+Jy9V9zO7e6D+CUQh0SSyu1ANVbFnsMGUFOvdyDwQwInk5m3L6MROdbz8wsSzUl+70fVZAuVBzohmWLKw4R+e27DAGk5IFPhvesqN5jfGQKDqtJP4IpQin+2maz+qbZIg67v+QUlK7aaCFbwQGw6Fq84FXgKupm3Z7hDH5mWRoSnA== Received: from CH2PR07CA0036.namprd07.prod.outlook.com (2603:10b6:610:20::49) by SA1PR12MB7269.namprd12.prod.outlook.com (2603:10b6:806:2be::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 09:48:57 +0000 Received: from CY4PEPF0000FCC3.namprd03.prod.outlook.com (2603:10b6:610:20:cafe::3f) by CH2PR07CA0036.outlook.office365.com (2603:10b6:610:20::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38 via Frontend Transport; Tue, 5 Mar 2024 09:48:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000FCC3.mail.protection.outlook.com (10.167.242.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:48:56 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:48:42 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 5 Mar 2024 01:48:40 -0800 From: Xueming Li To: David Marchand CC: Stephen Hemminger , Tyler Retzlaff , Andrew Rybchenko , dpdk stable Subject: patch 'lib: use dedicated logtypes and macros' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:45:46 +0800 Message-ID: <20240305094757.439387-6-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC3:EE_|SA1PR12MB7269:EE_ X-MS-Office365-Filtering-Correlation-Id: bcaba810-3686-44e6-0f8d-08dc3cf979d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y+x0+Kl+phpCtPU2WjLGRirZZ4F8cbtg36o32p2nfNQI2/+ZrqPMdZdqPR8lFPuOEWbLgHJt99tq1f3f4AWmeCmQfpga/5EqEGRcgQyqWSCP9nn9RTY8GbDc4eO4UDRIE8OCgsCNTGO356jiX5MXLCmvDuN9eiNLRFfCR//+qPA3wFEvtOp3Up9xaVZBgOKmtBuKkvosZysE0M4lIjirzVVmYWr4nXguSXcq+tSTQ1CZnl27YnO2kUputXFFeyPzGJnH466LQ9M0ySz/tO9KdnbBIHxkQCFcyxqWZ3Mr73GcqqmX7hBoyR/uRfr4Tz2WIePmSS2wo4WmRtNRCPpOdngg3H0QZ8reqDCVGRp3O5kPYBNCb8FWH1IM4kgAHjPRiVTF8HdVtiLWV5xuICjUrorQBnSnbTdn5vMtV2t6QvY2Mfnl7W90WO/ayTugVBuPB3/NYP/susRRmbVJyR0XkzehXPOhUDP8qSaO9JAGRN8cHMdqCl9P3S6YVb/5gJ021ThcDPopYHyBAyYuk33l919oqiV34j6BfZhL60bSGJA4eJDJRKvdMAMLPOewaFf4x19rizPrRUjllDCCl7K7PZ3BAwPx2lTY4OcZAdaRELcP62/6/En2ZNtyIEKKbxcrCylnmWsmgqiYPATCTZLsnf35V2qG4WlTmgqfZL4oMXVT4VJXKijOX07Un1EDcWkAAVeERbd3bJxoyXTVmiVAD+Le8HcgexrFwb7/Tk0R5D4eeKNwptWTzYVFqTuW99o3 X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:48:56.6760 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bcaba810-3686-44e6-0f8d-08dc3cf979d3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC3.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7269 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.1 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/31/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e421bcd7085615de38888ea6e4e3e064fe835b93 Thanks. Xueming Li --- >From e421bcd7085615de38888ea6e4e3e064fe835b93 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Wed, 6 Dec 2023 13:51:57 +0100 Subject: [PATCH] lib: use dedicated logtypes and macros Cc: Xueming Li [ upstream commit c07da8e381ef860e972abd90400f134c64f3f77a ] No printf! When a dedicated log helper exists, use it. And no usurpation please: a library should log under its logtype (see the eventdev rx adapter update for example). Note: the RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET macro is renamed for consistency with the rest of eventdev (private) macros. Signed-off-by: David Marchand Reviewed-by: Stephen Hemminger Reviewed-by: Tyler Retzlaff Reviewed-by: Andrew Rybchenko --- lib/cryptodev/rte_cryptodev.c | 2 +- lib/ethdev/ethdev_driver.c | 4 ++-- lib/ethdev/ethdev_private.c | 2 +- lib/ethdev/rte_class_eth.c | 2 +- lib/eventdev/rte_event_dma_adapter.c | 4 ++-- lib/eventdev/rte_event_eth_rx_adapter.c | 12 ++++++------ lib/eventdev/rte_eventdev.c | 6 +++--- lib/mempool/rte_mempool_ops.c | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index b258827734..d8769f0b8d 100644 --- a/lib/cryptodev/rte_cryptodev.c +++ b/lib/cryptodev/rte_cryptodev.c @@ -2682,7 +2682,7 @@ rte_cryptodev_driver_id_get(const char *name) int driver_id = -1; if (name == NULL) { - RTE_LOG(DEBUG, CRYPTODEV, "name pointer NULL"); + CDEV_LOG_DEBUG("name pointer NULL"); return -1; } diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c index fff4b7b4cd..55a9dcc565 100644 --- a/lib/ethdev/ethdev_driver.c +++ b/lib/ethdev/ethdev_driver.c @@ -487,7 +487,7 @@ rte_eth_devargs_parse(const char *dargs, struct rte_eth_devargs *eth_da) pair = &args.pairs[i]; if (strcmp("representor", pair->key) == 0) { if (eth_da->type != RTE_ETH_REPRESENTOR_NONE) { - RTE_LOG(ERR, EAL, "duplicated representor key: %s\n", + RTE_ETHDEV_LOG(ERR, "duplicated representor key: %s\n", dargs); result = -1; goto parse_cleanup; @@ -713,7 +713,7 @@ rte_eth_representor_id_get(uint16_t port_id, if (info->ranges[i].controller != controller) continue; if (info->ranges[i].id_end < info->ranges[i].id_base) { - RTE_LOG(WARNING, EAL, "Port %hu invalid representor ID Range %u - %u, entry %d\n", + RTE_ETHDEV_LOG(WARNING, "Port %hu invalid representor ID Range %u - %u, entry %d\n", port_id, info->ranges[i].id_base, info->ranges[i].id_end, i); continue; diff --git a/lib/ethdev/ethdev_private.c b/lib/ethdev/ethdev_private.c index e98b7188b0..0e1c7b23c1 100644 --- a/lib/ethdev/ethdev_private.c +++ b/lib/ethdev/ethdev_private.c @@ -182,7 +182,7 @@ rte_eth_devargs_parse_representor_ports(char *str, void *data) RTE_DIM(eth_da->representor_ports)); done: if (str == NULL) - RTE_LOG(ERR, EAL, "wrong representor format: %s\n", str); + RTE_ETHDEV_LOG(ERR, "wrong representor format: %s\n", str); return str == NULL ? -1 : 0; } diff --git a/lib/ethdev/rte_class_eth.c b/lib/ethdev/rte_class_eth.c index b61dae849d..311beb17cb 100644 --- a/lib/ethdev/rte_class_eth.c +++ b/lib/ethdev/rte_class_eth.c @@ -165,7 +165,7 @@ eth_dev_iterate(const void *start, valid_keys = eth_params_keys; kvargs = rte_kvargs_parse(str, valid_keys); if (kvargs == NULL) { - RTE_LOG(ERR, EAL, "cannot parse argument list\n"); + RTE_ETHDEV_LOG(ERR, "cannot parse argument list\n"); rte_errno = EINVAL; return NULL; } diff --git a/lib/eventdev/rte_event_dma_adapter.c b/lib/eventdev/rte_event_dma_adapter.c index af4b5ad388..cbf9405438 100644 --- a/lib/eventdev/rte_event_dma_adapter.c +++ b/lib/eventdev/rte_event_dma_adapter.c @@ -1046,7 +1046,7 @@ rte_event_dma_adapter_vchan_add(uint8_t id, int16_t dma_dev_id, uint16_t vchan, sizeof(struct dma_vchan_info), 0, adapter->socket_id); if (dev_info->vchanq == NULL) { - printf("Queue pair add not supported\n"); + RTE_EDEV_LOG_ERR("Queue pair add not supported"); return -ENOMEM; } } @@ -1057,7 +1057,7 @@ rte_event_dma_adapter_vchan_add(uint8_t id, int16_t dma_dev_id, uint16_t vchan, sizeof(struct dma_vchan_info), 0, adapter->socket_id); if (dev_info->tqmap == NULL) { - printf("tq pair add not supported\n"); + RTE_EDEV_LOG_ERR("tq pair add not supported"); return -ENOMEM; } } diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c index 6db03adf04..82ae31712d 100644 --- a/lib/eventdev/rte_event_eth_rx_adapter.c +++ b/lib/eventdev/rte_event_eth_rx_adapter.c @@ -314,9 +314,9 @@ rxa_event_buf_get(struct event_eth_rx_adapter *rx_adapter, uint16_t eth_dev_id, } \ } while (0) -#define RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(port_id, retval) do { \ +#define RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(port_id, retval) do { \ if (!rte_eth_dev_is_valid_port(port_id)) { \ - RTE_ETHDEV_LOG(ERR, "Invalid port_id=%u\n", port_id); \ + RTE_EDEV_LOG_ERR("Invalid port_id=%u", port_id); \ ret = retval; \ goto error; \ } \ @@ -3671,7 +3671,7 @@ handle_rxa_get_queue_conf(const char *cmd __rte_unused, /* Get device ID from parameter string */ eth_dev_id = strtoul(token, NULL, 10); - RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL); + RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL); token = strtok(NULL, ","); RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1); @@ -3743,7 +3743,7 @@ handle_rxa_get_queue_stats(const char *cmd __rte_unused, /* Get device ID from parameter string */ eth_dev_id = strtoul(token, NULL, 10); - RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL); + RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL); token = strtok(NULL, ","); RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1); @@ -3813,7 +3813,7 @@ handle_rxa_queue_stats_reset(const char *cmd __rte_unused, /* Get device ID from parameter string */ eth_dev_id = strtoul(token, NULL, 10); - RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL); + RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL); token = strtok(NULL, ","); RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1); @@ -3868,7 +3868,7 @@ handle_rxa_instance_get(const char *cmd __rte_unused, /* Get device ID from parameter string */ eth_dev_id = strtoul(token, NULL, 10); - RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL); + RTE_EVENT_ETH_RX_ADAPTER_PORTID_VALID_OR_GOTO_ERR_RET(eth_dev_id, -EINVAL); token = strtok(NULL, ","); RTE_EVENT_ETH_RX_ADAPTER_TOKEN_VALID_OR_GOTO_ERR_RET(token, -1); diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c index 0ca32d6721..ae50821a3f 100644 --- a/lib/eventdev/rte_eventdev.c +++ b/lib/eventdev/rte_eventdev.c @@ -1428,8 +1428,8 @@ rte_event_vector_pool_create(const char *name, unsigned int n, int ret; if (!nb_elem) { - RTE_LOG(ERR, EVENTDEV, - "Invalid number of elements=%d requested\n", nb_elem); + RTE_EDEV_LOG_ERR("Invalid number of elements=%d requested", + nb_elem); rte_errno = EINVAL; return NULL; } @@ -1444,7 +1444,7 @@ rte_event_vector_pool_create(const char *name, unsigned int n, mp_ops_name = rte_mbuf_best_mempool_ops(); ret = rte_mempool_set_ops_byname(mp, mp_ops_name, NULL); if (ret != 0) { - RTE_LOG(ERR, EVENTDEV, "error setting mempool handler\n"); + RTE_EDEV_LOG_ERR("error setting mempool handler"); goto err; } diff --git a/lib/mempool/rte_mempool_ops.c b/lib/mempool/rte_mempool_ops.c index ae1d288f27..e871de9ec9 100644 --- a/lib/mempool/rte_mempool_ops.c +++ b/lib/mempool/rte_mempool_ops.c @@ -46,7 +46,7 @@ rte_mempool_register_ops(const struct rte_mempool_ops *h) if (strlen(h->name) >= sizeof(ops->name) - 1) { rte_spinlock_unlock(&rte_mempool_ops_table.sl); - RTE_LOG(DEBUG, EAL, "%s(): mempool_ops <%s>: name too long\n", + RTE_LOG(DEBUG, MEMPOOL, "%s(): mempool_ops <%s>: name too long\n", __func__, h->name); rte_errno = EEXIST; return -EEXIST; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:31.244469409 +0800 +++ 0005-lib-use-dedicated-logtypes-and-macros.patch 2024-03-05 17:39:30.643566489 +0800 @@ -1 +1 @@ -From c07da8e381ef860e972abd90400f134c64f3f77a Mon Sep 17 00:00:00 2001 +From e421bcd7085615de38888ea6e4e3e064fe835b93 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit c07da8e381ef860e972abd90400f134c64f3f77a ] @@ -14,2 +16,0 @@ -Cc: stable@dpdk.org - @@ -32 +33 @@ -index 25e3ec12d1..ead8c9a623 100644 +index b258827734..d8769f0b8d 100644 @@ -35 +36 @@ -@@ -2684,7 +2684,7 @@ rte_cryptodev_driver_id_get(const char *name) +@@ -2682,7 +2682,7 @@ rte_cryptodev_driver_id_get(const char *name)