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 3850142DEC; Thu, 6 Jul 2023 20:52:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16EC642DA2; Thu, 6 Jul 2023 20:52:38 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id 8670440A79 for ; Thu, 6 Jul 2023 20:52:37 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1b8b318c5a7so6730725ad.3 for ; Thu, 06 Jul 2023 11:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688669557; x=1691261557; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=opqfKwh85pNuFomL8uE2OPV+5bU6fdylmz/Vyurh9oo=; b=zIe1N9N9Dv1E9cZTJwzzRlflJk3y2yBoEYXZ6dxkDs2QmK39KOde0OjfLUmhKI9An2 vdN9CBOTNXtbjRxFddwdg+oGuiA7B0KpxwbzDp/z46hg+itQOKi6pyMzbPc9dsBF9gB7 apPIM+rajzPj2A0GCIgY/APThaiDniJp1f/FGRAgfM9Ed5O64lRQKBK3x3/Qujaro/Ua oFSYjrkDqW7xTjn1W5dSj0+3YP9T0WwGAyKVEC1ZnnxozDuejXCBs27ILqsqes3Gl4gl BVSUv5/8HG3FnlzKYMbxKbc/M+nqyaTHjPiJqLBa9nJrrQlobaYteU+Dik7FTzo+i901 8sRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688669557; x=1691261557; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=opqfKwh85pNuFomL8uE2OPV+5bU6fdylmz/Vyurh9oo=; b=LY2bYtSTVaV6MGf/hGVTbHwJRlBAyOVoK7jJn/HzSlu+IkMdlkAoVA5h5SMhVG7Nh5 hSGsWzyzU/mfiHnDM4NRnOnRBlOXsS+Z8mTc1qcw+R1djjnE6WFfZSXLk2sWR+zGfNHR vO7wHlmgLQYDmLm0qDScAdwBtmeDahCH4YMd7/3DYqf+SG993HTTPxItrXOt5AzRO1H7 iorPx74Qv1S5odRlpspiqiZNtcbiIvEF6wVF+EofCjl69QD7TMFm3quRSc7REh1Ukh48 b8G/oTKa2upOBqceaFuyUFv7WdX/hUNvwdf7Rdp82dCgP40e8fhklsG5aPGc8HPRZjOD z//w== X-Gm-Message-State: ABy/qLYX2GYSNqwNada9wRudM3wIuMk3b62Uvy4bmdLp8M9kKYfZivl8 Hp8dqjFlMw3nfOhYHF1n+C1Stw== X-Google-Smtp-Source: APBJJlGZDuQNk7H4lE9AYSRPxdY1xf8lPYgt5vnATLpYBdpIVK5IxdPyXu4BShesL0db9ZaJZqho7g== X-Received: by 2002:a17:902:e88f:b0:1b8:9046:4bfb with SMTP id w15-20020a170902e88f00b001b890464bfbmr3511306plg.9.1688669556681; Thu, 06 Jul 2023 11:52:36 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id t11-20020a170902b20b00b001a69c1c78e7sm1762148plr.71.2023.07.06.11.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 11:52:36 -0700 (PDT) Date: Thu, 6 Jul 2023 11:52:34 -0700 From: Stephen Hemminger To: Harman Kalra Cc: Subject: Re: [dpdk-dev] [PATCH] interrupts: fix error log level Message-ID: <20230706115234.1c7a7340@hermes.local> In-Reply-To: <20211101174447.82017-1-hkalra@marvell.com> References: <20211101174447.82017-1-hkalra@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Mon, 1 Nov 2021 23:14:47 +0530 Harman Kalra wrote: > Fixing the error logs level, as currently default level is > set to debug. Due to this failure is not getting captured. > > Fixes: b7c984291611 ("interrupts: add allocator and accessors") > > Signed-off-by: Harman Kalra > --- > lib/eal/common/eal_common_interrupts.c | 24 ++++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/lib/eal/common/eal_common_interrupts.c b/lib/eal/common/eal_common_interrupts.c > index 97b64fed58..96c7e9e40e 100644 > --- a/lib/eal/common/eal_common_interrupts.c > +++ b/lib/eal/common/eal_common_interrupts.c > @@ -15,7 +15,7 @@ > /* Macros to check for valid interrupt handle */ > #define CHECK_VALID_INTR_HANDLE(intr_handle) do { \ > if (intr_handle == NULL) { \ > - RTE_LOG(DEBUG, EAL, "Interrupt instance unallocated\n"); \ > + RTE_LOG(ERR, EAL, "Interrupt instance unallocated\n"); \ > rte_errno = EINVAL; \ > goto fail; \ > } \ > @@ -37,7 +37,7 @@ struct rte_intr_handle *rte_intr_instance_alloc(uint32_t flags) > * defined flags. > */ > if ((flags & ~RTE_INTR_INSTANCE_KNOWN_FLAGS) != 0) { > - RTE_LOG(DEBUG, EAL, "Invalid alloc flag passed 0x%x\n", flags); > + RTE_LOG(ERR, EAL, "Invalid alloc flag passed 0x%x\n", flags); > rte_errno = EINVAL; > return NULL; > } > @@ -100,7 +100,7 @@ struct rte_intr_handle *rte_intr_instance_dup(const struct rte_intr_handle *src) > struct rte_intr_handle *intr_handle; > > if (src == NULL) { > - RTE_LOG(DEBUG, EAL, "Source interrupt instance unallocated\n"); > + RTE_LOG(ERR, EAL, "Source interrupt instance unallocated\n"); > rte_errno = EINVAL; > return NULL; > } > @@ -129,7 +129,7 @@ int rte_intr_event_list_update(struct rte_intr_handle *intr_handle, int size) > CHECK_VALID_INTR_HANDLE(intr_handle); > > if (size == 0) { > - RTE_LOG(DEBUG, EAL, "Size can't be zero\n"); > + RTE_LOG(ERR, EAL, "Size can't be zero\n"); > rte_errno = EINVAL; > goto fail; > } > @@ -253,7 +253,7 @@ int rte_intr_max_intr_set(struct rte_intr_handle *intr_handle, > CHECK_VALID_INTR_HANDLE(intr_handle); > > if (max_intr > intr_handle->nb_intr) { > - RTE_LOG(DEBUG, EAL, "Maximum interrupt vector ID (%d) exceeds " > + RTE_LOG(ERR, EAL, "Maximum interrupt vector ID (%d) exceeds " > "the number of available events (%d)\n", max_intr, > intr_handle->nb_intr); > rte_errno = ERANGE; > @@ -332,7 +332,7 @@ int rte_intr_efds_index_get(const struct rte_intr_handle *intr_handle, > CHECK_VALID_INTR_HANDLE(intr_handle); > > if (index >= intr_handle->nb_intr) { > - RTE_LOG(DEBUG, EAL, "Invalid index %d, max limit %d\n", index, > + RTE_LOG(ERR, EAL, "Invalid index %d, max limit %d\n", index, > intr_handle->nb_intr); > rte_errno = EINVAL; > goto fail; > @@ -349,7 +349,7 @@ int rte_intr_efds_index_set(struct rte_intr_handle *intr_handle, > CHECK_VALID_INTR_HANDLE(intr_handle); > > if (index >= intr_handle->nb_intr) { > - RTE_LOG(DEBUG, EAL, "Invalid index %d, max limit %d\n", index, > + RTE_LOG(ERR, EAL, "Invalid index %d, max limit %d\n", index, > intr_handle->nb_intr); > rte_errno = ERANGE; > goto fail; > @@ -368,7 +368,7 @@ struct rte_epoll_event *rte_intr_elist_index_get( > CHECK_VALID_INTR_HANDLE(intr_handle); > > if (index >= intr_handle->nb_intr) { > - RTE_LOG(DEBUG, EAL, "Invalid index %d, max limit %d\n", index, > + RTE_LOG(ERR, EAL, "Invalid index %d, max limit %d\n", index, > intr_handle->nb_intr); > rte_errno = ERANGE; > goto fail; > @@ -385,7 +385,7 @@ int rte_intr_elist_index_set(struct rte_intr_handle *intr_handle, > CHECK_VALID_INTR_HANDLE(intr_handle); > > if (index >= intr_handle->nb_intr) { > - RTE_LOG(DEBUG, EAL, "Invalid index %d, max limit %d\n", index, > + RTE_LOG(ERR, EAL, "Invalid index %d, max limit %d\n", index, > intr_handle->nb_intr); > rte_errno = ERANGE; > goto fail; > @@ -408,7 +408,7 @@ int rte_intr_vec_list_alloc(struct rte_intr_handle *intr_handle, > return 0; > > if (size > intr_handle->nb_intr) { > - RTE_LOG(DEBUG, EAL, "Invalid size %d, max limit %d\n", size, > + RTE_LOG(ERR, EAL, "Invalid size %d, max limit %d\n", size, > intr_handle->nb_intr); > rte_errno = ERANGE; > goto fail; > @@ -437,7 +437,7 @@ int rte_intr_vec_list_index_get(const struct rte_intr_handle *intr_handle, > CHECK_VALID_INTR_HANDLE(intr_handle); > > if (index >= intr_handle->vec_list_size) { > - RTE_LOG(DEBUG, EAL, "Index %d greater than vec list size %d\n", > + RTE_LOG(ERR, EAL, "Index %d greater than vec list size %d\n", > index, intr_handle->vec_list_size); > rte_errno = ERANGE; > goto fail; > @@ -454,7 +454,7 @@ int rte_intr_vec_list_index_set(struct rte_intr_handle *intr_handle, > CHECK_VALID_INTR_HANDLE(intr_handle); > > if (index >= intr_handle->vec_list_size) { > - RTE_LOG(DEBUG, EAL, "Index %d greater than vec list size %d\n", > + RTE_LOG(ERR, EAL, "Index %d greater than vec list size %d\n", > index, intr_handle->vec_list_size); > rte_errno = ERANGE; > goto fail; Looks good. It would be better to use %u for nb_intr and vec_list_size since they are u16 values. But that is a pre-existing bug. Acked-by: Stephen Hemminger