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 CA7BDA0C47; Tue, 14 Sep 2021 08:03:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B0D54069C; Tue, 14 Sep 2021 08:03:48 +0200 (CEST) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 0F8C44068F for ; Tue, 14 Sep 2021 08:03:46 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4H7t7H4pz9z8t32; Tue, 14 Sep 2021 14:03:07 +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.8; Tue, 14 Sep 2021 14:03:43 +0800 From: "Min Hu (Connor)" To: CC: , Date: Tue, 14 Sep 2021 14:02:19 +0800 Message-ID: <20210914060219.45890-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: dggems703-chm.china.huawei.com (10.3.19.180) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] examples/kni: add dev close step when kni free 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 Sender: "dev" From: Huisong Li This patch adds dev_close() step to release network adapter resources when kni free. Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- examples/kni/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/kni/main.c b/examples/kni/main.c index beabb3c848..2a993a0ca4 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c @@ -1031,6 +1031,7 @@ kni_free_kni(uint16_t port_id) if (ret != 0) RTE_LOG(ERR, APP, "Failed to stop port %d: %s\n", port_id, rte_strerror(-ret)); + rte_eth_dev_close(port_id); return 0; } -- 2.33.0