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 B70A445CFB; Thu, 14 Nov 2024 01:14:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6EDCD40ECF; Thu, 14 Nov 2024 01:14:18 +0100 (CET) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id CDCC1402A1 for ; Thu, 14 Nov 2024 01:14:15 +0100 (CET) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-71e52582cf8so6005455b3a.2 for ; Wed, 13 Nov 2024 16:14:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731543255; x=1732148055; 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=Bg2fejL11cOlerdodgegkIGfdZHl/Cr+csA4spAiWrE=; b=0ACN7DZawPuvnlzDvcLfPevB097CuVFKeyZrU7LjZXe2nMvRB7Zev+ih0hBqCsP/mO RKEnzdIrQaW05wO9cMqM0qSS2k1PyDDRbx3oxs/DdNVqrEAspI7YsqfaYQmMz+1pAXel kitxti3auh0HDMC3+CJXPLg7HmE3ATTvjweZ8b97W8h5BhsyKpP7daP0EVcVOZamWqtJ osxg328cXpwa7qcOBAFReNZ3wChU1xi2A2kCXj4gwUC7WfE2tWeyHEaqMumA1cDR/amU xKC0sRUhLT59DhYOuKOE+zCxz8xsFq85BvBSbp6HNPubCyVa8jhkRbPvyw5Nvt1jBwiU NUQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731543255; x=1732148055; 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=Bg2fejL11cOlerdodgegkIGfdZHl/Cr+csA4spAiWrE=; b=IHeksGApNRzXkS4vMa/imO8AMeZ2FfFujjWl+a0zZriEoW7NAYpxRrvr7h2padpqc1 hDOwgHJH0Zv/usdNIFXlzR44nYkbO+AQ2AHfDD67yqPLqhbZU9iaTtwYqlpC20jdNv6p INRdyMOUjtc7gZ21d+JAXh5RmtJmXspwA/KzLglWpIBSrvERVqpb5qAOeiRO6IctsHJ3 azYxzyuwrrYLEEbyvFYMsB7ssQM5cvgnziuzzXhj4LW0OTaZCRjx/WfM5WzwJMr0V/gK y+isex/4PZ99a4IX8xW4Pz+qtptGYFOvczQhISibmDcIAGbwDLnzBUUlPmQLekOllEUC aTLg== X-Gm-Message-State: AOJu0YwXkbJT59UY54IBFdu3RsH5cwr67rhUDDOklRcvhNSVAXZ6tlHK YXgTfRZGXyucsx++Sl9ySuitaGZojO+CFRqSxUXaOty3RpL+C7SkS+mt2OjaXUuTun38IjqdwD3 R X-Google-Smtp-Source: AGHT+IHCycuJzn06D8tGGJq4nYk4G4oAggsSa0GTOw58Lh7DmKzZ5ZBiW1kYBAJLjCu/f88j9UreMQ== X-Received: by 2002:a05:6a00:23ce:b0:71e:cc7:c507 with SMTP id d2e1a72fcca58-72469e3268emr210779b3a.23.1731543254927; Wed, 13 Nov 2024 16:14:14 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7246a9a81a9sm9280b3a.99.2024.11.13.16.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 16:14:14 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , declan.doherty@intel.com, Chas Williams , "Min Hu (Connor)" , Pablo de Lara Subject: [RFC 01/10] app/test: do not duplicate loop variable Date: Wed, 13 Nov 2024 16:12:13 -0800 Message-ID: <20241114001403.147609-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114001403.147609-1-stephen@networkplumber.org> References: <20241114001403.147609-1-stephen@networkplumber.org> 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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 Signed-off-by: Stephen Hemminger --- 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