Bug 391 - The dpdk-devbind.py tool crashes if some NIC property contains a unicode character - Patch proposal
Summary: The dpdk-devbind.py tool crashes if some NIC property contains a unicode char...
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: other (show other bugs)
Version: 19.11
Hardware: All Linux
: Normal normal
Target Milestone: ---
Assignee: Pierrick LOUIN
URL:
Depends on:
Blocks:
 
Reported: 2020-02-05 19:51 CET by Pierrick LOUIN
Modified: 2020-02-05 22:15 CET (History)
4 users (show)



Attachments
Error + Correction patch proposed (886 bytes, text/plain)
2020-02-05 19:51 CET, Pierrick LOUIN
Details
Correcting patch (498 bytes, patch)
2020-02-05 22:15 CET, Pierrick LOUIN
Details | Diff

Description Pierrick LOUIN 2020-02-05 19:51:31 CET
Created attachment 82 [details]
Error + Correction patch proposed

Calling the dpdk-devbind.py tool may crash with the following message:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 17: ordinal not in range(128)

Actually this happens when one of the network cards shows a non ascii code in one of its properties.
The failure occurs whether or not the NIC in cause is concerned by the current action.
Example of a mellanox card with attribute 'Subsystem: Mellanox Technologies ConnectX®-5'.
Comment 1 Ajit Khaparde 2020-02-05 20:19:28 CET
Pierrick,
Can you submit the patch to the mailing list?

Thanks
Ajit
Comment 2 Pierrick LOUIN 2020-02-05 22:15:57 CET
Created attachment 83 [details]
Correcting patch

With this patch, network cards attributes may now contain non ascii characters.
I didn't encounter any bad side effect ignoring such "errors" so far.

Note You need to log in before you can comment on or make changes to this bug.