DPDK usage discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "longtb5@viettel.com.vn" <longtb5@viettel.com.vn>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	"users@dpdk.org" <users@dpdk.org>,
	"skhare@vmware.com" <skhare@vmware.com>
Subject: Re: [dpdk-users] [VMXNET3] vmxnet3_dev_stats_get() segfault when called by pktgen
Date: Fri, 8 Sep 2017 02:22:25 +0000	[thread overview]
Message-ID: <44199C9D-EC75-495D-9FA2-EFB2CBC0BB79@intel.com> (raw)
In-Reply-To: <635485224.78963862.1504836430391.JavaMail.zimbra@viettel.com.vn>


> On Sep 7, 2017, at 7:07 PM, longtb5@viettel.com.vn wrote:
> 
>> ----- Original Message -----
>> From: "keith wiles" <keith.wiles@intel.com>
>> To: "Stephen Hemminger" <stephen@networkplumber.org>
>> Cc: longtb5@viettel.com.vn, users@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


  reply	other threads:[~2017-09-08  2:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <142883318.73479844.1504745082183.JavaMail.zimbra@viettel.com.vn>
2017-09-07  0:51 ` longtb5
2017-09-07  7:42   ` longtb5
2017-09-07  9:15     ` longtb5
2017-09-07 14:58   ` Stephen Hemminger
2017-09-07 16:49     ` Wiles, Keith
2017-09-08  2:07       ` longtb5
2017-09-08  2:22         ` Wiles, Keith [this message]
2017-09-08  3:13           ` longtb5
     [not found]           ` <1873902514.79394236.1504839292666.JavaMail.zimbra@viettel.com.vn>
     [not found]             ` <E36F82B2-E740-46D0-9E8E-39DBDC17DC87@intel.com>
2017-09-08  4:41               ` longtb5
2017-09-08 11:43               ` longtb5
2017-09-09  2:28         ` longtb5

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44199C9D-EC75-495D-9FA2-EFB2CBC0BB79@intel.com \
    --to=keith.wiles@intel.com \
    --cc=longtb5@viettel.com.vn \
    --cc=skhare@vmware.com \
    --cc=stephen@networkplumber.org \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).