Juniper / contrail-vrouter

Contrail Virtual Router
BSD 2-Clause "Simplified" License
217 stars 169 forks source link

Build instruction for vRouter with DPDK support #93

Closed nirhenn closed 8 years ago

nirhenn commented 8 years ago

Hi there,

Is there a detailed build instruction for vRouter with DPDK support?

Appriciate the help.

Nir.

srajag commented 8 years ago

Hi Nir, The following steps should work.

Raja

repo init -u git@github.commailto:git@github.com:Juniper/contrail-vnc repo sync cd third_party git clone git@github.commailto:git@github.com:Juniper/contrail-dpdk.git dpdk cd .. python third_party/fetch_packages.py scons

From: Nir Henn notifications@github.com Reply-To: Juniper/contrail-vrouter reply@reply.github.com Date: Thursday, September 15, 2016 at 8:19 AM To: Juniper/contrail-vrouter contrail-vrouter@noreply.github.com Subject: [Juniper/contrail-vrouter] Build instruction for vRouter with DPDK support (#93)

Hi there,

Is there a detailed build instruction for vRouter with DPDK support?

Appriciate the help.

Nir.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Juniper/contrail-vrouter/issues/93, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFni1_eHM-j00lyFKfi7vLmFR9ttoEJIks5qqWHrgaJpZM4J9_ol.

nirhenn commented 8 years ago

Thanks for the proceedure. From some reason that I can not explain (yet) i am getting the following errors.

gcc -o build/debug/vrouter/dpdk/vr_dpdk_ethdev.o -c -g -O0 -DDEBUG -Werror -Wall -msse4.2 -DCOMPILE_DEBUG_LOGS -Ivrouter/include -Ibuild/debug/vrouter/sandesh/gen-c -Ivrouter/sandesh/gen-c -Itools -Itools/sandesh/library/c -Ibuild/debug/vrouter/dpdk/x86_64-native-linuxapp-gcc/include -Ivrouter/dpdk/x86_64-native-linuxapp-gcc/include vrouter/dpdk/vr_dpdk_ethdev.c vrouter/dpdk/vr_dpdk_ethdev.c: In function ‘dpdk_ethdev_bond_info_update’: vrouter/dpdk/vr_dpdk_ethdev.c:620:17: error: implicit declaration of function ‘rte_eth_dev_set_mc_addr_list’ [-Werror=implicit-function-declaration] && rte_eth_dev_set_mc_addr_list(slave_port_id, &lacp_mac, 1) == 0) { ^ vrouter/dpdk/vr_dpdk_ethdev.c: In function ‘vr_dpdk_ethdev_rx_emulate’: vrouter/dpdk/vr_dpdk_ethdev.c:1005:9: error: implicit declaration of function ‘rte_pktmbuf_mtod_offset’ [-Werror=implicit-function-declaration] rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[i], uint8t , RTE_CACHE_LINE_SIZE)); ^ vrouter/dpdk/vr_dpdk_ethdev.c:1005:56: error: expected expression before ‘uint8_t’ rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[i], uint8_t , RTE_CACHE_LINE_SIZE)); ^ cc1: all warnings being treated as errors scons: _* [build/debug/vrouter/dpdk/vr_dpdk_ethdev.o] Error 1 scons: building terminated because of errors.

Any clues?

Nir

srajag commented 8 years ago

In third_party/dpdk, can you run “git checkout cd33f3a42ec97f1e6d4a0f3fe45043d01f462abd” and run scons again.

Raja

From: Nir Henn notifications@github.com Reply-To: Juniper/contrail-vrouter reply@reply.github.com Date: Thursday, September 15, 2016 at 11:25 AM To: Juniper/contrail-vrouter contrail-vrouter@noreply.github.com Cc: Raja Sivaramakrishnan raja@juniper.net, Comment comment@noreply.github.com Subject: Re: [Juniper/contrail-vrouter] Build instruction for vRouter with DPDK support (#93)

Thanks for the proceedure. From some reason that I can not explain (yet) i am getting the following errors.

gcc -o build/debug/vrouter/dpdk/vr_dpdk_ethdev.o -c -g -O0 -DDEBUG -Werror -Wall -msse4.2 -DCOMPILE_DEBUG_LOGS -Ivrouter/include -Ibuild/debug/vrouter/sandesh/gen-c -Ivrouter/sandesh/gen-c -Itools -Itools/sandesh/library/c -Ibuild/debug/vrouter/dpdk/x86_64-native-linuxapp-gcc/include -Ivrouter/dpdk/x86_64-native-linuxapp-gcc/include vrouter/dpdk/vr_dpdk_ethdev.c vrouter/dpdk/vr_dpdk_ethdev.c: In function ‘dpdk_ethdev_bond_info_update’: vrouter/dpdk/vr_dpdk_ethdev.c:620:17: error: implicit declaration of function ‘rte_eth_dev_set_mc_addr_list’ [-Werror=implicit-function-declaration] && rte_eth_dev_set_mc_addr_list(slave_port_id, &lacp_mac, 1) == 0) { ^ vrouter/dpdk/vr_dpdk_ethdev.c: In function ‘vr_dpdk_ethdev_rx_emulate’: vrouter/dpdk/vr_dpdk_ethdev.c:1005:9: error: implicit declaration of function ‘rte_pktmbuf_mtod_offset’ [-Werror=implicit-function-declaration] rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[i], uint8_t , RTE_CACHE_LINE_SIZE)); ^ vrouter/dpdk/vr_dpdk_ethdev.c:1005:56: error: expected expression before ‘uint8_t’ rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[i], uint8t , RTE_CACHE_LINESIZE)); ^ cc1: all warnings being treated as errors scons: * [build/debug/vrouter/dpdk/vr_dpdk_ethdev.o] Error 1 scons: building terminated because of errors.

Any clues?

Nir

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Juniper/contrail-vrouter/issues/93#issuecomment-247410192, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFni18BTTB_5RT0z3BaFZCKhszHnYstgks5qqY2cgaJpZM4J9_ol.

nirhenn commented 8 years ago

Ok, have some progress with this fix but now i am getting:

gcc -o build/debug/vrouter/dpdk/vr_dpdk_host.o -c -g -O0 -DDEBUG -Werror -Wall -msse4.2 -DCOMPILE_DEBUG_LOGS -Ivrouter/include -Ibuild/debug/vrouter/sandesh/gen-c -Ivrouter/sandesh/gen-c -Itools -Itools/sandesh/library/c -Ibuild/debug/vrouter/dpdk/x86_64-native-linuxapp-gcc/include -Ivrouter/dpdk/x86_64-native-linuxapp-gcc/include vrouter/dpdk/vr_dpdk_host.c In file included from vrouter/dpdk/vr_dpdk_host.c:35:0: /usr/src/linux-headers-3.13.0-93/include/linux/rcutree.h:91:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘__read_mostly’ extern int rcu_scheduler_active __read_mostly; ^ scons: *\ [build/debug/vrouter/dpdk/vr_dpdk_host.o] Error 1 scons: building terminated because of errors.

Thoughts? Nir.

srajag commented 8 years ago

Can you please get the following packages from http://ubuntu-cloud.archive.canonical.com/ubuntu/pool/main/libu/liburcu/ and install them on your build machine?

liburcu-dev_0.8.5-1ubuntu1~cloud0_amd64.deb liburcu2_0.8.5-1ubuntu1~cloud0_amd64.deb

Raja

From: Nir Henn notifications@github.com Reply-To: Juniper/contrail-vrouter reply@reply.github.com Date: Thursday, September 15, 2016 at 12:38 PM To: Juniper/contrail-vrouter contrail-vrouter@noreply.github.com Cc: Raja Sivaramakrishnan raja@juniper.net, Comment comment@noreply.github.com Subject: Re: [Juniper/contrail-vrouter] Build instruction for vRouter with DPDK support (#93)

Ok, have some progress with this fix but now i am getting:

gcc -o build/debug/vrouter/dpdk/vr_dpdk_host.o -c -g -O0 -DDEBUG -Werror -Wall -msse4.2 -DCOMPILE_DEBUG_LOGS -Ivrouter/include -Ibuild/debug/vrouter/sandesh/gen-c -Ivrouter/sandesh/gen-c -Itools -Itools/sandesh/library/c -Ibuild/debug/vrouter/dpdk/x86_64-native-linuxapp-gcc/include -Ivrouter/dpdk/x86_64-native-linuxapp-gcc/include vrouter/dpdk/vr_dpdk_host.c In file included from vrouter/dpdk/vr_dpdk_host.c:35:0: /usr/src/linux-headers-3.13.0-93/include/linux/rcutree.h:91:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘__read_mostly’ extern int rcu_scheduler_active __read_mostly; ^ scons: *\ [build/debug/vrouter/dpdk/vr_dpdk_host.o] Error 1 scons: building terminated because of errors.

Thoughts? Nir.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Juniper/contrail-vrouter/issues/93#issuecomment-247429868, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFni163IOLj3S2Z68CGg18vMexzETZpLks5qqZ64gaJpZM4J9_ol.

nirhenn commented 8 years ago

looks like this did the trick. Thanks. Nir.