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 A19EC45CD8; Mon, 18 Nov 2024 19:22:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73CC142D68; Mon, 18 Nov 2024 19:22:14 +0100 (CET) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 1C82D427AF for ; Mon, 18 Nov 2024 19:22:09 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-720c2db824eso144231b3a.0 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=MgIRORwIZajOet7kVD50z1Z4sEybpNhQOyTF/LPMjp0yvq7ZM+5VdoepMFdDw3aDOi 867K1xJBFWd8dRZcw/xIWnDy0HVlImpp05LbfP+hw+gxthwdz/vCFwbBGDQgy3SePe2d hJ2htL4wtLLCHJ3QtHPoRQgCq86JxWizQHJ7JlxHU54YA51i4CT/pphLllb8tUQt+1An KqP+mBu/Q9KbYwFFEICFHGbktTn2dLLfNgO6qRrwOheIZRMJAQD4NCk9gX9FP6/zxm6m UuGk9rvmhs4C2wJR8g7ydiy35aAN9GviE/f8rbE/YZXeSlRVBNYi7uEbedemxUwaR67E 6/OA== X-Gm-Message-State: AOJu0YwbDRstq0TXY7wbxhq9nQHXWLAJgmWwSmP470XaMOTBfxvMPRxV 1AqvHPp8bwcn6E41/a5dep2w77lCbgOK8GwBOspYzmnbL6DDgFz2IgZs7NXhh1tvqiz//yMYi/7 t 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: 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 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