From patchwork Tue Jan 10 17:14:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoni Gilad X-Patchwork-Id: 19090 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id DC0725424; Tue, 10 Jan 2017 18:14:22 +0100 (CET) Received: from Exchange2010.radcom.co.il (mail.radcom.com [80.74.109.3]) by dpdk.org (Postfix) with ESMTP id 35F3C5398; Tue, 10 Jan 2017 18:14:21 +0100 (CET) Received: from swprobe2.localdomain (172.16.5.176) by Exchange2010.radcom.co.il (172.16.1.125) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 10 Jan 2017 19:14:20 +0200 From: Yoni Gilad To: CC: , Yoni Gilad , Date: Tue, 10 Jan 2017 17:14:21 +0000 Message-ID: <1484068461-22978-1-git-send-email-yonig@radcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1483979853-16386-1-git-send-email-yonig@radcom.com> References: <1483979853-16386-1-git-send-email-yonig@radcom.com> MIME-Version: 1.0 X-Originating-IP: [172.16.5.176] Subject: [dpdk-dev] [PATCH v2] tools: fix active interface detection in dpdk-devbind.py X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" When adding crypto devices, the "Active" and "Ssh_if" attributes of existing network devices were reset. This causes the following issues: - Network interfaces aren't marked as "*Active*" in the --status output. - Active network interfaces can be unbound without the --force option, causing loss of network connection. The reset was caused by the call to devices[d].update in get_crypto_details. This patch prevents the update on non-crypto devices. Fixes: cb4a1d14bf3e ("tools: bind crypto devices") CC: stable@dpdk.org Signed-off-by: Yoni Gilad Acked-by: Pablo de Lara --- v2: - Fixed commit message usertools/dpdk-devbind.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index e057b87..1b9c651 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -328,6 +328,9 @@ def get_crypto_details(): # based on the basic info, get extended text details for d in devices.keys(): + if devices[d]["Class"][0:2] != CRYPTO_BASE_CLASS: + continue + # get additional info and add it to existing data devices[d] = devices[d].copy() devices[d].update(get_pci_device_details(d).items())