Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F121E606A31A for ; Tue, 1 Dec 2026 19:33:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=te1XrDdw Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BE8140653; Tue, 1 Dec 2026 20:32:50 +0100 (CET) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTPS id 440DC402E3 for ; Tue, 1 Dec 2026 20:32:49 +0100 (CET) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-cde7e8abf9cso4909533a12.0 for ; Tue, 01 Dec 2026 11:32:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1796153568; x=1796758368; 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:content-type; bh=ykO+DvzoUci+U4mYz7iUfTXDAYMPO0cTzIvQjxhwdc0=; b=te1XrDdwb8PRAGnD9lGWnrT6U8pHVA6Y1Xeq7piX8eFZFkHlHzqRsBaWX/Ha3du+0n 5KbwUo07iVtiqYnntdbDoKCZAF0mcArqUV+/STLDFduDbpE7HW17chSukIDNM+aa2vE2 aT19S+knzCZf8y144UzWThzwuMlpMLnRyYR2TCDi2JL1yOa5hnUzmrR1eIX41nwM1IkM Bt+5PhbhuEEao4cftH3qyDlouuXZvI5Vriz2LRgMsFu7jl4K4AVrsvQHVnZC6o8Ocevx VhSGVk5ni8NznWLrc6Wrjn4MZMnjx8W2ldUBB51YOUsXQDD5q7WFqI5PyRpS6L+CLu/1 +J4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796153568; x=1796758368; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=ykO+DvzoUci+U4mYz7iUfTXDAYMPO0cTzIvQjxhwdc0=; b=T4WtXXiqVwUTbkpymPnIdpW29nmppf16jU5z28hE+UuwlNBQepnJfy0x3fSLO4vU71 l0t6o2WDbxb1/KB1nSmNJrlb8IpMqQqnQXd0HtBYaYhEdsWlsEoDHYevEt4s6ctN3daV 850BsucntuD0EpRzFVV4kfnrCvqndvN2rqZWiEjcnSY1bTcfOMkQXDy/ubEH8x1K6at9 2M/zFXsutxC9KQzh+5llbJ6Uwl+0K5rhYFBPUIrBtVGIfgdD21q1AUpyXCMIjfCzA3pS buRItx5KNL3TdPiFvJdzfBycPqjwhzOCSWwd2htxtraoFLtrzbb0xtl+uIhR0U/UzcNM Hpvg== X-Gm-Message-State: APuU4Z98US+vX2CL0iAhaOPTKlaoyNuXhNG3hbv/OQn94F6eZIHoNvRc w5Q7KTeGXsIlckikwgdOZO4d7JFtslH8WEllR3XnZGz2yOpEpwqdlHHV/tKXdruy6Ps/1pgMiRJ OqQZf X-Gm-Gg: AZFdTZcykn5slKE0aO4xm8e33E6XHkEMMUylnuwYlNfypLNvg1rrEWo8eMU2f/oQAZ0 Xligh8KalJaVlCrq7K6L4bd01sQesm0znb11/1iXnfVYMGgVMNDYHjd3yT0QkSOXpEHeADdMiBr nN74fpwiqYvrq6Yw4FnLkOKYT7Rt4OKHypWlJa2P2SD04VLn98guFAnr6AieHavHl0WPVYWDcL+ upjasFTDgCyZ6cq2m5Q3e+bkyBauuIMsNxx2qeSUUtkGorTxfGdrKgLUHQEI8bqmyOwlpope1Ph 7Uskyn/HGng7iXizHi0m8WszWRoAc+3dY0CBg96PtClJd9NoKtLnTF+aX3QhwbLRIfQO2AakKAv eOkvBm1ocdHabC5P5a2D2mKOPzAsZ5q83PEEfTvNjmTYzhsVCRuRYHYnHkdHnh3plPuq4a5iK/I 19VU/cmPrj37sS/LRGCg2Dyp75+Wzx81SW3+wx3ewen9GJlThHNte++lh/VUU94gr9P5CPyNb2l OCRppqfaxnbaurkfUonI9XZAzZZzrBFXbNFYhXbtJcH8veliwSwp9JZHTTwpWKo8gCjQmnXVHvV XI2ABM05/9IOYSw8koUUNk0yKrEQXSOP1tE/d22M63okMQH2ZU0Je1dQie2PM/avX24b X-Received: by 2002:a17:90b:17cd:b0:3ae:6fda:78b1 with SMTP id 98e67ed59e1d1-3b41c95b6bcmr36435140a91.43.1796153567665; Tue, 01 Dec 2026 11:32:47 -0800 (PST) Received: from phoenix.lan (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b44b21e19fsm23264700a91.0.2026.12.01.11.32.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 11:32:47 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , stable@dpdk.org, Reshma Pattan , Konstantin Ananyev Subject: [PATCH v3 2/8] pdump: fix error code when adding callback fails Date: Tue, 1 Dec 2026 11:31:11 -0800 Message-ID: <20261201193243.1008280-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261201193243.1008280-1-stephen@networkplumber.org> References: <20261028141750.310963-1-stephen@networkplumber.org> <20261201193243.1008280-1-stephen@networkplumber.org> X-Archived-By: 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-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 The register functions returned positive rte_errno on failure. The caller only checks for negative values, so a failed Rx enable fell through to Tx, and the positive value sent back to the client was negated into rte_errno, giving messages like "Unknown error -22". Fixes: 278f945402c5 ("pdump: add new library for packet capture") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- lib/pdump/rte_pdump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c index 3d494592b3..56a12f96ca 100644 --- a/lib/pdump/rte_pdump.c +++ b/lib/pdump/rte_pdump.c @@ -283,7 +283,7 @@ pdump_register_rx_callbacks(enum pdump_version ver, PDUMP_LOG_LINE(ERR, "failed to add rx callback, errno=%d", rte_errno); - return rte_errno; + return -rte_errno; } memset(&pdump_stats->rx[port][qid], 0, sizeof(struct rte_pdump_stats)); @@ -345,7 +345,7 @@ pdump_register_tx_callbacks(enum pdump_version ver, PDUMP_LOG_LINE(ERR, "failed to add tx callback, errno=%d", rte_errno); - return rte_errno; + return -rte_errno; } memset(&pdump_stats->tx[port][qid], 0, sizeof(struct rte_pdump_stats)); } else if (operation == DISABLE) { -- 2.53.0