[dpdk-dev] free memory pool
Hi, Is there any other way than freeing memory pool? I see rte_pktmbuf_free function call in almost all examples. can we have a ring-like memory pool without need to free it? Thanks in advance for your consideration.
[dpdk-dev] Useful: Simple C++ program & Makefile
Hi, this post might be a little old, but there is point which might be really important for C++ developers using DPDK: C++, especially C++11, doesn't support "designated initializes" of C, instead of that you can use "memset" and set the instance of a struct/class to 0/NULL/nullptr and then you can assign proper values to the members of that struct/class by . or -> (if it is pointer). Remember that even empty-initialization list in C++ (just a simple {} ) doesn't set things to 0/NULL/nullptr/flase (default values), and you may have garbage values which cause problems in your application. Hope this saves you from lots of headache. All the Best, Hamid On 1/11/14, Dan Kan wrote: > I forgot to add that you will also need to add -D__STDC_LIMIT_MACROS > because C99 standard specifies that limits such as INT8_MAX should only be > defined if explicitly requested. Also with g++, you can no longer use > non-trivial designated initializers which are used extensively throughout > dpdk sample apps. For example, > > static const struct rte_eth_rxconf rx_conf = { > .rx_thresh = { > .pthresh = RX_PTHRESH, > .hthresh = RX_HTHRESH, > .wthresh = RX_WTHRESH, > }, > .rx_free_thresh = 32, > }; > > > Basically, use gcc to build the dpdk libraries. Then, use g++ to build your > own code and link against the built libraries. > > Dan > > > On Fri, Jan 10, 2014 at 12:19 PM, Dan Kan wrote: > >> Hamid, >> I'm in the same situation as you in which I would like to write most of >> the application logic in C++. I was able to use CC=g++ by slightly >> modifying the makefiles in mk. I replaced all occurrences of "%.c" with >> "%.cc" using the following command. >> >> find . -name "*.mk" -exec sed -i 's/%\.c\([^[:alpha:]]\)/%\.cc\1/g' {} \; >> >> I also remove some warning flags as errors. >> >> Here are the diffs: >> >> diff -r mk/internal/rte.compile-pre.mk ../temp/dpdk-1.5.1r2/mk/internal/ >> rte.compile-pre.mk >> 39c39 >> < src2obj = $(strip $(patsubst %.cc,%.o,\ >> --- >> > src2obj = $(strip $(patsubst %.c,%.o,\ >> 48c48 >> < src2dep = $(strip $(call dotfile,$(patsubst %.cc,%.o.d, \ >> --- >> > src2dep = $(strip $(call dotfile,$(patsubst %.c,%.o.d, \ >> 53c53 >> < src2cmd = $(strip $(call dotfile,$(patsubst %.cc,%.o.cmd, \ >> --- >> > src2cmd = $(strip $(call dotfile,$(patsubst %.c,%.o.cmd, \ >> 125c125 >> < %.o: %.cc $$(wildcard $$(dep_$$@)) $$(DEP_$$(@)) FORCE >> --- >> > %.o: %.c $$(wildcard $$(dep_$$@)) $$(DEP_$$(@)) FORCE >> diff -r mk/rte.module.mk ../temp/dpdk-1.5.1r2/mk/rte.module.mk >> 36,37c36,37 >> < ifneq ($(MODULE),$(notdir $(SRCS-y:%.cc=%))) >> < $(MODULE)-objs += $(notdir $(SRCS-y:%.cc=%.o)) >> --- >> > ifneq ($(MODULE),$(notdir $(SRCS-y:%.c=%))) >> > $(MODULE)-objs += $(notdir $(SRCS-y:%.c=%.o)) >> diff -r >> mk/toolchain/gcc/rte.vars.mk../temp/dpdk-1.5.1r2/mk/toolchain/gcc/ >> rte.vars.mk >> 71,73c71,73 >> < WERROR_FLAGS := -W -Wall -Werror >> < WERROR_FLAGS += -Wmissing-declarations -Wpointer-arith >> < WERROR_FLAGS += -Wcast-align -Wcast-qual >> --- >> > WERROR_FLAGS := -W -Wall -Werror -Wstrict-prototypes >> > -Wmissing-prototypes >> > WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition >> -Wpointer-arith >> > WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual >> >> >> Dan >> >> >> On Thu, Jan 9, 2014 at 10:30 PM, Hamid Ramazani >> wrote: >> >>> > I don't exactly know what is needed for C++. Please keep us informed. >>> >>> Hey Thomas, >>> >>> I've attached a simple program (main.cpp main.h and Makefile) that has >>> a C++ class and just prints some messages in the output. >>> Despite the fact that it's working fine, I'm sure the Makefile could >>> be written much better; Maybe I made it completer in future. >>> >>> All the Best, >>> --Hamid >>> >>> On 1/3/14, Thomas Monjalon wrote: >>> > Hello, >>> > >>> > 03/01/2014 11:48, Hamid Ramazani : >>> >> eal_timer.c:(.text+0x42c): undefined reference to `clock_gettime' >>> > >>> > From "man clock_gettime": >>> > Link with -lrt (only for glibc versions before 2.17). >>> > >>> >> g++ -m64 -pthread -march=native -DRTE_MACHINE_CPUFLAG_SSE >>> >> -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_M
[dpdk-dev] packet loss: multi-queue (RSS enabled)
Hi, I tried a lot (more than a week) to solve the problem myself and not to bother the list, but I didn't succeed. Maybe other people have the same problem. I have a simple program attached. It is intended for simple packet capturing; captures from interface and writes to memory, and frees the memory in the next loop. I have a 10G 82599EB Intel SFI/SFP+ network interface for capturing packets. As you may know, this network card supports up to 128 RSS queues. This is just a test, so the packets being sent at 820Kpps (kilo packet per second). Each packet is 1500B (fixed size); it is 9.16 Gbit per second. Of course when the packet per seconds goes up and packet size goes down (e.g. 400B per packet), it gets much worse. When using one queue to receive, I receive all the packets, with no loss. When I use more than one queue (e.g. 8 queues), with each thread running on a dedicated core, I have a considerable amount of loss. Please note that: 1. The computer has 12 * 2.67GHz cores, and it does nothing else but capturing packets. The CPU is Intel Xeon X5650. 2. The operating system is Ubuntu 12.04.3 LTS Attached file includes: main.h main.c Makefile ./run.sh It is configured to be run with 8 queues. If you want to change the number of receive queues, please: 1. in main.c, change the value assigned to nb_rx_q_of_dev to the desired value. 2. change core mask in run.sh file (since there is SKIP_MASTER, you should give a core containing one more CPU than given number of queues). I think there might be following problems: 1. the port configuration is not fine. 2. freeing memory has a considerable amount of overhead, and may be I shouldn't do that. But If I don't the pool will be full, won't be? Is there any other way? Please help. Thanks a lot in advance for your help and comments. All the Best, Hamid
[dpdk-dev] rte_eal_init independent from main(int argc, char** argv)
Hi, I'm in need of running an open() function, that is part another program. open() does many things, the very first of them is rte_eal_init(argv, argc) I should not receive argc, and argv from main function of the program, but rather I should produce it myself. What I've done inside open() function is: int argc = 5; char* argv[] = {"./build/l2fwd","-c","ff","-n","4"}; ret = rte_eal_init(argc,argv); But I receive: invalid EAL arguments. I'm thinking about writing another rte_eal_init function for myself. What do you think? Thanks in advance.
[dpdk-dev] rte_eal_init independent from main(int argc, char** argv)
actually I've used: char* argv[] = {"./build/l2fwd","-c","ff","-n","4", NULL}; (NULL at the end of the list). Thanks. On 2/18/14, Hamid Ramazani wrote: > Hi, > I'm in need of running an open() function, that is part another program. > open() does many things, the very first of them is rte_eal_init(argv, argc) > I should not receive argc, and argv from main function of the program, > but rather I should produce it myself. > > What I've done inside open() function is: > int argc = 5; > char* argv[] = {"./build/l2fwd","-c","ff","-n","4"}; > ret = rte_eal_init(argc,argv); > > But I receive: invalid EAL arguments. > > I'm thinking about writing another rte_eal_init function for myself. > What do you think? > > Thanks in advance. >
[dpdk-dev] g++: undefined reference to
Hi, I wanted to write a simple program using class (object oriented). I've attached my helloClass.cpp and also Makefile. after runnig make I get below errors. I think: 1. it is the problem of using c code in c++ 2. I've used extern "C" in helloClass.cpp 3. Should I recompile the DPDK from source with gcc -c argument for compatibility with g++? Thanks in advance. g++ -c helloClass.cpp -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include g++ helloClass.o -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include -lstdc++ helloClass.o: In function `rte_lcore_id': helloClass.cpp:(.text+0x7): undefined reference to `per_lcore__lcore_id' helloClass.o: In function `rte_get_master_lcore': helloClass.cpp:(.text+0x15): undefined reference to `rte_eal_get_configuration' helloClass.o: In function `rte_lcore_is_enabled': helloClass.cpp:(.text+0x2a): undefined reference to `rte_eal_get_configuration' helloClass.o: In function `HelloClass::HelloClass(int, char**)': helloClass.cpp:(.text._ZN10HelloClassC2EiPPc[_ZN10HelloClassC5EiPPc]+0x20): undefined reference to `rte_eal_init' helloClass.cpp:(.text._ZN10HelloClassC2EiPPc[_ZN10HelloClassC5EiPPc]+0x4b): undefined reference to `__rte_panic' helloClass.o: In function `HelloClass::run()': helloClass.cpp:(.text._ZN10HelloClass3runEv[HelloClass::run()]+0x3f): undefined reference to `rte_eal_remote_launch' helloClass.cpp:(.text._ZN10HelloClass3runEv[HelloClass::run()]+0x80): undefined reference to `rte_eal_mp_wait_lcore' collect2: ld returned 1 exit status make: *** [helloClass.o] Error 1 All the Best, Hamid
[dpdk-dev] g++: undefined reference to
Stefan, I did: find `pwd` | egrep "[ao]$" >> liblistWithDuplicates.txt then opened it and added \ to the end of each line and added those libraries to my g++ arguments in Makefile after helloClass.o Now, in output I get two types of errors: multiple definition of undefined reference to ... In order to remove duplicate object file names, I wrote a short python script which is attached, to create liblistNoDuplicates.txt, but still I get the same errors. I'd really appreciate your advice. All the Best, Hamid On 1/2/14, Stefan Baranoff wrote: > Hamid, > > I do not think your attachments made it through but it looks like you are > not linking the DPDK object files in this line: > g++ helloClass.o > -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include > -lstdc++ > > There would need to be many more files beyond helloClass.o listed. Try > adding the relevant DPDK object files (I do not have the path off hand but > I believe they are in the "build" folder) and recompiling. The files you > need to add are those built when your build DPDK itself. > > This is similar to missing -lpcap if compiling against libpcap but in this > case you need to link against object files, not a shared library. > > Good luck! > Stefan > > Sent from my smart phone; people don't make typos, Swype does! > On Jan 2, 2014 4:35 AM, "Hamid Ramazani" wrote: > >> Hi, >> >> I wanted to write a simple program using class (object oriented). I've >> attached my helloClass.cpp and also Makefile. after runnig make I get >> below errors. >> I think: >> 1. it is the problem of using c code in c++ >> 2. I've used extern "C" in helloClass.cpp >> 3. Should I recompile the DPDK from source with gcc -c argument for >> compatibility with g++? >> >> Thanks in advance. >> >> g++ -c helloClass.cpp >> -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include >> g++ helloClass.o >> -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include >> -lstdc++ >> helloClass.o: In function `rte_lcore_id': >> helloClass.cpp:(.text+0x7): undefined reference to `per_lcore__lcore_id' >> helloClass.o: In function `rte_get_master_lcore': >> helloClass.cpp:(.text+0x15): undefined reference to >> `rte_eal_get_configuration' >> helloClass.o: In function `rte_lcore_is_enabled': >> helloClass.cpp:(.text+0x2a): undefined reference to >> `rte_eal_get_configuration' >> helloClass.o: In function `HelloClass::HelloClass(int, char**)': >> helloClass.cpp:(.text._ZN10HelloClassC2EiPPc[_ZN10HelloClassC5EiPPc]+0x20): >> undefined reference to `rte_eal_init' >> helloClass.cpp:(.text._ZN10HelloClassC2EiPPc[_ZN10HelloClassC5EiPPc]+0x4b): >> undefined reference to `__rte_panic' >> helloClass.o: In function `HelloClass::run()': >> helloClass.cpp:(.text._ZN10HelloClass3runEv[HelloClass::run()]+0x3f): >> undefined reference to `rte_eal_remote_launch' >> helloClass.cpp:(.text._ZN10HelloClass3runEv[HelloClass::run()]+0x80): >> undefined reference to `rte_eal_mp_wait_lcore' >> collect2: ld returned 1 exit status >> make: *** [helloClass.o] Error 1 >> >> >> All the Best, >> Hamid >> > -- next part -- /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_cmdline.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_pmd_ixgbe.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_hash.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/libethdev.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_eal.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_meter.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_mempool.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_pmd_e1000.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_kni.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_malloc.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_lpm.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_mbuf.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_timer.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_ring.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_pmd_virtio.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_power.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_sched.a /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib/librte_pmd_ring.a /home/hamid/dpdk
[dpdk-dev] Object Oriented DPDK: c++ class
Hi, Anyone has written an object oriented DPDK application? I've written a simple helloClass program, and I've created the object file by following Makefile: helloClass.o : helloClass.cpp g++ -c helloClass.cpp -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include but I've problem in linking stage. I've tried many ways but I get the errors: undefined reference to... and multiple definition of... I'd really appreciate if you give me an example, considering following points: 1. do you compile DPDK with the default given instructions in Getting Started Guide or do you change Makefiles, like adding -c for compatibility of both c and c++ object files. 2. your cpp and h file(s) 3. Makefile 4. env. variables and/or necessary path Also, I previously sent an email with following subject: g++: undefined reference to but I think current subject is more proper. Thanks a lot in advance. All the Best, Hamid
[dpdk-dev] g++: undefined reference to
uxapp-gcc/include > -include > /home/sbaranoff/DPDKPlayground/dpdk-1.3.1r2//x86_64-default-linuxapp-gcc/include/rte_config.h > -O3 -W -Wall -Werror -Wmissing-declarations -Wpointer-arith -Wcast-align > -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings > -Wl,-melf_x86_64 -Wl,-export-dynamic sample.cpp -o sample > -Wl,-L/data/home/sbaranoff/DPDKPlayground/dpdk-1.3.1r2/examples/helloworld/build/lib > -Wl,-L/home/sbaranoff/DPDKPlayground/dpdk-1.3.1r2//x86_64-default-linuxapp-gcc/lib > -Wl,-L/home/sbaranoff/DPDKPlayground/dpdk-1.3.1r2//x86_64-default-linuxapp-gcc/lib > -Wl,-lrte_kni -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ixgbe -Wl,-lrte_mbuf > -Wl,-lrte_cmdline -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_lpm > -Wl,--start-group -Wl,-lethdev -Wl,-lrte_malloc -Wl,-lrte_mempool > -Wl,-lrte_ring -Wl,-lrte_eal -Wl,-ldl -Wl,--end-group > > > This is probably complete overkill and should be tailored to your use case > but it is heading in the right direction! > > Here's the C++ file I compiled with it (yes, I should use RAII and that > stack and not 'new' -- I know, Java habits die hard): > #include > #include > #include > #include > #include > > class Runner > { > public: > Runner(){}; > void run(int argc, char** argv) > { > std::cout << std::string("Calling rte_eal_init") << std::endl; > rte_eal_init(argc, argv); > std::cout << std::string("Called rte_eal_init - done now!") << > std::endl; > }; > }; > > int main(int argc, char** argv) > { > Runner* runner = new Runner(); > runner->run(argc, argv); > delete runner; > exit(0); > } > > > Thanks, > Stefan > > > On Thu, Jan 2, 2014 at 4:52 PM, Stefan Baranoff > wrote: > >> Hamid, >> >> I have a c++ app that compiles but not with me right now. When I get home >> I'll send you a sample makefile. >> >> Stefan >> >> Sent from my smart phone; people don't make typos, Swype does! >> On Jan 2, 2014 11:40 AM, "Hamid Ramazani" wrote: >> >>> Stefan, >>> >>> I did: >>> >>> find `pwd` | egrep "[ao]$" >> liblistWithDuplicates.txt >>> then opened it and added \ to the end of each line and added those >>> libraries to my g++ arguments in Makefile after helloClass.o >>> >>> Now, in output I get two types of errors: >>> multiple definition of >>> undefined reference to ... >>> >>> In order to remove duplicate object file names, I wrote a short python >>> script which is attached, >>> to create liblistNoDuplicates.txt, >>> but still I get the same errors. >>> >>> >>> I'd really appreciate your advice. >>> >>> All the Best, >>> Hamid >>> >>> >>> On 1/2/14, Stefan Baranoff wrote: >>> > Hamid, >>> > >>> > I do not think your attachments made it through but it looks like you >>> are >>> > not linking the DPDK object files in this line: >>> > g++ helloClass.o >>> > -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include >>> > -lstdc++ >>> > >>> > There would need to be many more files beyond helloClass.o listed. Try >>> > adding the relevant DPDK object files (I do not have the path off hand >>> but >>> > I believe they are in the "build" folder) and recompiling. The files >>> > you >>> > need to add are those built when your build DPDK itself. >>> > >>> > This is similar to missing -lpcap if compiling against libpcap but in >>> this >>> > case you need to link against object files, not a shared library. >>> > >>> > Good luck! >>> > Stefan >>> > >>> > Sent from my smart phone; people don't make typos, Swype does! >>> > On Jan 2, 2014 4:35 AM, "Hamid Ramazani" wrote: >>> > >>> >> Hi, >>> >> >>> >> I wanted to write a simple program using class (object oriented). >>> >> I've >>> >> attached my helloClass.cpp and also Makefile. after runnig make I get >>> >> below errors. >>> >> I think: >>> >> 1. it is the problem of using c code in c++ >>> >> 2. I've used extern "C" in helloClass.cpp >>> >> 3. Should I recompile the DPDK from source with gcc -c argument for >>> >> compati
[dpdk-dev] Useful: Simple C++ program & Makefile
> I don't exactly know what is needed for C++. Please keep us informed. Hey Thomas, I've attached a simple program (main.cpp main.h and Makefile) that has a C++ class and just prints some messages in the output. Despite the fact that it's working fine, I'm sure the Makefile could be written much better; Maybe I made it completer in future. All the Best, --Hamid On 1/3/14, Thomas Monjalon wrote: > Hello, > > 03/01/2014 11:48, Hamid Ramazani : >> eal_timer.c:(.text+0x42c): undefined reference to `clock_gettime' > > From "man clock_gettime": > Link with -lrt (only for glibc versions before 2.17). > >> g++ -m64 -pthread -march=native -DRTE_MACHINE_CPUFLAG_SSE >> -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSSE3 >> -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SS >> SE3 -I/home/hamid/dpdk/dpdk-1.5.1r1/examples/sample/build/include >> -I/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include >> -include >> /home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/include/rte_conf >> ig.h -O3 -W -Wall -Werror -Wmissing-declarations -Wpointer-arith >> -Wcast-align -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef >> -Wwrite-strings -Wl,-melf_x86_64 -Wl,-export-dynamic sample.cpp -o >> sample -Wl,-L/home/hamid/dpdk/dpdk-1.5.1r1/examples/sample/build/lib >> -Wl,-L/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib >> -Wl,-L/home/hamid/dpdk/dpdk-1.5.1r1/x86_64-default-linuxapp-gcc/lib >> -Wl,-lrte_kni -Wl,-lrte_pmd_e1000 -Wl,-lrte_pmd_ixgbe -Wl,-lrte_mbuf >> -Wl,-lrte_cmdline -Wl,-lrte_timer -Wl,-lrte_hash -Wl,-lrte_lpm >> -Wl,--start-group -Wl,-lethdev -Wl,-lrte_malloc -Wl,-lrte_mempool >> -Wl,-lrte_ring -Wl,-lrte_eal -Wl,-ldl -Wl,--end-group > > Try CONFIG_RTE_BUILD_COMBINE_LIBS=y and -lintel_dpdk instead of all these > libraries. You can also remove the warning options if you want. > > You can also try to build your Makefile by including files like > mk/rte.extapp.mk and defining CC=g++. > I don't exactly know what is needed for C++. Please keep us informed. > > -- > Thomas >
[dpdk-dev] Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library
Hi, Considering the fact that there are many developers using c++, I totally persuade/agree with the addition of c++ functionality, and thanks to Thomas's guidelines it won't create any overhead in usage. All the Best, --Hamid On 1/14/14, Thomas Monjalon wrote: > Hello Venky, > > 14/01/2014 14:22, Venkatesan, Venky: >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas Monjalon >> > 14/01/2014 08:02, Daniel Kan: >> > > I already have existing makefiles for my current application. I would >> > > like to integrate dpdk into the application. ?m wondering if there >> > > is >> > > any benefit to use dpdk?s makefiles instead of using your own >> > > makefile >> > > and linking against the library (e.g. libintel_dpdk.a). Thanks. >> > >> > DPDK makefiles have 2 benefits: >> > - provide a framework >> > - automatically set CFLAGS and LDFLAGS according to your configuration >> > >> > If you don't need a framework, I think it's better to extract >> > compilation >> > flags with something like pkg-config. >> > http://freedesktop.org/wiki/Software/pkg-config >> > A patch for a such feature would be welcome :) >> >> One other thing to think about - as we add more functionality into DPDK >> (e.g. new libraries for other packet functions), we integrate them into >> the DPDK framework. If you extract compilation flags and setup your own >> makefile, you would have to do this re-integration every time you want to >> pick up a new release. The same applies to newer files added etc. etc. >> That is the downside. > > I disagree. > If the Makefile of the application, use a DPDK script or pkg-config to read > > the flags from a generated file, the integration is done only once. > This guide explains the logic and how to implement it: > http://people.freedesktop.org/~dbn/pkg-config-guide.html > > -- > Thomas >
[dpdk-dev] FindDPDK.cmake
Hi, Anybody has written FindDPDK.cmake? Like those under "/usr/share/cmakeXXX/Modules". All the Best, --Hamid