DPDK usage discussions
 help / color / mirror / Atom feed
From: Jeevan Nailwal <jeevan.ginnie@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] New to DPDK
Date: Wed, 15 Sep 2021 17:41:23 +0530
Message-ID: <CA+NhQKx-_6NDe1U3+o3Wgb1Lk_nKWOKJKGjBfUFyKLOm6Ecpdg@mail.gmail.com> (raw)

Hi Everyone, I am new to DPDK and trying to learn its usage. I am facing a
SEGFAULT while sending a single packet via this.
Please find the snippet of my code below:


------------Started my program with initial pool configuration:
ret = rte_eal_init(argc, argv);
if (ret < 0)
rte_exit(EXIT_FAILURE, "Error with EAL initialization\n");
    argc -= ret;
    argv += ret;

    rte_log_set_global_level(RTE_LOG_NOTICE);

/* parse app arguments */
if (rte_lcore_count() > RTE_MAX_LCORE)
rte_exit(EXIT_FAILURE,"Not enough cores\n");

create_mbuf_pool(128000, 128);

ret = rte_vhost_driver_register(sockpath, 0);
if (ret != 0)
rte_exit(EXIT_FAILURE, "vhost driver register failure.\n");


rte_vhost_driver_callback_register (sockpath, &virtio_net_device_ops);
chmod (sockpath, 0777);
rte_vhost_driver_start(sockpath);



-------- afterwards i created a thread to instantiate m TX.. i.e. receive
packet from DPDK:

ret = pthread_create (&proc_tx, NULL, (void *)tx_process, NULL);
if (ret != 0)
{
rte_exit (EXIT_FAILURE, "Cannot create TX thread\n");
}

-------Finally: in my tx_process, i am fetching the data when its
available, based on data availability:

ret = rte_vhost_dequeue_burst (port, VIRTIO_TXQ, mbuf_pool, &pkt, 1);


I am getting a segfault as soon as dequeue_burst api gets called. please
find the stack trace below:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2aaaad642700 (LWP 288924)]
0x000000000071ce74 in common_ring_mc_dequeue ()
Missing separate debuginfos, use: debuginfo-install
glibc-2.17-260.el7_6.3.x86_64 libgcc-4.8.5-36.el7.x86_64
ncurses-libs-5.9-14.20130511.el7_4.x86_64 numactl-libs-2.0.9-7.el7.x86_64
(gdb) bt
#0 0x000000000071ce74 in common_ring_mc_dequeue ()
#1 0x00000000006d0a37 in virtio_dev_tx_split ()
#2 0x00000000006d2395 in rte_vhost_dequeue_burst ()
#3 0x000000000064c3ac in tx_process ()
#4 0x00002aaaaba41dd5 in start_thread () from /lib64/libpthread.so.0
#5 0x00002aaaabd53ead in clone () from /lib64/libc.so.6

Please help me here.

             reply	other threads:[~2021-09-15 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 12:11 Jeevan Nailwal [this message]
2021-09-15 12:22 ` Van Haaren, Harry
     [not found]   ` <CA+NhQKwOvbHBv_eadQDMjarGv7Qs+1dna8s9_-JyP0eZthwTZQ@mail.gmail.com>
2021-09-16  5:08     ` [dpdk-users] Fwd: " Jeevan Nailwal

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=CA+NhQKx-_6NDe1U3+o3Wgb1Lk_nKWOKJKGjBfUFyKLOm6Ecpdg@mail.gmail.com \
    --to=jeevan.ginnie@gmail.com \
    --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

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git