[dpdk-dev,v2] tools: fix active interface detection in dpdk-devbind.py
Checks
Commit Message
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(+)
Comments
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
@@ -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())