Bug 610 - Example App like skeleton, l2fwd etc. in DPDK 20.11 need static compilation else will fail during runtime
Summary: Example App like skeleton, l2fwd etc. in DPDK 20.11 need static compilation e...
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: examples (show other bugs)
Version: 20.11
Hardware: x86 Linux
: Normal normal
Target Milestone: ---
Assignee: dev
URL:
Depends on:
Blocks:
 
Reported: 2021-01-09 05:33 CET by yockgen
Modified: 2021-03-09 05:02 CET (History)
4 users (show)



Attachments
Troubleshooting steps (8.23 KB, text/plain)
2021-01-12 00:42 CET, yockgen
Details

Description yockgen 2021-01-09 05:33:09 CET
Example App like skeleton, l2fwd etc. in DPDK 20.11 (not happened in 20.08) need static compilation else will fail during runtime with confusing message like below might led to wrong direction troubleshooting:

===============================================================================
oot@yockgen-VirtualBox://home/yockgen/dpdk/examples/l2fwd# ./build/l2fwd -- -p 0x3
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: No legacy callbacks, legacy socket not created
MAC updating enabled
EAL: Error - exiting with code: 1
  Cause: No Ethernet ports - bye

================================================================================
Two options to remedy the problem:
1. make static
2. Added runtime parameter -d (e.g. -d librte_net_e1000.so) 

Expected precise error handling message display, as the sample apps mostly the first entry point for inexperience new users, precise message will really help reduce the already high learning curve for DPDK.

Thanks!
Comment 1 Bruce Richardson 2021-01-11 10:20:32 CET
Can you provide additional details on how you are compiling and running these example apps?
Comment 2 Thomas Monjalon 2021-01-11 10:28:57 CET
(In reply to yockgen from comment #0)
> Two options to remedy the problem:
> 1. make static
> 2. Added runtime parameter -d (e.g. -d librte_net_e1000.so) 
> 
> Expected precise error handling message display, as the sample apps mostly
> the first entry point for inexperience new users, precise message will
> really help reduce the already high learning curve for DPDK.

I agree the error message is not really helpful.
We should propose the -d option if no device is found.
Comment 3 Bruce Richardson 2021-01-11 10:31:42 CET
> I agree the error message is not really helpful.
> We should propose the -d option if no device is found.

Error message based on driver list rather than device lists? It could really be that there are no devices, but no drivers is almost certainly an issue.
Comment 4 Thomas Monjalon 2021-01-11 10:39:43 CET
(In reply to Bruce Richardson from comment #3)
> > I agree the error message is not really helpful.
> > We should propose the -d option if no device is found.
> 
> Error message based on driver list rather than device lists? It could really
> be that there are no devices, but no drivers is almost certainly an issue.

Yes we can detect that there is no driver.
We can also suggest to add a -d option if no device is found,
in case the right driver is not loaded.
Comment 5 yockgen 2021-01-12 00:42:02 CET
Created attachment 141 [details]
Troubleshooting steps
Comment 6 yockgen 2021-01-12 00:50:58 CET
Appreciated if the simplest example running command like this will be also 
somewhere in the error message or DPDK documentation:

"./examples/skeleton/build/basicfwd -d librte_net_e1000.so -d librte_mempool_ring.so" 

This will be very helpful for new comer to do the further troubleshooting via Internet, even not all of them are using e1000, but it will hinted them to a correct  direction, high level error description not really help much for further self troubleshooting. And, will not help in nurturing new users. 

Thanks!
Comment 7 Ajit Khaparde 2021-03-09 05:02:36 CET
Thomas, Is this in your todo list? Or do you know if anyone else looking at it?

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