DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] New to DPDK
@ 2021-09-15 12:11 Jeevan Nailwal
  2021-09-15 12:22 ` Van Haaren, Harry
  0 siblings, 1 reply; 3+ messages in thread
From: Jeevan Nailwal @ 2021-09-15 12:11 UTC (permalink / raw)
  To: users

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-16  5:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15 12:11 [dpdk-users] New to DPDK Jeevan Nailwal
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

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).