diff options
author | Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> | 2014-12-01 15:24:27 +0530 |
---|---|---|
committer | Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> | 2015-01-19 19:13:46 +0530 |
commit | 031c955d60683380eb1523551e273f551f84ce4b (patch) | |
tree | 8386d9264dc20350537696cf12512d6e6075748f | |
parent | cffdde07497931448ce8a4e03a19ad3116c81bd3 (diff) |
Add support for DPDK 1.7.1odp-0.2
- Added math library while linking
- Added -rpath to locate the shared objects
- Code modification done to support DPDK 1.7.1
- Updated README
Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
Reviewed-by: Zoltan Kiss <zoltan.kiss@linaro.org>
-rw-r--r-- | platform/linux-dpdk/Makefile.am | 2 | ||||
-rw-r--r-- | platform/linux-dpdk/Makefile.inc | 1 | ||||
-rw-r--r-- | platform/linux-dpdk/README | 19 | ||||
-rw-r--r-- | platform/linux-dpdk/odp_buffer_pool.c | 2 | ||||
-rw-r--r-- | platform/linux-dpdk/odp_init.c | 5 | ||||
-rw-r--r-- | platform/linux-dpdk/odp_packet.c | 2 |
6 files changed, 14 insertions, 17 deletions
diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am index 686df6a98..db11e0a56 100644 --- a/platform/linux-dpdk/Makefile.am +++ b/platform/linux-dpdk/Makefile.am @@ -18,7 +18,7 @@ AM_CFLAGS += -I$(top_srcdir)/platform/linux-generic/include AM_CFLAGS += -I$(top_srcdir)/platform/linux-generic/include/api AM_CFLAGS += -I$(top_srcdir)/helper/include -DPDK_LIBS="-lintel_dpdk -ldl" +DPDK_LIBS="-lintel_dpdk -ldl -lm" LIBS += $(DPDK_LIBS) include_HEADERS = \ diff --git a/platform/linux-dpdk/Makefile.inc b/platform/linux-dpdk/Makefile.inc index e69de29bb..f681940a4 100644 --- a/platform/linux-dpdk/Makefile.inc +++ b/platform/linux-dpdk/Makefile.inc @@ -0,0 +1 @@ +AM_LDFLAGS += -R$(SDK_INSTALL_PATH)/lib diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README index 0f2210b42..85ff112af 100644 --- a/platform/linux-dpdk/README +++ b/platform/linux-dpdk/README @@ -7,15 +7,15 @@ ODP-DPDK: --------- This effort is to port ODP on top of DPDK and use DPDK as the accelerator for all intel NIC's. Pre-requisite is DPDK should be cloned and -compiled. DPDK and ODP was compiled and tested on Ubuntu 14.04 +compiled. DPDK and ODP was compiled and tested on Ubuntu 14.04 LTS 3.13.0-29-generic kernel. # To Clone DPDK $ git clone http://92.243.14.124/git/dpdk ./<dpdk-dir> -# we support only 1.6.0r2 of DPDK for now +# we support only 1.7.1 of DPDK for now $ git tag -l -- will list all the tags available -$ git checkout -b 1.6.0 tags/v1.6.0r2 +$ git checkout -b 1.7.1 tags/v1.7.1 # Please refer to http://dpdk.org/doc for more details on how to build # DPDK. Getting started guide for Linux might be of help. # Best effort is done to provide some help on DPDK cmds below for Ubuntu, @@ -27,7 +27,7 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2 $ export RTE_SDK=<dpdk-dir> # For example $ export RTE_SDK=/root/dpdk -$ export RTE_TARGET=x86_64-default-linuxapp-gcc +$ export RTE_TARGET=x86_64-native-linuxapp-gcc # RTE_TARGET is the configuration used while building DPDK $ cd <odp-dir> @@ -48,11 +48,12 @@ How to setup and compile DPDK: $ cd <dpdk-dir> # This has to be done only once. -$ make config T=x86_64-default-linuxapp-gcc O=x86_64-default-linuxapp-gcc -# set CONFIG_RTE_BUILD_COMBINE_LIBS=y in .config file -# Note: if non-intel SFP's are used in IXGBE, then set CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y in .config file -$ make install T=x86_64-default-linuxapp-gcc EXTRA_CFLAGS="-fPIC" - +$ make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc +# set CONFIG_RTE_BUILD_COMBINE_LIBS=y and CONFIG_RTE_BUILD_SHARED_LIB=y in +# ./x86_64-native-linuxapp-gcc/.config file +# Note: if non-intel SFP's are used in IXGBE, then set +# CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y in .config file +$ make install T=x86_64-native-linuxapp-gcc EXTRA_CFLAGS="-fPIC" # If "conflicting types for skb_set_hash" error happens during DPDK # build, then please knock-off skb_set_hash function from kcompat.h as diff --git a/platform/linux-dpdk/odp_buffer_pool.c b/platform/linux-dpdk/odp_buffer_pool.c index 8325b9e7d..ca25acea2 100644 --- a/platform/linux-dpdk/odp_buffer_pool.c +++ b/platform/linux-dpdk/odp_buffer_pool.c @@ -282,5 +282,5 @@ void odp_buffer_free(odp_buffer_t buf) void odp_buffer_pool_print(odp_buffer_pool_t pool_id) { - rte_mempool_dump((const struct rte_mempool *)pool_id); + rte_mempool_dump(stdout, (const struct rte_mempool *)pool_id); } diff --git a/platform/linux-dpdk/odp_init.c b/platform/linux-dpdk/odp_init.c index 404e61689..fa1002226 100644 --- a/platform/linux-dpdk/odp_init.c +++ b/platform/linux-dpdk/odp_init.c @@ -37,11 +37,6 @@ int odp_init_dpdk(void) return -1; } - if (rte_pmd_init_all() < 0) { - ODP_ERR("Cannot init pmd\n"); - return -1; - } - if (rte_eal_pci_probe() < 0) { ODP_ERR("Cannot probe PCI\n"); return -1; diff --git a/platform/linux-dpdk/odp_packet.c b/platform/linux-dpdk/odp_packet.c index 7b6b082be..beb69b206 100644 --- a/platform/linux-dpdk/odp_packet.c +++ b/platform/linux-dpdk/odp_packet.c @@ -367,7 +367,7 @@ void odp_packet_print(odp_packet_t pkt) str[len] = '\0'; printf("\n%s\n", str); - rte_pktmbuf_dump(&hdr->buf_hdr.mb, 32); + rte_pktmbuf_dump(stdout, &hdr->buf_hdr.mb, 32); p = odp_packet_start(pkt); printf("00000000: %02X %02X %02X %02X %02X %02X %02X %02X\n", |