Code Monkey home page Code Monkey logo

Comments (8)

tbarbette avatar tbarbette commented on August 24, 2024

Mhh I wonder if it's not interfering with click's packet pool. Try adding the test code at the end of

int DPDKDevice::alloc_pktmbufs(ErrorHandler* errh)

Click's DPDK code is a bit deprecated and less feature rich. If using DPDK, stay in FastClick :)

from fastclick.

ali64mohammad6464 avatar ali64mohammad6464 commented on August 24, 2024

i add code to end of that function, still segmentation fault.

#0  0x0000555555a72c5b in bucket_get_count ()
#1  0x0000555555c15e21 in rte_mempool_avail_count ()
#2  0x0000555555c16409 in rte_mempool_in_use_count ()
#3  0x000055555576c3cd in DPDKDevice::alloc_pktmbufs(ErrorHandler*) ()
#4  0x000055555576c44b in DPDKDevice::static_initialize(ErrorHandler*) ()
#5  0x000055555576c4b4 in DPDKDevice::initialize(ErrorHandler*) [clone .cold.91] ()
#6  0x0000555555756ba5 in FromDPDKRing::initialize(ErrorHandler*) ()
#7  0x00005555559f8238 in Router::initialize(ErrorHandler*) ()
#8  0x000055555599c603 in parse_configuration(String const&, bool, bool, click_args_t&, ErrorHandler*) ()
#9  0x00005555557faf47 in main ()

from fastclick.

tbarbette avatar tbarbette commented on August 24, 2024

Maybe this is due to different DPDK linking. Is your "test" secondary also statically linked? No other globally installed DPDK left? or dangling old $RTE_SDK?

from fastclick.

ali64mohammad6464 avatar ali64mohammad6464 commented on August 24, 2024

no it is dynamically linked. can i link click/fastclick dynamiclly?

from fastclick.

tbarbette avatar tbarbette commented on August 24, 2024

Configure FastClick with --enable-dynamic-linking

from fastclick.

ali64mohammad6464 avatar ali64mohammad6464 commented on August 24, 2024

yes now it works. thanks a lot.

from fastclick.

ali64mohammad6464 avatar ali64mohammad6464 commented on August 24, 2024

Hi
this problem fixed in fastclick, but i need to fix it in click too.
i updated dpdk.mk in click file as below:

ifeq ($(shell [ -n "$(RTE_VER_YEAR)" ] && ( [ "$(RTE_VER_YEAR)" -ge 20 ] && [ "$(RTE_VER_MONTH)" -ge 11 ] ) && echo true),true)
$(info $$RTE_SDK_BIN is [${RTE_SDK_BIN}])
$(info $$PKG_CONFIG_PATH is [${PKG_CONFIG_PATH}])
$(info $$RTE_VER_YEAR is [${RTE_VER_YEAR}])
$(info $$RTE_VER_MONTH is [${RTE_VER_MONTH}])
PKG_CONFIG_PATH = $(RTE_SDK_BIN)/meson-uninstalled
$(info $$PKG_CONFIG_PATH is [${PKG_CONFIG_PATH}])

PKGCONF ?= pkg-config
CXXFLAGS += -O3 $(shell export PKG_CONFIG_PATH='$(PKG_CONFIG_PATH)'; $(PKGCONF) --cflags libdpdk) 
LDFLAGS += $(shell export PKG_CONFIG_PATH='$(PKG_CONFIG_PATH)'; $(PKGCONF) --libs --static libdpdk)

else

ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")
endif
...

by adding this codes to dpdk.mk click linked to dpdk statically and there is no problem.
but now i want to link dynamically, so i remove --static from LDFLAGS but rte libraries not linked. (i saw undefined reference, and checked with ldd, rte libs are not linked)
i figure out problem is that output of $(shell export PKG_CONFIG_PATH='$(PKG_CONFIG_PATH)'; $(PKGCONF) --libs libdpdk command has --wl,--as-needed, these flags prevent to link dynamically, if I copy the output of the command and remove --wl,--as-needed, linking is successfully.
Can you tell me a way to fix it in click too?
thanks.

from fastclick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.