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 67E3948C1E for ; Wed, 3 Dec 2025 16:20:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D929E4029D; Wed, 3 Dec 2025 16:20:23 +0100 (CET) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by mails.dpdk.org (Postfix) with ESMTP id 89DA84029D for ; Wed, 3 Dec 2025 16:20:22 +0100 (CET) Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4eda77e2358so56982031cf.1 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:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=UMflljZ3qZ+kVPnuUEVmkFUweOTyB7LsrITx03P1RqM=; b=ZtXXosMrc7YFHJlkMeBYlhyaaW6RRRhMOFfyvMqfMvxVqT0mywRMIw8d14AQjRi2Iy 4ilqKTmg6u31fm67QqiYvEId9CEXZJr5uNyxaF3zDVupSn7Wwsi+YVbIbxE1OkwR1h0N NpzgEFBRnjYLKq81kWp1NOTQj1YnKtYGDaxtxBzXFdW86ZNOKeKf/STgRg85DW7nD5I0 0mFsG/E7zqVt1hhw2XW6TNU75JAJYgaXxbiPgF8nLsNQj+rMo1pm7RGyIOylaRlCcRDm pgnl/mbX5ggeSCCCJjlJ6UhjeBFSicygotb8uQrCki1mJGLJwZC+mCFd0yQUgzhxtTQM vrHw== X-Forwarded-Encrypted: i=1; AJvYcCVRZiNS2ph6GoayR4URWvQ67DM1T0C+/hehKf6ItaBr0bUp43F0CAOV3Y0URMS0npD51FhrBYE=@dpdk.org X-Gm-Message-State: AOJu0YwEnLU3pQeJ8SKZmTfkj7TvY6fetJF709vonbtMjfPFgQPZxkop LAocluOu2tHdNTLT9WphDZfAeeZ4uCJY83EKw7rVZAMidEba+y14i4bY0M3CVNpuXrmgkZ+bzUT uoyxU X-Gm-Gg: ASbGnct9xVw6RD2sysXRA5yhBzaMyZCjv72/kC1KW5fWjKY69N1zzjI6MCQzDX/dLm3 rbw3QEokE2alMepzof75T+09yvAVFWGXZf8h2Ug1Yae0eOMNWouUfLG23xZHw+OAAseXsz5Uz+T nUM4th3LVTfsCtKjeSb422ypH2GWmXdH6tsHikoM3AyEvLbnKvutFnfXRcrpyLptHS4tJlRfdcu suJ/I80MMs/XtkxZ95+WH89K4QtjYHyttxeFHLq+mJWerOPTPpv8gvU77cMWT6iSuCsiybGRbh5 7psblZ+rGducDqvGDcIxhnYIOnmDUDfUE2oJt5De3VibYcGbDzaRalJaTVRdQONH6cfgyu1sC4H TWRx79TdJ/q4AXcS/lEo39aCSPxDRlOFOgwEZlBaxcUPQZrYC5zy0+LO+63eAqm21kM4CnWrZLU p4xmav4t9xMwRma5PMyZXyVzFaIgvwoyRPmf1lhQlrgIzTj4SWGS1g9ewS1toMACw= 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: 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 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