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 098B645D17 for ; Fri, 15 Nov 2024 21:08:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F271E43278; Fri, 15 Nov 2024 21:08:04 +0100 (CET) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id D323D402C4 for ; Fri, 15 Nov 2024 21:08:02 +0100 (CET) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-7eab7622b61so1609833a12.1 for ; Fri, 15 Nov 2024 12:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731701282; x=1732306082; 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=fnZZbrHhooPBtodMvzo7g8k980Y++f3GyuEx+WfkGkI=; b=UKgVw9MPIC/kchFa4fODdlXaYIEfFayaZeERAaaPSTUdcSCd5n9f75yFEx8oLTUeY9 LlvVy8wuMa9ICZImwQ9ulOuaYulWb5zQdIkSKMlpAlSNAJPTk5XJ2/cxSWJBMwYVik1I /nikE0Q5PE7603IC5IrEpOi4fM1k78d4b7IAKovI/ICokZ/CFehToAtfZkSOUDcFKX26 0QIGp1mAK0miAlXP8kBntYZnlKJwUaEQHf1qBXdYpyl7sBKe9YHkKoJNfcm00IO7OKzx LtIrAjr14Dm8TcY2vjhOW68d8ievaCUuf759Lkj3Y8dQJgrMHFALw7NYEuncTKaCocfC GdiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731701282; x=1732306082; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fnZZbrHhooPBtodMvzo7g8k980Y++f3GyuEx+WfkGkI=; b=kCrQInG1ctZrL+MCGo7BsGFOKH/Oj2sm8bvsCHE20NMcPKCG9vjYI3JhsdGkNKz8qA WAcTauQi7imDB1yVf21KYCqM5KoME/2xOhlAhvboOdwHl9opjjZQ8lybOJ5rktxo5e97 IXFhJ/L2MeCC/F4pn9zb5txH/IN2O29Shz+qF4oPJia85zZtZGHW3P3MM1qBcLlFjzRw BEsCKrbHsxNSMIn+CMwrzSS9PfhoOT8wvugnNKL/TiMgc5o9nHrEaPtewS6xUjfujOUB gM/1DrJdZFS+9odP0VA3CY29EVjVc1EPOZHeocjj2nDw70GXDN0O1q/Fx17qkNFThvcm LkAQ== X-Forwarded-Encrypted: i=1; AJvYcCVbC0S5WzQq48Pioxc6aydB4fAhzYmJKiGZjMOLQ/QnC/pa0Zn2GTkQsrt9IwOljYNFzLL1VKg=@dpdk.org X-Gm-Message-State: AOJu0YzbXJRxz+QzMkeLowBrILmxHClV4gZkrxcPmw7XkcPaxEHD3PyL a5r8Ixdjdx748XsWiJp5DMA+twnZOWZ6lLEU8Dm+5Z56VYfVMDlSrLEYK4Xv0R8= X-Google-Smtp-Source: AGHT+IG4Bk6otuvyT988wevnwx1umXv4GdOxtmbVx8vwLmOh4AanqRAXQYevcKJHLLsUmEIL7ilQ8g== X-Received: by 2002:a05:6a21:328f:b0:1db:ef5d:48ef with SMTP id adf61e73a8af0-1dc90b1cb86mr4846684637.14.1731701282059; Fri, 15 Nov 2024 12:08:02 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724771e11f0sm1759686b3a.131.2024.11.15.12.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2024 12:08:01 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , declan.doherty@intel.com, stable@dpdk.org, Bruce Richardson , Chas Williams , "Min Hu (Connor)" , Pablo de Lara Subject: [PATCH v3 01/10] app/test: do not duplicate loop variable Date: Fri, 15 Nov 2024 12:06:45 -0800 Message-ID: <20241115200751.17141-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241115200751.17141-1-stephen@networkplumber.org> References: <20241114001403.147609-1-stephen@networkplumber.org> <20241115200751.17141-1-stephen@networkplumber.org> MIME-Version: 1.0 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 Do not use same variable for outer and inner loop in bonding test. Since the loop is just freeing the resulting burst use bulk free. Link: https://pvs-studio.com/en/blog/posts/cpp/1179/ Fixes: 92073ef961ee ("bond: unit tests") Cc: declan.doherty@intel.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- app/test/test_link_bonding.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index 4d54706c21..805613d7dd 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -2288,12 +2288,7 @@ test_activebackup_rx_burst(void) } /* free mbufs */ - for (i = 0; i < MAX_PKT_BURST; i++) { - if (rx_pkt_burst[i] != NULL) { - rte_pktmbuf_free(rx_pkt_burst[i]); - rx_pkt_burst[i] = NULL; - } - } + rte_pktmbuf_free_bulk(rx_pkt_burst, burst_size); /* reset bonding device stats */ rte_eth_stats_reset(test_params->bonding_port_id); -- 2.45.2