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 0154748C1E; Wed, 3 Dec 2025 16:20:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07545402F1; Wed, 3 Dec 2025 16:20:24 +0100 (CET) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by mails.dpdk.org (Postfix) with ESMTP id 89DE2402B7 for ; Wed, 3 Dec 2025 16:20:22 +0100 (CET) Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-4ee0084fd98so51061311cf.3 for ; Wed, 03 Dec 2025 07:20:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1764775222; x=1765380022; 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=UMflljZ3qZ+kVPnuUEVmkFUweOTyB7LsrITx03P1RqM=; b=AYOZCE+7kdCb1y8YYw6bDhVcMxglthNiHoarEdIuFvhs20Vq/xm18pthIGVXj0oqnE HGVaGEApoTwnPcYLdaYdlZlV1JjHcQrWFU3G7Uhdw6wh5IDwj4YloQQnYypF6irDGBZP GXYSToDXOaDQOn1WCbrh+v7tT4jYEX1ticLMIg/Ito19sht8Odh0JLIxfQFyRTIGIrjU D5gqnOqEHJqphtCL39ySRsBfyZEY9ARrYmNj9hiQ68JK+HQA94xCEnHrBPCgu1lKtRw1 K83jJQLgjW908pD0L7tIEjzLUQf4LXjT/8lZIwZKqUtvHwn7oKiRtNFJokjBPFyTYkWb VD3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764775222; x=1765380022; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from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zjWPFSLxNmlE8a5uM/E1WpopEwKA11EkSRM4Cbe9ZStM= X-Google-Smtp-Source: AGHT+IE86T1hnBYFyx41ibcs5xyaTXhBigknfq7jE5Iel09KTo0GoXZRe9xcN1IDpjfBJLaBwFz3QQ== X-Received: by 2002:a05:622a:150:b0:4ee:22d6:1cff with SMTP id d75a77b69052e-4f0175a11efmr36222921cf.36.1764775221623; Wed, 03 Dec 2025 07:20:21 -0800 (PST) Received: from phoenix.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-88652b90ebasm128830406d6.55.2025.12.03.07.20.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 07:20:21 -0800 (PST) Date: Wed, 3 Dec 2025 07:20:17 -0800 From: Stephen Hemminger To: Shani Peretz Cc: , , Remy Horton Subject: Re: [PATCH] examples/ethtool: fix buffer size for pkt pool name Message-ID: <20251203072017.27a079d9@phoenix.local> In-Reply-To: <20251203110157.51471-1-shperetz@nvidia.com> References: <20251203110157.51471-1-shperetz@nvidia.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 Wed, 3 Dec 2025 13:01:57 +0200 Shani Peretz wrote: > Increase str_name buffer size from 16 to 32 bytes to fit the provided > format. The previous size was insufficient as the format > string "pkt_pool%i" can produce up to 19 bytes (8 for "pkt_pool", > up to 10 for integer value, and 1 for null terminator). > > Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application") > Cc: stable@dpdk.org > > Signed-off-by: Shani Peretz > --- > examples/ethtool/ethtool-app/main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c > index 1f011a9321..06605b4202 100644 > --- a/examples/ethtool/ethtool-app/main.c > +++ b/examples/ethtool/ethtool-app/main.c > @@ -92,7 +92,7 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports) > int size_pktpool; > struct rte_eth_conf cfg_port; > struct rte_eth_dev_info dev_info; > - char str_name[16]; > + char str_name[32]; Don't use hard coded constant, instead use RTE_MEMPOOL_NAMESIZE which is not 32, but 32 - 4 + 1 = 29