Yes, Dave, But issue #1, first declare the func, (marked as yellow) then define it, my cross_compler report an error, how to fix it?
#define VLIB_REGISTER_NODE(x,...) \ __VA_ARGS__ vlib_node_registration_t x; \ static void __vlib_add_node_registration_##x (void) \ __attribute__((__constructor__)) ; \ static void __vlib_add_node_registration_##x (void) \ { \ vlib_main_t * vm = vlib_get_main(); \ x.next_registration = vm->node_main.node_registrations; \ vm->node_main.node_registrations = &x; \ } \ __VA_ARGS__ vlib_node_registration_t x From: Dave Barach (dbarach) [mailto:dbar...@cisco.com] Sent: 2017年8月22日 20:10 To: Eric Chen <eri...@marvell.com>; vpp-dev <vpp-dev@lists.fd.io> Cc: odp4vpp-...@lists.fd.io Subject: [EXT] RE: 回复:compiling error when build fd.io_odp4vpp with cross_compiler for aarch64 target External Email ________________________________ The multiply-defined constructor function takes its name from the VLIB_REGISTER_NODE macro argument... From: Eric Chen [mailto:eri...@marvell.com] Sent: Tuesday, August 22, 2017 8:05 AM To: Dave Barach (dbarach) <dbar...@cisco.com<mailto:dbar...@cisco.com>>; vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Cc: odp4vpp-...@lists.fd.io<mailto:odp4vpp-...@lists.fd.io> Subject: RE: 回复:compiling error when build fd.io_odp4vpp with cross_compiler for aarch64 target Dave, Yes, sure, For issue#2, either -DIPSEC=0, goes to different branch, or changes to different node name, it can remove the error, but if it’s the case, should anyone meet such failure before. How about the issue #1? Any compiling flags help? Thanks Eric From: Dave Barach (dbarach) [mailto:dbar...@cisco.com] Sent: 2017年8月22日 19:51 To: Eric Chen <eri...@marvell.com<mailto:eri...@marvell.com>>; vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Cc: odp4vpp-...@lists.fd.io<mailto:odp4vpp-...@lists.fd.io> Subject: [EXT] RE: 回复:compiling error when build fd.io_odp4vpp with cross_compiler for aarch64 target External Email ________________________________ Did you try changing the data structure names so they don’t conflict? VLIB_REGISTER_NODE (ipsec_output4_node) + VLIB_REGISTER_NODE (ipsec_output6_node). Feel free to submit a patch. (😉)... Thanks… Dave From: vpp-dev-boun...@lists.fd.io<mailto:vpp-dev-boun...@lists.fd.io> [mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of Eric Chen Sent: Tuesday, August 22, 2017 6:19 AM To: vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Cc: odp4vpp-...@lists.fd.io<mailto:odp4vpp-...@lists.fd.io> Subject: [vpp-dev] 回复:compiling error when build fd.io_odp4vpp with cross_compiler for aarch64 target HI I try to build odp4vpp on a x86 host with the cross-compiler for machine of aarch64. But encounter below errors, could you help me out? 1) vpp/build-root/install-armada-a8k_debug-aarch64/vlib/include/vlib/node.h:147:13: error: redefinition of '__vlib_add_node_registration_ipsec_output_node' static void __vlib_add_node_registration_##x (void) node.h:147 #define VLIB_REGISTER_NODE(x,...) \ __VA_ARGS__ vlib_node_registration_t x; \ static void __vlib_add_node_registration_##x (void) \ __attribute__((__constructor__)) ; \ static void __vlib_add_node_registration_##x (void) \ { \ vlib_main_t * vm = vlib_get_main(); \ x.next_registration = vm->node_main.node_registrations; \ vm->node_main.node_registrations = &x; \ } \ __VA_ARGS__ vlib_node_registration_t x 2) In ./vpp/vnet/vnet/ipsec/ipsec_output.c If -DIPSEC=0, (--without-ipsec) then below will cause redefinition error as well, /* *INDENT-OFF* */ VLIB_REGISTER_NODE (ipsec_output_node) = { .vector_size = sizeof (u32), .function = ipsec_output_node_fn, .name = "ipsec-output-ip4", }; VLIB_REGISTER_NODE (ipsec_output_node) = { .vector_size = sizeof (u32), .function = ipsec_output_node_fn, .name = "ipsec-output-ip6", };
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev