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 E4A4C48BAC for ; Tue, 25 Nov 2025 19:10:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE9F840B91; Tue, 25 Nov 2025 19:10:57 +0100 (CET) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mails.dpdk.org (Postfix) with ESMTP id C47DD40615 for ; Tue, 25 Nov 2025 19:10:56 +0100 (CET) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-477b91680f8so46156695e9.0 for ; Tue, 25 Nov 2025 10:10:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764094256; x=1764699056; 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=DHNi0u4yPhCK5SWd1PYXOa6UsXf233YaT32KemXLR8k=; b=kKNG+LJqti8bos3scHejIjfYmugCLybs8Un22mEseabfjO/B+v70FaxLb3CDiZ1lLL gGTEEX065a9YRrMdv3QJpd7SiMZ02RLKu5HbTIHIUa45g1uOXa2Se6bg2QRCAWIdCc1L TDvlWe1vEfvsG3GuyIZDYKfmGSDBZ+/LJJDWYjeoDeUWxPCpMSgUSJSLZgSpL0mR+Tg4 bNHu6rKRKCy6SpTxyn8GHhP6nTOn1xGsBd+s+oYVHFUkwbyhANUGEZneA7gXKls10+Jx sAHjnRqMjQWMhjGJA+GvpVGi5rhedEEE3jUxmMnbwg/+SOAP3xofkyUB9CdCsaPPoq8m +5/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764094256; x=1764699056; 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; bh=DHNi0u4yPhCK5SWd1PYXOa6UsXf233YaT32KemXLR8k=; b=WpVk/acL6bLNS1gdyFGKyOW0uHNk5a7hImWp8qasyK6Mj5YaUwaR4qj8y65bfqKOD/ LCMfLJByCwRG1ccA+IBm2v/mHYPhPAjBb5XaIomQbvWldcJPdG1CysaoypDAYVroPW9O guoP1d33ovErqJxgovrlvurZA1nxU2z/YoENw4YrLcz8JuKPB9sNJRviUxbCEhhwCYZY zXWRvjgSoOe2HsWH6LSYkncLu0H6DBAj/cOEwrokFzGA6wBs/kXTzsXgx+4uItwNepLD ZSAeWVHBjNJ9BF96AGGnQatYeQD4N+EgVYUnGI3q5kb5ONP/8khQzcEVmd+FNsum9Ntb zFHw== X-Forwarded-Encrypted: i=1; AJvYcCUwlerNqqLQu40aGAhEN9kohqF1SEpBh0wrg0PZV1bihzrtqyBGj/gL/bYfAm77Ru3JqZpDD1U=@dpdk.org X-Gm-Message-State: AOJu0YwaMZoP9zK3mR4yALVMtBh5hEUBmNxEjwxi6UPaYsYFuFPQFiTS ivyVlKZeGTkKignIcFqtMRWohzEDv2szUep8zdtOFTr4MaYKW9RyQy4dc/ADDg== X-Gm-Gg: ASbGncsNLPZ7OKN67r47qdx1KnaDwU5uZkrQMFRWZTALmlIB6P6vxHIUYEghJsON52k h52RA8ug/qZZHDX5DtbooKeH2j8JfzcJ91huZEmsIE+zm7SCbhqDXqZqD+acStsPJqF2rU4iRzu uCkF5O5w1OEYJ74/F4xQYQNZoiqypX10Ofb1J4I4w9YfKekdGn/SpMnsKi9m/q4a0M6B0ZLHQyZ 2QoojizjGmnTbvDziPZQ0DGyydEQhvPLmSfH47UP1XsuSsfkKhoRwyXtb0IwfV43hvDZjBQWR2w CSfOLgAMPdkBHVi8FQJ7FnuxpaIbErKQqluCGlQNrsrNaxlha+kp8TXu1aH8m/y+D5RLxBuSrDp MxVAI6WxwQtkmWrid3LooENpm5TbBQLXxGgHoLYcFUgfcSjq6YJGGKVEgwZhr2/8sSpwZaxMgf0 3t+Q== X-Google-Smtp-Source: AGHT+IEEYl44/9vCPUH8A/OMaN7z5C097UUuHtR7sDHj6n3U4VjRSWYKYoCUI01vAkctp9Win3KKmQ== X-Received: by 2002:a05:600c:3b01:b0:477:7c45:87b2 with SMTP id 5b1f17b1804b1-477c111607fmr183985715e9.16.1764094255599; Tue, 25 Nov 2025 10:10:55 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:e128:6b49:7104:a117]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-4790b0e21e8sm713485e9.15.2025.11.25.10.10.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 10:10:54 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: Bruce Richardson , dpdk stable Subject: patch 'examples/server_node_efd: fix format overflow' has been queued to stable release 22.11.11 Date: Tue, 25 Nov 2025 18:10:26 +0000 Message-ID: <20251125181053.1783870-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251120124514.757933-17-luca.boccassi@gmail.com> References: <20251120124514.757933-17-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Hi, FYI, your patch has been queued to stable release 22.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/27/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/f2038f74e9882523922934b6c9ab4ef1d2f91728 Thanks. Luca Boccassi --- >From f2038f74e9882523922934b6c9ab4ef1d2f91728 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 20 Nov 2025 08:21:59 -0800 Subject: [PATCH] examples/server_node_efd: fix format overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit c97d223fc64fc10cf8f6c6f0e7d506926e83462b ] If format-truncation is enabled, the compiler detects a string overflow since the snprintf() is putting ethernet address and new line in buffer only sized for the address. Since get_rx_queue_name() is used to create a ring name. The buffer should be sized to be a valid ring name. This fixes some format-overflow warnings and also corrects for future errors. In file included from ../examples/server_node_efd/efd_server/main.c:31: In function ‘get_printable_mac_addr’, inlined from ‘do_stats_display’ at ../examples/server_node_efd/efd_server/main.c:136:3: ../lib/net/rte_ether.h:248:36: warning: ‘snprintf’ output truncated before the last format character [-Wformat-truncation=] 248 | #define RTE_ETHER_ADDR_PRT_FMT "%02X:%02X:%02X:%02X:%02X:%02X" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../examples/server_node_efd/efd_server/main.c:86:33: note: in expansion of macro ‘RTE_ETHER_ADDR_PRT_FMT’ 86 | RTE_ETHER_ADDR_PRT_FMT "\n", | ^~~~~~~~~~~~~~~~~~~~~~ ../examples/server_node_efd/efd_server/main.c: In function ‘do_stats_display’: ../examples/server_node_efd/efd_server/main.c:86:59: note: format string is defined here 86 | RTE_ETHER_ADDR_PRT_FMT "\n", | Fixes: 39aad0e88c58 ("examples/flow_distributor: new example to demonstrate EFD") Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- examples/server_node_efd/server/main.c | 2 +- examples/server_node_efd/shared/common.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c index fd72882e3a..f1bb6c09fc 100644 --- a/examples/server_node_efd/server/main.c +++ b/examples/server_node_efd/server/main.c @@ -68,7 +68,7 @@ static const char * get_printable_mac_addr(uint16_t port) { static const char err_address[] = "00:00:00:00:00:00"; - static char addresses[RTE_MAX_ETHPORTS][sizeof(err_address)]; + static char addresses[RTE_MAX_ETHPORTS][RTE_ETHER_ADDR_FMT_SIZE + 1]; struct rte_ether_addr mac; int ret; diff --git a/examples/server_node_efd/shared/common.h b/examples/server_node_efd/shared/common.h index 130fd4f4e5..cd6b803ea1 100644 --- a/examples/server_node_efd/shared/common.h +++ b/examples/server_node_efd/shared/common.h @@ -58,8 +58,9 @@ get_rx_queue_name(unsigned int id) /* * Buffer for return value. Size calculated by %u being replaced * by maximum 3 digits (plus an extra byte for safety) + * Used as ring name, so upper limit is ring name size. */ - static char buffer[sizeof(MP_NODE_RXQ_NAME) + 2]; + static char buffer[RTE_RING_NAMESIZE]; snprintf(buffer, sizeof(buffer), MP_NODE_RXQ_NAME, id); return buffer; -- 2.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-25 18:10:03.595293028 +0000 +++ 0001-examples-server_node_efd-fix-format-overflow.patch 2025-11-25 18:10:03.554456728 +0000 @@ -1 +1 @@ -From c97d223fc64fc10cf8f6c6f0e7d506926e83462b Mon Sep 17 00:00:00 2001 +From f2038f74e9882523922934b6c9ab4ef1d2f91728 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit c97d223fc64fc10cf8f6c6f0e7d506926e83462b ] + @@ -33 +34,0 @@ -Cc: stable@dpdk.org @@ -38,2 +39,2 @@ - examples/server_node_efd/efd_server/main.c | 2 +- - examples/server_node_efd/shared/common.h | 3 ++- + examples/server_node_efd/server/main.c | 2 +- + examples/server_node_efd/shared/common.h | 3 ++- @@ -42,4 +43,4 @@ -diff --git a/examples/server_node_efd/efd_server/main.c b/examples/server_node_efd/efd_server/main.c -index 75ff0ea532..62c3f4a16d 100644 ---- a/examples/server_node_efd/efd_server/main.c -+++ b/examples/server_node_efd/efd_server/main.c +diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c +index fd72882e3a..f1bb6c09fc 100644 +--- a/examples/server_node_efd/server/main.c ++++ b/examples/server_node_efd/server/main.c @@ -56 +57 @@ -index e1ab7e62b7..6726e2031e 100644 +index 130fd4f4e5..cd6b803ea1 100644