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 5DFFC45779; Fri, 9 Aug 2024 15:02:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C2C742D78; Fri, 9 Aug 2024 15:02:25 +0200 (CEST) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by mails.dpdk.org (Postfix) with ESMTP id C5A184025F for ; Fri, 9 Aug 2024 15:02:23 +0200 (CEST) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a7a94478a4eso506578466b.1 for ; Fri, 09 Aug 2024 06:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723208543; x=1723813343; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=pSUcqidypYfRPzPs841yKb0q8UVRt07wAL8q8DcLaAo=; b=P8R6mXQAafB/bB2EkAXCBLrFlzbS927WGS1RV4frvpvsvvw8RT1vL8m7lneT4ixCMY 8hZJVYdFpW2+qFIK/fvxpywhran5yVaiSG5C+lDx/TDAfuN6iPH6hIt8sb6BD+mDpokt nkD/V3I+OOqkYDOIMs/+7NejZFMjUgyfmdOGzqmz/kH3V8rEcoDqkhTY4hD5giYb/Zqe lr27IM9jQ9oR8XAJI2KI6M8XbBthbpfKyNPK2jd96RNdMVSk/V3sBTReYVgAZiIPzSuA 6h52B8BfAmJygOnBdbEwgXGy2faqe/RJdis3CGTBMNqZlW4hiV9BZxZfMfsfrlZ2ddQm TuRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723208543; x=1723813343; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pSUcqidypYfRPzPs841yKb0q8UVRt07wAL8q8DcLaAo=; b=gdEx29qr5gM2aenp4LjnHMcvBcQXZ5hn62nvHexLiLWWzAG7lx+rh5onCf6Bemxu2d t1H0ozjS1IpO3Jhc3EU1bhmirK9xHKk7D/K0+Qs06AZo73Q6RuQDlhOS3xdcnAtRyNFm z2ZHs3Ff/Pgwkyp/a4dYcPYF/ws65af/i1sqdV3UgcKyG1pCAiC6ngL7xMqQAtHBX3q5 5YL9fxZUD8NUD7IdgGIQlsKOFkn/txsoK4tDBrtiVbj4Nnn1zNbcfwcL031EgZtANIeu 44y/P2MvZUyO2ZoCvcol49QmaX6577/XnLfE78TSBBr6UMhtDcOFU8zJV4fp3JlH7yHJ cOtQ== X-Gm-Message-State: AOJu0YxKnuGiDR+VD0ojzkKwQWac+vNBLjdYKVnaI/h7VpTXV/FPWic4 8jPHMpT/ChhCr6o8AWIilF5MoPeBDvpY5RKKftblnQL2zKrgtymR X-Google-Smtp-Source: AGHT+IGhm2ZaeXfXmlMXcnb/POwuN++hCu3U7kJNC29trOYrg9k7qszBjtU9KzU23fIx7IP/SVV8bA== X-Received: by 2002:a17:907:1b23:b0:a7d:895b:fd with SMTP id a640c23a62f3a-a8091ec5ef8mr450558066b.6.1723208542739; Fri, 09 Aug 2024 06:02:22 -0700 (PDT) Received: from ID-BPAU-B5MVQV3.tellitec.test ([2a02:2454:8462:6500:1834:61f1:8fd4:e40]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a7dc9e7eee0sm854817766b.149.2024.08.09.06.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Aug 2024 06:02:22 -0700 (PDT) From: Bharath Paulraj To: Thomas Monjalon Cc: dev@dpdk.org, Bharath Paulraj Subject: [PATCH] log: allow log register API to update log level Date: Fri, 9 Aug 2024 15:01:49 +0200 Message-Id: <20240809130149.363053-1-bharathpaul@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This commit fixes the bug in the registration API where it fails to set the log level if 'id' already exists. Signed-off-by: Bharath Paulraj --- .mailmap | 1 + lib/log/log.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 4a508bafad..05eca16a96 100644 --- a/.mailmap +++ b/.mailmap @@ -181,6 +181,7 @@ Bernard Iremonger Bert van Leeuwen Bhagyada Modali Bharat Mota +Bharath Paulraj Bhuvan Mital Bill Hong Billy McFall diff --git a/lib/log/log.c b/lib/log/log.c index 255f757d94..4338795b16 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -292,8 +292,10 @@ log_register(const char *name, uint32_t level) int id; id = log_lookup(name); - if (id >= 0) + if (id >= 0) { + logtype_set_level(id, level); return id; + } new_dynamic_types = realloc(rte_logs.dynamic_types, sizeof(struct rte_log_dynamic_type) * -- 2.34.1