ntop / nDPI

Open Source Deep Packet Inspection Software Toolkit
http://www.ntop.org
GNU Lesser General Public License v3.0
3.79k stars 893 forks source link

Segmentation fault while integrating with DPDK #2350

Open rashidali-net-sys opened 6 months ago

rashidali-net-sys commented 6 months ago

I am using nDPI-4.8 which DPDK(19.11 and 23 latest version l2fwd application) for protocol information extraction and traffic filtering(based on protocol and category).

I am encountering the segmentation fault issue in reader_util.c file at following place. / TODO: just needed here to init ndpi ndpi_malloc wrapper / module = ndpi_init_detection_module(init_prefs);

Also facing makefile error issue at the place. static const struct rte_eth_conf port_conf_default = {

if(RTE_VERSION < RTE_VERSION_NUM(19, 8, 0, 0))

                          .rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN }

else

                          .rxmode = { .max_rx_pkt_len = RTE_ETHER_MAX_LEN }

endif

};

I simply replace rte_eth_conf structure with these version main.c l2fwd rte_eth_conf structure(DPDK 19 and DPDK 23) and error was resolved while building the app. Is this ok do to so(modifying nDPI as per your required DPDK version). If not then need to be addressed. while integrating with DPDK any version.

Protocol information was working fine while facing segmentation fault only in traffic filtering part. Need help in this regard.

IvanNardi commented 3 weeks ago

Could you try latest code and, if you still have the crash, report the stack, please?