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 EF14345D7D; Fri, 22 Nov 2024 18:01:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CCFAA402CE; Fri, 22 Nov 2024 18:01:18 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 49F03402C3 for ; Fri, 22 Nov 2024 18:01:17 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-7246c8c9b1cso1922525b3a.3 for ; Fri, 22 Nov 2024 09:01:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1732294876; x=1732899676; darn=dpdk.org; 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=mT/u+bdQ1IrR90RP1JaMCzsyQSWAiie5Bbe66HYhjoY=; b=MfNsYTH04KWBQ6Hvg9DczDlrsSB8WW7MYtD91+H5MjYm2Edu0z0JIcGn0QAtvhsjMm +4E3KP4cBwXVKYO1PNhs9bEN5MBfmHXrTyKkaWZtQQBkrrcn4JIFYnjgK3l3QFNUKEIT K+0pwqD8RJOCr60T6d5y6xL5BSMQT+XjJbsryfweTdVGrcWllhngZbLmRt1qRM8gotV/ Tyzrxuao1xmmIiuImaPneU846/ca5/1SF5QCDLbRGRc9vY1AOGT0EVW/SBnAA/jYeIhW NOYIZIdT93jE26tQKgheN0GJy4USNAFFj+deWVPQ7hnPRavX0kmr48J2sulXa1SYV9Bd 5i3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732294876; x=1732899676; 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=mT/u+bdQ1IrR90RP1JaMCzsyQSWAiie5Bbe66HYhjoY=; b=b6yYeJ8rQq1S79H2zXWQKo/gI26oNQImgaZEwF58buVCCzo0pQy2p76BkvzmbcxKP7 qMjqqactumb8vzNXLuJ7H2YZf16DR02oGyqwFHn7G83MSDPlQVftCIqVdbOps7elwZ+Q Z0Yjbo6cueqImxGj2fT5QDTMLyUlBfMPZR56Sbze7e//9EKWcagJfE4swEr+K/iuTD/f flLQV/zkjBt6gPa57IUguT1bFfn5EEx2X+mlprF59CK6Nytr6uXiiiYzsCfBtxBkeF0g +MwXWcfAPuEArNIczvjemiAK8BcoFzO79X41O3Tziz9b2IttEFW2CH7gbArePoAZHbbu zxag== X-Gm-Message-State: AOJu0YxN8ggQnWu3T1ZJ5mn7OSVCrSoTvMegV6++JoV346GfuYlbyrzY NYmUDlqczK6PXcX3jgX/DNTKmwiA5ESKcceXsDJ1sGBkY30xiwpzlJz1PQPws+A= X-Gm-Gg: ASbGncs+kO6w+QdI7L1uqh4rxB2oC/678PBYpaQChHsjCOfSsLv4aDmmOXdoGu0KlhO BjDQCVsbHUcnno6v/dgo3eWMOWkQfD5/a0TmQSm3rhYN2NJL+u7PaHMaw6KYWcvWxemYkFuGHlu LCTY5dCm3aBQJ99/RUSV5X5tpHchMuIlMya1f6KXN/2ePLfHfyulrASLyYheEtp0goAU+e1M6UF udoje+r9eLSojwk/8XW8+giU5o4JiQtHn44/+a4ofiEymKQBqaMLuoh4Ccf+YC6yhTGCIriVaQ9 TQggsTuK7So7SXkXTGXTXO9YMW0= X-Google-Smtp-Source: AGHT+IHfe+gXyb0XWfvp6swsBMe7Qs7bhbguSz5ibtHvjnVg1pULlu1lnQ0BLs8QDcY8LBgFwxrNTg== X-Received: by 2002:a05:6a00:c95:b0:724:ed86:a0af with SMTP id d2e1a72fcca58-724ed86a0famr960158b3a.26.1732294875970; Fri, 22 Nov 2024 09:01:15 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724de532e80sm1846721b3a.114.2024.11.22.09.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2024 09:01:15 -0800 (PST) Date: Fri, 22 Nov 2024 09:01:13 -0800 From: Stephen Hemminger To: Serhii Iliushyk Cc: dev@dpdk.org, mko-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com Subject: Re: [PATCH v1 1/2] net/ntnic: fix incorrect error message Message-ID: <20241122090113.7e7c18b1@hermes.local> In-Reply-To: <20241122165023.387393-2-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241122165023.387393-1-sil-plv@napatech.com> <20241122165023.387393-2-sil-plv@napatech.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 Fri, 22 Nov 2024 17:50:21 +0100 Serhii Iliushyk wrote: > diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c > index d4993eb58a..fd470ddd35 100644 > --- a/drivers/net/ntnic/nthw/flow_api/flow_api.c > +++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c > @@ -81,6 +81,20 @@ static const struct { > /* 27 */ { "Internal creation of a tunnel end point port failed" }, > /* 28 */ { "Unknown or unsupported flow action received" }, > /* 29 */ { "Removing flow failed" }, > + /* 30 */ { "No output queue specified. Ignore this flow offload and uses default queue"}, > + /* 31 */ { "No output queue found"}, > + /* 32 */ { "Unsupported EtherType or rejected caused by offload policy"}, > + /* 33 */ { "Destination port specified is invalid or not reachable from this NIC"}, > + /* 34 */ { "Partial offload is not supported in this configuration"}, > + /* 35 */ { "Match failed because of CAT CAM exhausted"}, > + /* 36 */ { "Match failed because of CAT CAM Key clashed with an existing KCC Key"}, > + /* 37 */ { "Match failed because of CAT CAM write failed"}, > + /* 38 */ { "Partial flow mark too big for device"}, > + /* 39 */ { "Invalid priority value"}, > + /* 40 */ { "Multiple port_id actions for one flow is not supported"}, > + /* 41 */ { "Too long hash key for RSS"}, > + /* 42 */ { "Action AGE is not supported for flow in group 0"}, > + /* 43 */ { "Unknown error"}, > }; > Tables like this often get out of sync. Some suggestions. Use index base initializers, like: const char *dbg_res_descr[] = { [ RES_QUEUE] = "RES_QUEUE", [ RES_CAT_CFN] = "RES_CAT_CFN", PS, why is this string table not static? Still have to handle NULL string if table ends up missing an element. Should also check that table has all the strings: Like: static_assert(RTE_DIM(err_msg) == ERR_MSG_NO_MSG); void flow_nic_set_error(enum flow_nic_err_msg_e msg, struct rte_flow_error *error) { assert(msg < ERR_MSG_NO_MSG); 1.