[dpdk-users] [VMXNET3] vmxnet3_dev_stats_get() segfault when called by pktgen

Wiles, Keith keith.wiles at intel.com
Fri Sep 8 04:22:25 CEST 2017


> On Sep 7, 2017, at 7:07 PM, longtb5 at viettel.com.vn wrote:
> 
>> ----- Original Message -----
>> From: "keith wiles" <keith.wiles at intel.com>
>> To: "Stephen Hemminger" <stephen at networkplumber.org>
>> Cc: longtb5 at viettel.com.vn, users at dpdk.org
>> Sent: Thursday, September 7, 2017 11:49:39 PM
>> Subject: Re: [dpdk-users] [VMXNET3] vmxnet3_dev_stats_get() segfault when called by pktgen
>> 
>> 
>> I use the option EXTRA_CFLAGS on the command line to improve debug.
>> 
>> make install T=x86_64-native-linuxapp-gcc EXTRA_CFLAGS=“-g -O0”
>> 
>> Using -O0 for gdb is good for non-performance testing.
>> 
>> 
>> Regards,
>> Keith
> 
> Hi,
> 
> Thanks Keith and Stephen for the pointer. I have enabled the debug flags and acquired some more infos.
> 
> (gdb) r
> Thread 1 "pktgen" received signal SIGSEGV, Segmentation fault.
> 0x000000000075aa6c in vmxnet3_hw_tx_stats_get (hw=0x7fffb55b61c0, q=0, res=0x7fffffffdf10) at /home/tester/dpdk/drivers/net/vmxnet3/vmxnet3_ethdev.c:905
> 905		VMXNET3_UPDATE_TX_STAT(hw, q, ucastPktsTxOK, res);
> (gdb) backtrace
> #0  0x000000000075aa6c in vmxnet3_hw_tx_stats_get (hw=0x7fffb55b61c0, q=0, res=0x7fffffffdf10) at /home/tester/dpdk/drivers/net/vmxnet3/vmxnet3_ethdev.c:905
> #1  0x000000000075b3c8 in vmxnet3_dev_stats_get (dev=0xba34c0 <rte_eth_devices>, stats=0x7fffffffe000) at /home/tester/dpdk/drivers/net/vmxnet3/vmxnet3_ethdev.c:1049
> #2  0x00000000004a2f76 in rte_eth_stats_get (port_id=0 '\000', stats=0x7fffffffe000) at /home/tester/dpdk/lib/librte_ether/rte_ethdev.c:1340
> #3  0x0000000000467059 in pktgen_process_stats (tim=<optimized out>, arg=<optimized out>) at /home/tester/pktgen-dpdk/app/pktgen-stats.c:468
> #4  0x000000000048568a in rte_timer_manage () at /home/tester/dpdk/lib/librte_timer/rte_timer.c:593
> #5  0x00000000007b47dd in cli_start ()
> #6  0x000000000044891b in pktgen_cli_start () at /home/tester/pktgen-dpdk/app/cli-functions.c:1434
> #7  0x00000000004423f6 in main (argc=<optimized out>, argv=<optimized out>) at /home/tester/pktgen-dpdk/app/pktgen-main.c:470
> (gdb) l
> 900	{
> 901	#define VMXNET3_UPDATE_TX_STAT(h, i, f, r)		\
> 902			((r)->f = (h)->tqd_start[(i)].stats.f +	\
> 903				(h)->saved_tx_stats[(i)].f)
> 904	
> 905		VMXNET3_UPDATE_TX_STAT(hw, q, ucastPktsTxOK, res);
> 906		VMXNET3_UPDATE_TX_STAT(hw, q, mcastPktsTxOK, res);
> 907		VMXNET3_UPDATE_TX_STAT(hw, q, bcastPktsTxOK, res);
> 908		VMXNET3_UPDATE_TX_STAT(hw, q, ucastBytesTxOK, res);
> 909		VMXNET3_UPDATE_TX_STAT(hw, q, mcastBytesTxOK, res);
> (gdb) p hw->tqd_start
> $1 = (Vmxnet3_TxQueueDesc *) 0x0
> 
> The problem was on line 902.
> This tqd_start is the "start address of all tx queue desc" according to comments in source code. Looks like it was not initialized properly.
> I don't have enough knowledge to fix this. Any advice?

I am not able to fix this problem, but it seems like it could be pktgen command line configuration issue. Normally these types of problems are because the application tried to access a port/queue that is not setup. The tqd_start[] is an internal array to the VMXNET3 driver, so I do not know how it relates to the DPDK  API requests for port/queue.

Sorry, if you provided this before, but what is the command line you are using for Pktgen?

> 
> Regards,
> BL.

Regards,
Keith



More information about the users mailing list