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 58AECA00BE; Tue, 3 May 2022 12:03:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3860C42820; Tue, 3 May 2022 12:03:26 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id BEED4410E8; Tue, 3 May 2022 12:03:24 +0200 (CEST) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KswVh62Bnzfb55; Tue, 3 May 2022 18:02:20 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 3 May 2022 18:03:22 +0800 From: "Min Hu (Connor)" To: CC: Huisong Li , , Min Hu , Chas Williams , Andrew Rybchenko , Ivan Ilchenko Subject: [PATCH v3 2/5] net/bonding: fix non-terminable while loop Date: Tue, 3 May 2022 18:02:14 +0800 Message-ID: <20220503100217.46203-3-humin29@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220503100217.46203-1-humin29@huawei.com> References: <20220324030036.4761-1-humin29@huawei.com> <20220503100217.46203-1-humin29@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected 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 From: Huisong Li All slaves will be stopped and removed when closing a bonded port. But the while loop can not stop if both rte_eth_dev_stop and rte_eth_bond_slave_remove fail to run. Fixes: fb0379bc5db3 ("net/bonding: check stop call status") Cc: stable@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_pmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 92caf24f4b..8f48ba7d23 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2156,6 +2156,7 @@ bond_ethdev_close(struct rte_eth_dev *dev) RTE_BOND_LOG(ERR, "Failed to stop device on port %u", port_id); skipped++; + continue; } if (rte_eth_bond_slave_remove(bond_port_id, port_id) != 0) { -- 2.33.0