среда, 29 апреля 2015 г.

How to code for DPDK with C++


If you want to code for DPDK with C++ you need some beer and half of day for digging into DPDK maillist.

Or you could use my manual and do it in seconds!

Lets' go! First of all, please download and build DPDK 2.0.0 into folder /usr/src/dpdk2.0.0

After this, please download files and and replace files /usr/src/dpdk-2.0.0/mk/toolchain/gcc/ and /usr/src/dpdk-2.0.0/mk/internal/ accordingly.

After this you should fix you project Makefile and rename main.c to main.cpp.

I could provide example file for you%
ifeq ($(RTE_SDK),)
$(error "Please define RTE_SDK environment variable")


# Default target, can be overriden by command line or environment
RTE_TARGET ?= x86_64-native-linuxapp-gcc

include $(RTE_SDK)/mk/

# binary name
APP = example

# all source are stored in SRCS-y
SRCS-y := main.cpp

CXXFLAGS += -std=gnu++11
CFLAGS += -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable
LDFLAGS += -lstdc++

include $(RTE_SDK)/mk/
My huge thanks to author of this patches :)

Комментариев нет :

Отправка комментария

Примечание. Отправлять комментарии могут только участники этого блога.