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 BBAB745CC3 for ; Thu, 14 Nov 2024 20:26:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEFA942EE7; Thu, 14 Nov 2024 20:26:20 +0100 (CET) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mails.dpdk.org (Postfix) with ESMTP id 5BCAC4025D for ; Thu, 14 Nov 2024 20:26:16 +0100 (CET) Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-7edb6879196so797883a12.3 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=vN0OPt4VcjNpZVxGn1tnSXfLZjtJxoJWI5KtvuHITYkzxZg8lOuOKqF8gNe7qUoZV8 kdwI2OlSSaUFD8FAemCEfy+w7c0x5DB0D8MbRmvEkZsBX/S/TiROlRBnl/adLmmcA+Ly 8mzxTZsoUEk0U7+/IJmVtNwlAq5hATwAlkjon6sAyYtEQd/MBK4kqAA9CfVh+mhmE/99 JUWQ9WXlC8HqliLIBsUnfwA8iFfcTczjrdKaj38wDDqnbU5+oMflKJvA9YKOurW2vF0F oXL3s2otj/n2AqP9Zf8+hAP5lZaXNlY+bIo4FCnaSpAtK7NKnU0g3av+pJ2b3dAcQxc7 Gfrw== X-Forwarded-Encrypted: i=1; AJvYcCWnJKcBtZykCsmmlmRTe7szzQF3HFIFvFKUKyz4vigg5ET3J95LeHOcWZ0fDQ2KLydta2DbWjY=@dpdk.org X-Gm-Message-State: AOJu0YyQiVOUQME9EXL7OfGWXYwWmKRhQ7FcH30V3aFNSCLvDJrluKFx 6TeyYkkCaWkqJ9kVDu2Je+fVt2i11hMM7C5i//RmdsZPihhoyQfkq656/3wbVoo= 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: 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 --- 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