Bug 391

Summary: The dpdk-devbind.py tool crashes if some NIC property contains a unicode character - Patch proposal
Product: DPDK Reporter: Pierrick LOUIN (pierrick.louin)
Component: otherAssignee: Pierrick LOUIN (pierrick.louin)
Status: UNCONFIRMED ---    
Severity: normal CC: ajit.khaparde, ferruh.yigit, matan, pierrick.louin
Priority: Normal    
Version: 19.11   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Attachments: Error + Correction patch proposed
Correcting patch

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.