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 A24DC45CD8 for ; Mon, 18 Nov 2024 19:22:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 438B342D2B; Mon, 18 Nov 2024 19:22:14 +0100 (CET) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 1A3E6427AD for ; Mon, 18 Nov 2024 19:22:09 +0100 (CET) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-720cb6ac25aso104960b3a.3 for ; Mon, 18 Nov 2024 10:22:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731954128; x=1732558928; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yJ3n/CMP2ySXIEPxzei5i3FJxd3GOsSdafQ0jEoaD5I=; b=FQC8oJreL1VTPTcjapMvQWhQwioYNLNUy7DvXMO74GpnwNlEUv278pwsBaar+qUlTt Zu+PeHRXMaUNHZeZ5mGEoDrislDdlDz3o0uf+nNoR1Gfr2L8ReenP5TU+4SUCsOspCN4 jRUcxyalPWlmo/s1J8NIA3N00dFWODsH7l3phQoO+w63yfWo8TUYmXuRlbsYwSaBYrvX UJeW5cnI2lYiLjPgQLoJoWS2ZgEG5zgQ3OaB91T25TbRwdHDuNx1z7wpvwVR9V4r5jTu 15Jr3eD20YyXvogloPjEI2Te5O79Wghtq2mAzicPJCU392ptrFkz/WYNhfonzS/mw6Mv twNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731954128; x=1732558928; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yJ3n/CMP2ySXIEPxzei5i3FJxd3GOsSdafQ0jEoaD5I=; b=BpYU7mhHZ2n4RhIZoXQ1VImaj4/WizFwJcvBcwWfh1MPyBaohvcB4+IIEpKL9KThgj qyXdEOMMygwaH9TTrMTNo0SITPDcN/edWbvlCOwOJUOJu98MpOhmAt8lufDPbRAeP11E XS8LuZ8N4yKcYra0898OZbjR2A0S/ox4jW2F0kKRQPaoIhRCjK/MxbBFc+XLBpWGNT7K 3WdVtr/Ggw/0NcpSqCIzpy9sP/P/rAGB0k+2uH/vhumhed8wHEpund8C5NZQNKL8MOIT gurUj9nPXnjFROuMwomVqFUDeGCcSlyuSba0DcJqK+PTTL3Xk4OCocoSIOa1DLfE4OGQ h9wA== X-Forwarded-Encrypted: i=1; AJvYcCUru1RQ4trbYzk85KcZwlssTfu8K3u+yvIJ/Ti+IyE1accGbBPzICSjFNIR9yiMepa9T3S7ABY=@dpdk.org X-Gm-Message-State: AOJu0YwbZ37kgBw7jHEZMNWfY4jDhmzUaOFZ9FsLsdyE14de2p0iQkBB 3JkrQX4AjwPOyhnPoYbbD77eNlW8WXYJH+GLrcMcA9eaaRl13iSaJ0tCMC+ZbbA= X-Google-Smtp-Source: AGHT+IEhcdFujfe6Vv0Kzv8iy3Uy6AP+VJYxyGlrl7raoMEzp47pt62k0dz7jjf1JwdweSgH49elxA== X-Received: by 2002:a17:90b:1c10:b0:2e0:7b2b:f76 with SMTP id 98e67ed59e1d1-2ea1551e389mr16303103a91.19.1731954128341; Mon, 18 Nov 2024 10:22:08 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea61869bb2sm2916724a91.12.2024.11.18.10.22.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 10:22:07 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , rmody@marvell.com, stable@dpdk.org Subject: [PATCH v2 07/19] net/qede: fix missing debug string Date: Mon, 18 Nov 2024 10:20:48 -0800 Message-ID: <20241118182153.87042-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241118182153.87042-1-stephen@networkplumber.org> References: <20241115060738.313190-1-stephen@networkplumber.org> <20241118182153.87042-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The array of debug status strings did not match possible enum values. Add the missing element and a static assert to make sure the table has all possible values. For more complete description see. Link: https://pvs-studio.com/en/blog/posts/cpp/1176/ Fixes: ec55c118792b ("net/qede: add infrastructure for debug data collection") Cc: rmody@marvell.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/net/qede/qede_debug.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/qede/qede_debug.c b/drivers/net/qede/qede_debug.c index 18f2d988fb..1d3147b724 100644 --- a/drivers/net/qede/qede_debug.c +++ b/drivers/net/qede/qede_debug.c @@ -4,6 +4,7 @@ * www.marvell.com */ +#include #include #include "base/bcm_osal.h" #include "base/ecore.h" @@ -82,6 +83,7 @@ static const char * const s_mem_group_names[] = { "TM_MEM", "TASK_CFC_MEM", }; +static_assert(RTE_DIM(s_mem_group_names) == MEM_GROUPS_NUM, "memory group string mismatch"); /* Idle check conditions */ @@ -5614,6 +5616,8 @@ static const char * const s_status_str[] = { /* DBG_STATUS_INVALID_FILTER_TRIGGER_DWORDS */ "The filter/trigger constraint dword offsets are not enabled for recording", + /* DBG_STATUS_NO_MATCHING_FRAMING_MODE */ + "No matching frame mode", /* DBG_STATUS_VFC_READ_ERROR */ "Error reading from VFC", @@ -5759,6 +5763,7 @@ static const char * const s_status_str[] = { /* DBG_STATUS_MISSING_TRIGGER_STATE_STORM */ "When triggering on Storm data, the Storm to trigger on must be specified" }; +static_assert(RTE_DIM(s_status_str) == MAX_DBG_STATUS, "status string table mismatch"); /* Idle check severity names array */ static const char * const s_idle_chk_severity_str[] = { -- 2.45.2