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 66D4545CC3; Thu, 14 Nov 2024 20:26:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F0BD42EDE; Thu, 14 Nov 2024 20:26:19 +0100 (CET) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 25AF34021F for ; Thu, 14 Nov 2024 20:26:16 +0100 (CET) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-20cf6eea3c0so11870865ad.0 for ; Thu, 14 Nov 2024 11:26:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731612375; x=1732217175; 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=MWZgM+pOK/P4LOglUEkKlzqqmLbWg9jgOcWI6jQpmnQ=; b=alQmy/Qczth/MrHzBjPsPE1uqHehO2XGSCZawaj3RrKJq2CNJ8uvGVlLM0b9WgAIrd tzGPbwomhYf5eJmhnVqkFCOSsIXOE+Zh6BIH9TXcoZ6scfeVO6j0d1n39Ig48RXgT4Mm u/Tbdzeakqn0DzAlozFSMmDF9IbOS8lVff2Job0d8HqMe+9i9/u0aATdunYEEs8buP7l pLYIoe2E26yKi1R44m6CsAmJCoZtxiWWQUMVPEinnxcq+TNQbhoazNMj9iUP9c3qwfYP 3J5RYfoh44qMGqGu5RLjIUlCJ/2bLIzEtzQXETsGjRMbgCR5b5TF3BRt63nq/kJQW7P+ KLCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731612375; x=1732217175; 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=MWZgM+pOK/P4LOglUEkKlzqqmLbWg9jgOcWI6jQpmnQ=; b=c2bWlbRZ3wlZSJglmyUVMxGzIfWSogZ39DY1PYYCNrALXyTZzhwudkpdM74CaW+fkx 04r8dVzC8Dgu9Os8a6a4+47jhicITtAuUzRCDczcutf/txYzVJj+mxKnlIUwnELfeITA MKkwSfkyURvv5EEDhbki9U1I366owT10iT1lM36jtBdqSFQe6EQMqOVw2C9jwNn6WGw8 8jyxSwzaW9ck+uBSDrc5DbYxaK4LgfvjR4ycksS9/SslgLTkiBYJbodVnjwJ1GCQfW6w 3sQNNbsPiRAFIK9akq9cZf54lVYDRJwdz153vsDPM1S9kKib+F1PUrwyPiNb6erQU8Vh 7DKQ== X-Gm-Message-State: AOJu0Yy6YX3pShenIsStubGtFUr66TmO6j+LsK04q78T7zQ7dJt7KpI0 rWeE/RKjlIfMIr9lMJ9JzyXehA66SQJ96nZARLSUSbS3FKcUoNEjGWXD+awGkaYHnXtcgNar64B jXqg= X-Google-Smtp-Source: AGHT+IGyzyLuD3Fprtnje+NzSB5r2fYH6MxJJz3CbrmvwYIlpMN6chGnOyjn/F9+pBzMwnQDZVP6Lg== X-Received: by 2002:a05:6a21:99a0:b0:1db:ef68:e505 with SMTP id adf61e73a8af0-1dc229cc1c1mr32878778637.20.1731612375322; Thu, 14 Nov 2024 11:26:15 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7f8b37f3466sm1461632a12.35.2024.11.14.11.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 11:26:14 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , declan.doherty@intel.com, stable@dpdk.org, Chas Williams , "Min Hu (Connor)" , Pablo de Lara Subject: [PATCH v2 01/10] app/test: do not duplicated loop variable Date: Thu, 14 Nov 2024 11:24:59 -0800 Message-ID: <20241114192603.41145-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114192603.41145-1-stephen@networkplumber.org> References: <20241114001403.147609-1-stephen@networkplumber.org> <20241114192603.41145-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 Cc: stable@dpdk.org 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