From: Ming Fu <Ming.Fu@esentire.com>
To: "users@dpdk.org" <users@dpdk.org>
Subject: [dpdk-users] dpdk with snort 2.9.9 receive from DPDK ring
Date: Tue, 29 Aug 2017 20:51:43 +0000 [thread overview]
Message-ID: <cb6dbe9d5e714524824132f805e6bdd0@mbx02cmb01p.esentire.local> (raw)
I am making a snort DAQ module to receive packet from DPDK capture through a ring. The snort version is 2.9.9 and DPDK version is 17.08. The code is very similar to the multi_process/client_server_mp example. The DPDK is initialized in daq initialize function and mbuf received from daq acquire function. Snort inspects the mbuf but does not re-inject back to the network, so daq free the mbuf by rte_pktmbuf_free(mbuf) in the same thread as it calls rte_ring_dequeue_burst();
The snort successfully received the first burst of 32 packets, but it fails on the first rte_pktmbuf_free().
Seems some internal dpdk function pointer is NULL.
#0 0x0000000000000000 in ?? ()
#1 0x00000000004f7a8d in rte_mempool_ops_enqueue_bulk (n=<optimized out>, obj_table=<optimized out>, mp=<optimized out>)
at /home/mfu/work/dpdk-17.08/build/include/rte_mempool.h:497
#2 __mempool_generic_put (cache=<optimized out>, n=1, obj_table=0x7fffffffe6e8, mp=<optimized out>) at /home/mfu/work/dpdk-17.08/build/include/rte_mempool.h:1069
#3 rte_mempool_generic_put (flags=<optimized out>, cache=<optimized out>, n=1, obj_table=0x7fffffffe6e8, mp=<optimized out>)
at /home/mfu/work/dpdk-17.08/build/include/rte_mempool.h:1109
#4 rte_mempool_put_bulk (n=1, obj_table=0x7fffffffe6e8, mp=<optimized out>) at /home/mfu/work/dpdk-17.08/build/include/rte_mempool.h:1132
#5 rte_mempool_put (obj=<optimized out>, mp=<optimized out>) at /home/mfu/work/dpdk-17.08/build/include/rte_mempool.h:1150
#6 rte_mbuf_raw_free (m=<optimized out>) at /home/mfu/work/dpdk-17.08/build/include/rte_mbuf.h:853
#7 rte_pktmbuf_free_seg (m=<optimized out>) at /home/mfu/work/dpdk-17.08/build/include/rte_mbuf.h:1349
#8 rte_pktmbuf_free (m=<optimized out>) at /home/mfu/work/dpdk-17.08/build/include/rte_mbuf.h:1369
#9 dpdk_daq_acquire (handle=0x1af6910, cnt=0, callback=<optimized out>, metaback=<optimized out>, user=<optimized out>) at daq_dpdk.c:234
#10 0x00000000004551d3 in DAQ_Acquire ()
#11 0x0000000000437828 in SnortMain ()
#12 0x00007ffff61af830 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#13 0x0000000000406d29 in _start ()
I notice that snort has three threads,
(gdb) info thread
Id Target Id Frame
* 1 Thread 0x7ffff7fdf8c0 (LWP 42472) "snort" 0x0000000000000000 in ?? ()
2 Thread 0x7fffdff5a700 (LWP 42481) "eal-intr-thread" 0x00007ffff62969d3 in epoll_wait () from /lib/x86_64-linux-gnu/libc.so.6
3 Thread 0x7fffdf4d5700 (LWP 42482) "snort" 0x00007ffff625b30d in nanosleep () from /lib/x86_64-linux-gnu/libc.so.6
Would it be a problem if the rte_pktmbuf_free() is not called from the eal thread?
Thanks
Ming
next reply other threads:[~2017-08-29 20:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-29 20:51 Ming Fu [this message]
2017-08-30 5:15 ` Padam Jeet Singh
2017-08-30 9:18 ` Andriy Berestovskyy
2017-08-30 11:55 ` tom.barbette
2017-09-01 14:17 ` Ming Fu
2017-09-02 9:42 ` tom.barbette
2017-08-30 15:19 ` Ming Fu
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=cb6dbe9d5e714524824132f805e6bdd0@mbx02cmb01p.esentire.local \
--to=ming.fu@esentire.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
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).