* [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
* Re: [dpdk-dev] [PATCH] tools: fix active interface detection in dpdk-devbind.py
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
1 sibling, 0 replies; 4+ messages in thread
From: De Lara Guarch, Pablo @ 2017-01-10 9:22 UTC (permalink / raw)
To: Yoni Gilad, Jain, Deepak K; +Cc: dev, stable
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yoni Gilad
> Sent: Monday, January 09, 2017 4:38 PM
> To: De Lara Guarch, Pablo; Jain, Deepak K
> Cc: dev@dpdk.org; Yoni Gilad; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] tools: fix active interface detection in dpdk-
> devbind.py
>
> 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
Typo in "follwing". Also, the fixline SHA should be " cb4a1d14bf3e", the first 6 bytes.
Apart from this,
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] tools: fix active interface detection in dpdk-devbind.py
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 ` Yoni Gilad
2017-01-30 16:34 ` Thomas Monjalon
1 sibling, 1 reply; 4+ messages in thread
From: Yoni Gilad @ 2017-01-10 17:14 UTC (permalink / raw)
To: dev; +Cc: pablo.de.lara.guarch, Yoni Gilad, stable
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] tools: fix active interface detection in dpdk-devbind.py
2017-01-10 17:14 ` [dpdk-dev] [PATCH v2] " Yoni Gilad
@ 2017-01-30 16:34 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2017-01-30 16:34 UTC (permalink / raw)
To: Yoni Gilad; +Cc: dev, pablo.de.lara.guarch
2017-01-10 17:14, Yoni Gilad:
> 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>
Applied, thanks
^ 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).