diff options
author | David Marchand <david.marchand@6wind.com> | 2014-09-26 16:04:02 +0200 |
---|---|---|
committer | Thomas Monjalon <thomas.monjalon@6wind.com> | 2014-11-27 13:09:59 +0100 |
commit | 98a1648109b8dbaa4e6b821c17d1f6bd86d33a9a (patch) | |
tree | c55ee2a18dac541731bde2d9f7fa33c0d5275c3f /examples | |
parent | 503f9e8b42562b923e73e908be6ba69964f1f1e7 (diff) | |
download | dpdk-98a1648109b8dbaa4e6b821c17d1f6bd86d33a9a.zip dpdk-98a1648109b8dbaa4e6b821c17d1f6bd86d33a9a.tar.gz dpdk-98a1648109b8dbaa4e6b821c17d1f6bd86d33a9a.tar.xz |
examples: no more bare metal environment
Signed-off-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Diffstat (limited to 'examples')
59 files changed, 31 insertions, 1101 deletions
diff --git a/examples/cmdline/main.c b/examples/cmdline/main.c index 668f152..f8ee0a5 100644 --- a/examples/cmdline/main.c +++ b/examples/cmdline/main.c @@ -77,9 +77,8 @@ #include <rte_debug.h> #include "commands.h" -#include "main.h" -int MAIN(int argc, char **argv) +int main(int argc, char **argv) { int ret; struct cmdline *cl; diff --git a/examples/cmdline/main.h b/examples/cmdline/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/cmdline/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/distributor/main.c b/examples/distributor/main.c index 52266f0..89d82bb 100644 --- a/examples/distributor/main.c +++ b/examples/distributor/main.c @@ -44,8 +44,6 @@ #include <rte_debug.h> #include <rte_distributor.h> -#include "main.h" - #define RX_RING_SIZE 256 #define TX_RING_SIZE 512 #define NUM_MBUFS ((64*1024)-1) @@ -492,7 +490,7 @@ parse_args(int argc, char **argv) /* Main function, does initialization and calls the per-lcore functions */ int -MAIN(int argc, char *argv[]) +main(int argc, char *argv[]) { struct rte_mempool *mbuf_pool; struct rte_distributor *d; diff --git a/examples/distributor/main.h b/examples/distributor/main.h deleted file mode 100644 index 2682d15..0000000 --- a/examples/distributor/main.h +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char *argv[]); - -#endif /* ifndef _MAIN_H_ */ diff --git a/examples/dpdk_qat/main.c b/examples/dpdk_qat/main.c index 127ee40..22f5ebf 100644 --- a/examples/dpdk_qat/main.c +++ b/examples/dpdk_qat/main.c @@ -69,7 +69,6 @@ #include <rte_ip.h> #include <rte_string_fns.h> -#include "main.h" #include "crypto.h" #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM) @@ -631,7 +630,7 @@ init_mem(void) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_conf *qconf; struct rte_eth_link link; diff --git a/examples/dpdk_qat/main.h b/examples/dpdk_qat/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/dpdk_qat/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/helloworld/main.c b/examples/helloworld/main.c index 0c0f833..a4bbd11 100644 --- a/examples/helloworld/main.c +++ b/examples/helloworld/main.c @@ -46,8 +46,6 @@ #include <rte_lcore.h> #include <rte_debug.h> -#include "main.h" - static int lcore_hello(__attribute__((unused)) void *arg) { @@ -58,7 +56,7 @@ lcore_hello(__attribute__((unused)) void *arg) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { int ret; unsigned lcore_id; diff --git a/examples/helloworld/main.h b/examples/helloworld/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/helloworld/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index 0ad8fca..eac5427 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -75,8 +75,6 @@ #include <rte_ip_frag.h> -#include "main.h" - #define RTE_LOGTYPE_IP_FRAG RTE_LOGTYPE_USER1 #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM) @@ -807,7 +805,7 @@ init_mem(void) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_queue_conf *qconf; struct rte_eth_dev_info dev_info; diff --git a/examples/ip_fragmentation/main.h b/examples/ip_fragmentation/main.h deleted file mode 100644 index f8c8415..0000000 --- a/examples/ip_fragmentation/main.h +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/ip_pipeline/main.c b/examples/ip_pipeline/main.c index e19412f..2c53877 100644 --- a/examples/ip_pipeline/main.c +++ b/examples/ip_pipeline/main.c @@ -76,7 +76,7 @@ #include "main.h" int -MAIN(int argc, char **argv) +main(int argc, char **argv) { int ret; diff --git a/examples/ip_pipeline/main.h b/examples/ip_pipeline/main.h index 4bce203..6085aaa 100644 --- a/examples/ip_pipeline/main.h +++ b/examples/ip_pipeline/main.h @@ -295,12 +295,4 @@ struct app_msg_resp { #define APP_FLUSH 0xFF -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - #endif /* _MAIN_H_ */ diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index 39d60ec..9353df8 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -79,8 +79,6 @@ #include <rte_ip_frag.h> -#include "main.h" - #define MAX_PKT_BURST 32 @@ -1012,7 +1010,7 @@ signal_handler(int signum) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_queue_conf *qconf; struct rte_eth_dev_info dev_info; diff --git a/examples/ip_reassembly/main.h b/examples/ip_reassembly/main.h deleted file mode 100644 index f8c8415..0000000 --- a/examples/ip_reassembly/main.h +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index 80c5140..7ddb835 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -71,8 +71,6 @@ #include <rte_fbk_hash.h> #include <rte_ip.h> -#include "main.h" - #define RTE_LOGTYPE_IPv4_MULTICAST RTE_LOGTYPE_USER1 #define MAX_PORTS 16 @@ -669,7 +667,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_queue_conf *qconf; struct rte_eth_dev_info dev_info; diff --git a/examples/ipv4_multicast/main.h b/examples/ipv4_multicast/main.h deleted file mode 100644 index f8c8415..0000000 --- a/examples/ipv4_multicast/main.h +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 24484b5..e684234 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -70,8 +70,6 @@ #include <rte_mempool.h> #include <rte_mbuf.h> -#include "main.h" - #define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1 #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM) @@ -539,7 +537,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_queue_conf *qconf; struct rte_eth_dev_info dev_info; diff --git a/examples/l2fwd/main.h b/examples/l2fwd/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/l2fwd/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c index f12e5bb..4487c95 100644 --- a/examples/l3fwd-acl/main.c +++ b/examples/l3fwd-acl/main.c @@ -73,8 +73,6 @@ #include <rte_string_fns.h> #include <rte_acl.h> -#include "main.h" - #define DO_RFC_1812_CHECKS #define RTE_LOGTYPE_L3FWD RTE_LOGTYPE_USER1 @@ -1923,7 +1921,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_conf *qconf; struct rte_eth_dev_info dev_info; diff --git a/examples/l3fwd-acl/main.h b/examples/l3fwd-acl/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/l3fwd-acl/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 76a512b..f6b55b9 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -76,8 +76,6 @@ #include <rte_timer.h> #include <rte_power.h> -#include "main.h" - #define RTE_LOGTYPE_L3FWD_POWER RTE_LOGTYPE_USER1 #define MAX_PKT_BURST 32 @@ -1467,7 +1465,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_conf *qconf; struct rte_eth_dev_info dev_info; diff --git a/examples/l3fwd-power/main.h b/examples/l3fwd-power/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/l3fwd-power/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c index b560b7d..59a7907 100644 --- a/examples/l3fwd-vf/main.c +++ b/examples/l3fwd-vf/main.c @@ -73,8 +73,6 @@ #include <rte_udp.h> #include <rte_string_fns.h> -#include "main.h" - #define APP_LOOKUP_EXACT_MATCH 0 #define APP_LOOKUP_LPM 1 #define DO_RFC_1812_CHECKS @@ -948,7 +946,7 @@ init_mem(unsigned nb_mbuf) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_conf *qconf; struct rte_eth_dev_info dev_info; diff --git a/examples/l3fwd-vf/main.h b/examples/l3fwd-vf/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/l3fwd-vf/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 46ac68e..bf0fcdb 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -73,8 +73,6 @@ #include <rte_udp.h> #include <rte_string_fns.h> -#include "main.h" - #define APP_LOOKUP_EXACT_MATCH 0 #define APP_LOOKUP_LPM 1 #define DO_RFC_1812_CHECKS @@ -2396,7 +2394,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_conf *qconf; struct rte_eth_dev_info dev_info; diff --git a/examples/l3fwd/main.h b/examples/l3fwd/main.h deleted file mode 100644 index eb13b29..0000000 --- a/examples/l3fwd/main.h +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#define MAIN main - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c index 786ddc5..0e01fc0 100644 --- a/examples/link_status_interrupt/main.c +++ b/examples/link_status_interrupt/main.c @@ -71,8 +71,6 @@ #include <rte_mempool.h> #include <rte_mbuf.h> -#include "main.h" - #define RTE_LOGTYPE_LSI RTE_LOGTYPE_USER1 #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM) @@ -593,7 +591,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_queue_conf *qconf; struct rte_eth_dev_info dev_info; diff --git a/examples/link_status_interrupt/main.h b/examples/link_status_interrupt/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/link_status_interrupt/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/load_balancer/main.c b/examples/load_balancer/main.c index 47b0ba7..d0e2c05 100644 --- a/examples/load_balancer/main.c +++ b/examples/load_balancer/main.c @@ -75,7 +75,7 @@ #include "main.h" int -MAIN(int argc, char **argv) +main(int argc, char **argv) { uint32_t lcore; int ret; diff --git a/examples/load_balancer/main.h b/examples/load_balancer/main.h index 82cdf95..d9f878b 100644 --- a/examples/load_balancer/main.h +++ b/examples/load_balancer/main.h @@ -368,12 +368,4 @@ uint32_t app_get_lcores_io_rx(void); uint32_t app_get_lcores_worker(void); void app_print_params(void); -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - #endif /* _MAIN_H_ */ diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c index 908c8dd..bec1cb6 100644 --- a/examples/multi_process/client_server_mp/mp_server/init.c +++ b/examples/multi_process/client_server_mp/mp_server/init.c @@ -68,7 +68,6 @@ #include "common.h" #include "args.h" #include "init.h" -#include "main.h" #define MBUFS_PER_CLIENT 1536 #define MBUFS_PER_PORT 1536 diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c index b3887b1..01ccd37 100644 --- a/examples/multi_process/client_server_mp/mp_server/main.c +++ b/examples/multi_process/client_server_mp/mp_server/main.c @@ -72,7 +72,6 @@ #include "common.h" #include "args.h" #include "init.h" -#include "main.h" /* * When doing reads from the NIC or the client queues, @@ -301,7 +300,7 @@ do_packet_forwarding(void) } int -MAIN(int argc, char *argv[]) +main(int argc, char *argv[]) { /* initialise the system */ if (init(argc, argv) < 0 ) diff --git a/examples/multi_process/client_server_mp/mp_server/main.h b/examples/multi_process/client_server_mp/mp_server/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/multi_process/client_server_mp/mp_server/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c index 1df9f01..78a04ca 100644 --- a/examples/multi_process/l2fwd_fork/main.c +++ b/examples/multi_process/l2fwd_fork/main.c @@ -74,7 +74,6 @@ #include <rte_mbuf.h> #include <rte_malloc.h> -#include "main.h" #include "flib.h" #define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1 @@ -961,7 +960,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { struct lcore_queue_conf *qconf; struct rte_eth_dev_info dev_info; diff --git a/examples/multi_process/l2fwd_fork/main.h b/examples/multi_process/l2fwd_fork/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/multi_process/l2fwd_fork/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c index b30bfde..4a981c6 100644 --- a/examples/qos_meter/main.c +++ b/examples/qos_meter/main.c @@ -338,7 +338,7 @@ parse_args(int argc, char **argv) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { uint32_t lcore_id; int ret; diff --git a/examples/qos_meter/main.h b/examples/qos_meter/main.h index 7bffce5..530bf69 100644 --- a/examples/qos_meter/main.h +++ b/examples/qos_meter/main.h @@ -48,15 +48,6 @@ enum policer_action policer_table[e_RTE_METER_COLORS][e_RTE_METER_COLORS] = { DROP, DROP, RED} }; -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - - #if APP_MODE == APP_MODE_FWD #define FUNC_METER(a,b,c,d) color, flow_id=flow_id, pkt_len=pkt_len, time=time diff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c index 19a4f85..ed3cbea 100644 --- a/examples/qos_sched/main.c +++ b/examples/qos_sched/main.c @@ -223,7 +223,7 @@ app_stat(void) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { int ret; diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h index f3b3956..971ec27 100644 --- a/examples/qos_sched/main.h +++ b/examples/qos_sched/main.h @@ -40,12 +40,6 @@ extern "C" { #include <rte_sched.h> -#ifdef RTE_EXEC_ENV_BAREMETAL -#error "Baremetal is not supported" -#else -#define MAIN main -#endif - #define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1 /* @@ -177,7 +171,6 @@ extern struct ring_thresh tx_thresh; extern struct rte_sched_port_params port_params; -int MAIN(int argc, char **argv); int app_parse_args(int argc, char **argv); int app_init(void); diff --git a/examples/quota_watermark/qw/main.c b/examples/quota_watermark/qw/main.c index c8bd62f..f269546 100644 --- a/examples/quota_watermark/qw/main.c +++ b/examples/quota_watermark/qw/main.c @@ -304,7 +304,7 @@ send_stage(__attribute__((unused)) void *args) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { int ret; unsigned int lcore_id, master_lcore_id, last_lcore_id; diff --git a/examples/quota_watermark/qw/main.h b/examples/quota_watermark/qw/main.h index 3b78324..79d3c26 100644 --- a/examples/quota_watermark/qw/main.h +++ b/examples/quota_watermark/qw/main.h @@ -36,12 +36,6 @@ #include "../include/conf.h" -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - enum ring_state { RING_READY, RING_OVERLOADED, @@ -62,7 +56,4 @@ is_bit_set(int i, unsigned int mask) return ((1 << i) & mask); } - -int MAIN(int argc, char **argv); - #endif /* _MAIN_H_ */ diff --git a/examples/quota_watermark/qwctl/qwctl.c b/examples/quota_watermark/qwctl/qwctl.c index 8bf9e33..eb2f618 100644 --- a/examples/quota_watermark/qwctl/qwctl.c +++ b/examples/quota_watermark/qwctl/qwctl.c @@ -71,7 +71,7 @@ setup_shared_variables(void) low_watermark = (unsigned int *) qw_memzone->addr + sizeof(int); } -int MAIN(int argc, char **argv) +int main(int argc, char **argv) { int ret; struct cmdline *cl; diff --git a/examples/quota_watermark/qwctl/qwctl.h b/examples/quota_watermark/qwctl/qwctl.h index 4209307..8d146e5 100644 --- a/examples/quota_watermark/qwctl/qwctl.h +++ b/examples/quota_watermark/qwctl/qwctl.h @@ -34,15 +34,7 @@ #ifndef _MAIN_H_ #define _MAIN_H_ -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - extern int *quota; extern unsigned int *low_watermark; -int MAIN(int argc, char **argv); - #endif /* _MAIN_H_ */ diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c index ef8f90c..6aa931e 100644 --- a/examples/skeleton/basicfwd.c +++ b/examples/skeleton/basicfwd.c @@ -38,7 +38,6 @@ #include <rte_cycles.h> #include <rte_lcore.h> #include <rte_mbuf.h> -#include "basicfwd.h" #define RX_RING_SIZE 128 #define TX_RING_SIZE 512 @@ -142,7 +141,7 @@ lcore_main(void) /* Main function, does initialisation and calls the per-lcore functions */ int -MAIN(int argc, char *argv[]) +main(int argc, char *argv[]) { struct rte_mempool *mbuf_pool; unsigned nb_ports; diff --git a/examples/skeleton/basicfwd.h b/examples/skeleton/basicfwd.h deleted file mode 100644 index 3797b5d..0000000 --- a/examples/skeleton/basicfwd.h +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef BASICFWD_H -#define BASICFWD_H - - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char *argv[]); - -#endif /* BASICFWD_H */ diff --git a/examples/timer/main.c b/examples/timer/main.c index a5ff015..5a5d33c 100644 --- a/examples/timer/main.c +++ b/examples/timer/main.c @@ -49,8 +49,6 @@ #include <rte_timer.h> #include <rte_debug.h> -#include "main.h" - #define TIMER_RESOLUTION_CYCLES 20000000ULL /* around 10ms at 2 Ghz */ static struct rte_timer timer0; @@ -115,7 +113,7 @@ lcore_mainloop(__attribute__((unused)) void *arg) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { int ret; uint64_t hz; diff --git a/examples/timer/main.h b/examples/timer/main.h deleted file mode 100644 index f54938b..0000000 --- a/examples/timer/main.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 1f1edbe..1e38453 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -2849,7 +2849,7 @@ setup_mempool_tbl(int socket, uint32_t index, char *pool_name, * device is also registered here to handle the IOCTLs. */ int -MAIN(int argc, char *argv[]) +main(int argc, char *argv[]) { struct rte_mempool *mbuf_pool = NULL; unsigned lcore_id, core_id = 0; @@ -3020,10 +3020,10 @@ MAIN(int argc, char *argv[]) } LOG_DEBUG(VHOST_CONFIG, - "in MAIN: mbuf count in mempool at initial " + "in main: mbuf count in mempool at initial " "is: %d\n", count_in_mempool); LOG_DEBUG(VHOST_CONFIG, - "in MAIN: mbuf count in ring at initial is :" + "in main: mbuf count in ring at initial is :" " %d\n", rte_ring_count(vpool_array[index].ring)); } diff --git a/examples/vhost/main.h b/examples/vhost/main.h index 3085bde..d04e2be 100644 --- a/examples/vhost/main.h +++ b/examples/vhost/main.h @@ -34,12 +34,6 @@ #ifndef _MAIN_H_ #define _MAIN_H_ -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - //#define DEBUG #ifdef DEBUG @@ -118,5 +112,4 @@ struct lcore_info struct lcore_ll_info *lcore_ll; /* Pointer to data core specific lcore_ll_info struct */ }; -int MAIN(int argc, char **argv); #endif /* _MAIN_H_ */ diff --git a/examples/vhost_xen/main.c b/examples/vhost_xen/main.c index 0160492..b4a86e3 100644 --- a/examples/vhost_xen/main.c +++ b/examples/vhost_xen/main.c @@ -1425,7 +1425,7 @@ int init_virtio_net(struct virtio_net_device_ops const * const ops); * device is also registered here to handle the IOCTLs. */ int -MAIN(int argc, char *argv[]) +main(int argc, char *argv[]) { struct rte_mempool *mbuf_pool; unsigned lcore_id, core_id = 0; diff --git a/examples/vhost_xen/main.h b/examples/vhost_xen/main.h index 4010766..481572e 100644 --- a/examples/vhost_xen/main.h +++ b/examples/vhost_xen/main.h @@ -34,12 +34,6 @@ #ifndef _MAIN_H_ #define _MAIN_H_ -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - //#define DEBUG #ifdef DEBUG @@ -80,6 +74,4 @@ struct lcore_info { struct lcore_ll_info *lcore_ll; /* Pointer to data core specific lcore_ll_info struct */ }; - -int MAIN(int argc, char **argv); #endif /* _MAIN_H_ */ diff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c index f8e6a7d..7ee2296 100644 --- a/examples/vm_power_manager/guest_cli/main.c +++ b/examples/vm_power_manager/guest_cli/main.c @@ -51,7 +51,6 @@ #include <rte_config.h> #include "vm_power_cli_guest.h" -#include "main.h" static void sig_handler(int signo) @@ -66,7 +65,7 @@ sig_handler(int signo) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { int ret; unsigned lcore_id; diff --git a/examples/vm_power_manager/guest_cli/main.h b/examples/vm_power_manager/guest_cli/main.h deleted file mode 100644 index 7b4c3da..0000000 --- a/examples/vm_power_manager/guest_cli/main.h +++ /dev/null @@ -1,52 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ - -#ifndef MAIN_H_ -#define MAIN_H_ - - - -#endif /* MAIN_H_ */ diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c index 875274e..dfca7b8 100644 --- a/examples/vm_power_manager/main.c +++ b/examples/vm_power_manager/main.c @@ -58,7 +58,6 @@ #include "channel_monitor.h" #include "power_manager.h" #include "vm_power_cli.h" -#include "main.h" static int run_monitor(__attribute__((unused)) void *arg) @@ -82,7 +81,7 @@ sig_handler(int signo) } int -MAIN(int argc, char **argv) +main(int argc, char **argv) { int ret; unsigned lcore_id; diff --git a/examples/vm_power_manager/main.h b/examples/vm_power_manager/main.h deleted file mode 100644 index 7b4c3da..0000000 --- a/examples/vm_power_manager/main.h +++ /dev/null @@ -1,52 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN(int argc, char **argv); - -#endif /* _MAIN_H_ */ - -#ifndef MAIN_H_ -#define MAIN_H_ - - - -#endif /* MAIN_H_ */ diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index e60b671..2c6a649 100644 --- a/examples/vmdq/main.c +++ b/examples/vmdq/main.c @@ -70,8 +70,6 @@ #include <rte_mbuf.h> #include <rte_memcpy.h> -#include "main.h" - #define MAX_QUEUES 128 /* * For 10 GbE, 128 queues require roughly @@ -443,7 +441,6 @@ update_mac_address(struct rte_mbuf *m, unsigned dst_port) ether_addr_copy(&vmdq_ports_eth_addr[dst_port], ð->s_addr); } -#ifndef RTE_EXEC_ENV_BAREMETAL /* When we receive a HUP signal, print out our stats */ static void sighup_handler(int signum) @@ -456,7 +453,6 @@ sighup_handler(int signum) } printf("\nFinished handling signal %d\n", signum); } -#endif /* * Main thread that does the work, reading from INPUT_PORT @@ -574,7 +570,7 @@ static unsigned check_ports_num(unsigned nb_ports) /* Main function, does initialisation and calls the per-lcore functions */ int -MAIN(int argc, char *argv[]) +main(int argc, char *argv[]) { struct rte_mempool *mbuf_pool; unsigned lcore_id, core_id = 0; @@ -582,9 +578,7 @@ MAIN(int argc, char *argv[]) unsigned nb_ports, valid_num_ports; uint8_t portid; -#ifndef RTE_EXEC_ENV_BAREMETAL signal(SIGHUP, sighup_handler); -#endif /* init EAL */ ret = rte_eal_init(argc, argv); diff --git a/examples/vmdq/main.h b/examples/vmdq/main.h deleted file mode 100644 index f13c9aa..0000000 --- a/examples/vmdq/main.h +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN( int argc, char *argv[] ); - -#endif /* ifndef _MAIN_H_ */ diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c index 20726e5..61d3e34 100644 --- a/examples/vmdq_dcb/main.c +++ b/examples/vmdq_dcb/main.c @@ -70,8 +70,6 @@ #include <rte_mbuf.h> #include <rte_memcpy.h> -#include "main.h" - /* basic constants used in application */ #define NUM_QUEUES 128 @@ -313,7 +311,6 @@ vmdq_parse_args(int argc, char **argv) } -#ifndef RTE_EXEC_ENV_BAREMETAL /* When we receive a HUP signal, print out our stats */ static void sighup_handler(int signum) @@ -326,7 +323,6 @@ sighup_handler(int signum) } printf("\nFinished handling signal %d\n", signum); } -#endif /* * Main thread that does the work, reading from INPUT_PORT @@ -401,7 +397,7 @@ static unsigned check_ports_num(unsigned nb_ports) /* Main function, does initialisation and calls the per-lcore functions */ int -MAIN(int argc, char *argv[]) +main(int argc, char *argv[]) { unsigned cores; struct rte_mempool *mbuf_pool; @@ -411,9 +407,7 @@ MAIN(int argc, char *argv[]) unsigned nb_ports, valid_num_ports; uint8_t portid; -#ifndef RTE_EXEC_ENV_BAREMETAL signal(SIGHUP, sighup_handler); -#endif /* init EAL */ ret = rte_eal_init(argc, argv); diff --git a/examples/vmdq_dcb/main.h b/examples/vmdq_dcb/main.h deleted file mode 100644 index f13c9aa..0000000 --- a/examples/vmdq_dcb/main.h +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MAIN_H_ -#define _MAIN_H_ - - -#ifdef RTE_EXEC_ENV_BAREMETAL -#define MAIN _main -#else -#define MAIN main -#endif - -int MAIN( int argc, char *argv[] ); - -#endif /* ifndef _MAIN_H_ */ |