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 0DA5EA00BE; Thu, 17 Feb 2022 12:37:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95FA041158; Thu, 17 Feb 2022 12:37:00 +0100 (CET) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 0281541156 for ; Thu, 17 Feb 2022 12:36:58 +0100 (CET) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Jzt3N71jvz1FDHw; Thu, 17 Feb 2022 19:32:32 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.21; Thu, 17 Feb 2022 19:36:55 +0800 From: "Min Hu (Connor)" To: CC: , , , Subject: [PATCH] app/testpmd: check starting port is not in bonding Date: Thu, 17 Feb 2022 19:36:55 +0800 Message-ID: <20220217113655.45347-1-humin29@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggeme756-chm.china.huawei.com (10.3.19.102) 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 In bond, start or stop slave port should be operated by bonding port. This patch add port_is_bonding_slave in start_port function. Fixes: 0e545d3047fe ("app/testpmd: check stopping port is not in bonding") Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) --- app/test-pmd/testpmd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 6d2e52c790..fe2ce19f99 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2726,6 +2726,13 @@ start_port(portid_t pid) if (pid != pi && pid != (portid_t)RTE_PORT_ALL) continue; + if (port_is_bonding_slave(pi)) { + fprintf(stderr, + "Please remove port %d from bonded device.\n", + pi); + continue; + } + need_check_link_status = 0; port = &ports[pi]; if (port->port_status == RTE_PORT_STOPPED) -- 2.33.0