DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] tools: fix active interface detection in dpdk-devbind.py
@ 2017-01-09 16:37 Yoni Gilad
  2017-01-10  9:22 ` De Lara Guarch, Pablo
  2017-01-10 17:14 ` [dpdk-dev] [PATCH v2] " Yoni Gilad
  0 siblings, 2 replies; 4+ messages in thread
From: Yoni Gilad @ 2017-01-09 16:37 UTC (permalink / raw)
  To: pablo.de.lara.guarch, deepak.k.jain; +Cc: dev, Yoni Gilad, stable

When adding crypto devices, the "Active" and "Ssh_if" attributes of
existing network devices were reset. This causes the follwing 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: cb4a1d1 ("tools: bind crypto devices")

CC: stable@dpdk.org

Signed-off-by: Yoni Gilad <yonig@radcom.com>
---
 usertools/dpdk-devbind.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-30 16:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09 16:37 [dpdk-dev] [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 ` [dpdk-dev] [PATCH v2] " Yoni Gilad
2017-01-30 16:34   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).