All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoni Gilad <yonig@radcom.com>
To: <dev@dpdk.org>
Cc: <pablo.de.lara.guarch@intel.com>, Yoni Gilad <yonig@radcom.com>,
	<stable@dpdk.org>
Subject: [PATCH v2] tools: fix active interface detection in dpdk-devbind.py
Date: Tue, 10 Jan 2017 17:14:21 +0000	[thread overview]
Message-ID: <1484068461-22978-1-git-send-email-yonig@radcom.com> (raw)
In-Reply-To: <1483979853-16386-1-git-send-email-yonig@radcom.com>

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 <yonig@radcom.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---

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())
-- 
2.5.5

  parent reply	other threads:[~2017-01-10 17:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 16:37 [PATCH] tools: fix active interface detection in dpdk-devbind.py Yoni Gilad
2017-01-10  9:22 ` De Lara Guarch, Pablo
2017-01-10 17:14 ` Yoni Gilad [this message]
2017-01-30 16:34   ` [PATCH v2] " Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1484068461-22978-1-git-send-email-yonig@radcom.com \
    --to=yonig@radcom.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.