get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/130343/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 130343,
    "url": "https://patches.dpdk.org/api/patches/130343/?format=api",
    "web_url": "https://patches.dpdk.org/project/ci/patch/20230815131320.375088-7-bruce.richardson@intel.com/",
    "project": {
        "id": 5,
        "url": "https://patches.dpdk.org/api/projects/5/?format=api",
        "name": "CI",
        "link_name": "ci",
        "list_id": "ci.dpdk.org",
        "list_email": "ci@dpdk.org",
        "web_url": "",
        "scm_url": "git://dpdk.org/tools/dpdk-ci",
        "webscm_url": "https://git.dpdk.org/tools/dpdk-ci/",
        "list_archive_url": "https://inbox.dpdk.org/ci",
        "list_archive_url_format": "https://inbox.dpdk.org/ci/{}",
        "commit_url_format": ""
    },
    "msgid": "<20230815131320.375088-7-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/ci/20230815131320.375088-7-bruce.richardson@intel.com",
    "date": "2023-08-15T13:13:18",
    "name": "[v4,6/8] examples/l3fwd: make eventdev an optional dependency",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "f4591643c9344a23b01572516a6d9d82fe58c800",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/ci/patch/20230815131320.375088-7-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 29231,
            "url": "https://patches.dpdk.org/api/series/29231/?format=api",
            "web_url": "https://patches.dpdk.org/project/ci/list/?series=29231",
            "date": "2023-08-15T13:13:12",
            "name": "expand list of optional libraries",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/29231/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/130343/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/130343/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ci-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B399443071;\n\tTue, 15 Aug 2023 15:13:49 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9B83B4328D;\n\tTue, 15 Aug 2023 15:13:43 +0200 (CEST)",
            "from mgamail.intel.com (mgamail.intel.com [192.55.52.43])\n by mails.dpdk.org (Postfix) with ESMTP id B6AA54325E;\n Tue, 15 Aug 2023 15:13:38 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 15 Aug 2023 06:13:37 -0700",
            "from silpixa00401385.ir.intel.com ([10.237.214.14])\n by fmsmga008.fm.intel.com with ESMTP; 15 Aug 2023 06:13:36 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1692105219; x=1723641219;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=R+z8eYrRdENqmmjRhGzkkRXLbyn3DJyDVhhaqVnGzGg=;\n b=Elu7vKwSj+lBMgxq62cy3mkRnz7DwN2Kcj79i6Hl3tRUOSFKqCqL46jx\n Jlf9hZsE3i331Zls/2zOHNyDkol6ZwjEncQrORPN1ToV4GqMSpRiPySUO\n MMj4CEwWKzR6Wy+lzNAfSifa34jDvmd9GQBgzj7wu/5DB2/xcgCPUKzbP\n Z0DNmnE7w1WyMlXtaEV+wOWIX0L8d2TVamoaMUutF47gHPqvd5meadsy3\n +Br/7KQaRv/1zvtGL82lwf22f3JsdIrIgtb4c1klvA+O5/WtyVMnSzyww\n 035PQsd+6IsUvpdgn9F9mJt6iRROz0GflsY8lS9SSFA/XH+Oy1Q5MniZt Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10803\"; a=\"458623170\"",
            "E=Sophos;i=\"6.01,174,1684825200\"; d=\"scan'208\";a=\"458623170\"",
            "E=McAfee;i=\"6600,9927,10803\"; a=\"799189845\"",
            "E=Sophos;i=\"6.01,174,1684825200\"; d=\"scan'208\";a=\"799189845\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "ci@dpdk.org,\n\tBruce Richardson <bruce.richardson@intel.com>",
        "Subject": "[PATCH v4 6/8] examples/l3fwd: make eventdev an optional dependency",
        "Date": "Tue, 15 Aug 2023 14:13:18 +0100",
        "Message-Id": "<20230815131320.375088-7-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "In-Reply-To": "<20230815131320.375088-1-bruce.richardson@intel.com>",
        "References": "<20230721115125.55137-1-bruce.richardson@intel.com>\n <20230815131320.375088-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "ci@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK CI discussions <ci.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/ci>,\n <mailto:ci-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/ci/>",
        "List-Post": "<mailto:ci@dpdk.org>",
        "List-Help": "<mailto:ci-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/ci>,\n <mailto:ci-request@dpdk.org?subject=subscribe>",
        "Errors-To": "ci-bounces@dpdk.org"
    },
    "content": "With l3fwd being a very commonly used example app, and built as part of\nour CI tests, we need to ensure it's buildable with just about all\nsupported DPDK configurations.  To enable l3fwd application to be built\nwhen the eventdev library is disabled, we need to compile in the\neventdev support conditionally.  Thankfully, the eventdev support is\npretty self-contained, with only the main.c file having more than a\ncouple of ifdefs.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n examples/l3fwd/l3fwd_em.c                  |  2 +\n examples/l3fwd/l3fwd_em_hlm.h              |  2 +\n examples/l3fwd/l3fwd_event.c               |  2 +\n examples/l3fwd/l3fwd_event.h               |  7 ++-\n examples/l3fwd/l3fwd_event_generic.c       |  2 +\n examples/l3fwd/l3fwd_event_internal_port.c |  2 +\n examples/l3fwd/l3fwd_fib.c                 |  2 +\n examples/l3fwd/l3fwd_lpm.c                 |  2 +\n examples/l3fwd/main.c                      | 65 +++++++++++++++++-----\n examples/l3fwd/meson.build                 |  5 +-\n 10 files changed, 74 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c\nindex 476ac0c54f..40e102b38a 100644\n--- a/examples/l3fwd/l3fwd_em.c\n+++ b/examples/l3fwd/l3fwd_em.c\n@@ -663,6 +663,7 @@ em_main_loop(__rte_unused void *dummy)\n \treturn 0;\n }\n \n+#ifdef RTE_LIB_EVENTDEV\n static __rte_always_inline void\n em_event_loop_single(struct l3fwd_event_resources *evt_rsrc,\n \t\tconst uint8_t flags)\n@@ -959,6 +960,7 @@ em_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)\n \tem_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);\n \treturn 0;\n }\n+#endif\n \n /* Initialize exact match (hash) parameters. 8< */\n void\ndiff --git a/examples/l3fwd/l3fwd_em_hlm.h b/examples/l3fwd/l3fwd_em_hlm.h\nindex 2e11eefad7..31cda9ddc1 100644\n--- a/examples/l3fwd/l3fwd_em_hlm.h\n+++ b/examples/l3fwd/l3fwd_em_hlm.h\n@@ -255,6 +255,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf **pkts_burst, uint16_t portid,\n \tsend_packets_multi(qconf, pkts_burst, dst_port, nb_rx);\n }\n \n+#ifdef RTE_LIB_EVENTDEV\n /*\n  * Buffer optimized handling of events, invoked\n  * from main_loop.\n@@ -347,5 +348,6 @@ l3fwd_em_process_event_vector(struct rte_event_vector *vec,\n \n \tprocess_event_vector(vec, dst_port);\n }\n+#endif /* RTE_LIB_EVENTDEV */\n \n #endif /* __L3FWD_EM_HLM_H__ */\ndiff --git a/examples/l3fwd/l3fwd_event.c b/examples/l3fwd/l3fwd_event.c\nindex 32906ab08d..d72a4138cc 100644\n--- a/examples/l3fwd/l3fwd_event.c\n+++ b/examples/l3fwd/l3fwd_event.c\n@@ -2,6 +2,7 @@\n  * Copyright(C) 2019 Marvell International Ltd.\n  */\n \n+#ifdef RTE_LIB_EVENTDEV\n #include <stdbool.h>\n #include <getopt.h>\n \n@@ -341,3 +342,4 @@ l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,\n \trte_event_port_quiesce(event_d_id, event_p_id, l3fwd_event_port_flush,\n \t\t\t       NULL);\n }\n+#endif /* #ifdef RTE_LIB_EVENTDEV */\ndiff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h\nindex e21817c36b..1fd6fe4a78 100644\n--- a/examples/l3fwd/l3fwd_event.h\n+++ b/examples/l3fwd/l3fwd_event.h\n@@ -6,11 +6,13 @@\n #define __L3FWD_EVENTDEV_H__\n \n #include <rte_common.h>\n+#include <rte_service.h>\n+#include <rte_spinlock.h>\n+\n+#ifdef RTE_LIB_EVENTDEV\n #include <rte_eventdev.h>\n #include <rte_event_eth_rx_adapter.h>\n #include <rte_event_eth_tx_adapter.h>\n-#include <rte_service.h>\n-#include <rte_spinlock.h>\n \n #include \"l3fwd.h\"\n \n@@ -164,4 +166,5 @@ void l3fwd_event_worker_cleanup(uint8_t event_d_id, uint8_t event_p_id,\n \t\t\t\tstruct rte_event events[], uint16_t nb_enq,\n \t\t\t\tuint16_t nb_deq, uint8_t is_vector);\n \n+#endif /* ifdef RTE_LIB_EVENTDEV */\n #endif /* __L3FWD_EVENTDEV_H__ */\ndiff --git a/examples/l3fwd/l3fwd_event_generic.c b/examples/l3fwd/l3fwd_event_generic.c\nindex c80573fc58..ddb6e5c38d 100644\n--- a/examples/l3fwd/l3fwd_event_generic.c\n+++ b/examples/l3fwd/l3fwd_event_generic.c\n@@ -2,6 +2,7 @@\n  * Copyright(C) 2019 Marvell International Ltd.\n  */\n \n+#ifdef RTE_LIB_EVENTDEV\n #include <stdbool.h>\n \n #include \"l3fwd.h\"\n@@ -309,3 +310,4 @@ l3fwd_event_set_generic_ops(struct l3fwd_event_setup_ops *ops)\n \tops->event_port_setup = l3fwd_event_port_setup_generic;\n \tops->adapter_setup = l3fwd_rx_tx_adapter_setup_generic;\n }\n+#endif /* RTE_LIB_EVENTDEV */\ndiff --git a/examples/l3fwd/l3fwd_event_internal_port.c b/examples/l3fwd/l3fwd_event_internal_port.c\nindex 32cf657148..cb49a8b9fa 100644\n--- a/examples/l3fwd/l3fwd_event_internal_port.c\n+++ b/examples/l3fwd/l3fwd_event_internal_port.c\n@@ -2,6 +2,7 @@\n  * Copyright(C) 2019 Marvell International Ltd.\n  */\n \n+#ifdef RTE_LIB_EVENTDEV\n #include <stdbool.h>\n \n #include \"l3fwd.h\"\n@@ -311,3 +312,4 @@ l3fwd_event_set_internal_port_ops(struct l3fwd_event_setup_ops *ops)\n \tops->event_port_setup = l3fwd_event_port_setup_internal_port;\n \tops->adapter_setup = l3fwd_rx_tx_adapter_setup_internal_port;\n }\n+#endif /* RTE_LIB_EVENTDEV */\ndiff --git a/examples/l3fwd/l3fwd_fib.c b/examples/l3fwd/l3fwd_fib.c\nindex 18398492ae..6a21984415 100644\n--- a/examples/l3fwd/l3fwd_fib.c\n+++ b/examples/l3fwd/l3fwd_fib.c\n@@ -253,6 +253,7 @@ fib_main_loop(__rte_unused void *dummy)\n \treturn 0;\n }\n \n+#ifdef RTE_LIB_EVENTDEV\n /* One eventdev loop for single and burst using fib. */\n static __rte_always_inline void\n fib_event_loop(struct l3fwd_event_resources *evt_rsrc,\n@@ -635,6 +636,7 @@ fib_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)\n \tfib_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);\n \treturn 0;\n }\n+#endif\n \n /* Function to setup fib. 8< */\n void\ndiff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c\nindex 4ac1925c84..a484a33089 100644\n--- a/examples/l3fwd/l3fwd_lpm.c\n+++ b/examples/l3fwd/l3fwd_lpm.c\n@@ -226,6 +226,7 @@ lpm_main_loop(__rte_unused void *dummy)\n \treturn 0;\n }\n \n+#ifdef RTE_LIB_EVENTDEV\n static __rte_always_inline uint16_t\n lpm_process_event_pkt(const struct lcore_conf *lconf, struct rte_mbuf *mbuf)\n {\n@@ -554,6 +555,7 @@ lpm_event_main_loop_tx_q_burst_vector(__rte_unused void *dummy)\n \tlpm_event_loop_vector(evt_rsrc, L3FWD_EVENT_TX_ENQ);\n \treturn 0;\n }\n+#endif\n \n void\n setup_lpm(const int socketid)\ndiff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c\nindex a4f061537e..6063eb1399 100644\n--- a/examples/l3fwd/main.c\n+++ b/examples/l3fwd/main.c\n@@ -135,8 +135,10 @@ static struct rte_eth_conf port_conf = {\n \n uint32_t max_pkt_len;\n \n-static struct rte_mempool *pktmbuf_pool[RTE_MAX_ETHPORTS][NB_SOCKETS];\n+#ifdef RTE_LIB_EVENTDEV\n static struct rte_mempool *vector_pool[RTE_MAX_ETHPORTS];\n+#endif\n+static struct rte_mempool *pktmbuf_pool[RTE_MAX_ETHPORTS][NB_SOCKETS];\n static uint8_t lkp_per_socket[NB_SOCKETS];\n \n struct l3fwd_lkp_mode {\n@@ -398,8 +400,10 @@ print_usage(const char *prgname)\n \t\t\" [--parse-ptype]\"\n \t\t\" [--per-port-pool]\"\n \t\t\" [--mode]\"\n+#ifdef RTE_LIB_EVENTDEV\n \t\t\" [--eventq-sched]\"\n \t\t\" [--event-vector [--event-vector-size SIZE] [--event-vector-tmo NS]]\"\n+#endif\n \t\t\" [-E]\"\n \t\t\" [-L]\\n\\n\"\n \n@@ -422,6 +426,7 @@ print_usage(const char *prgname)\n \t\t\"  --per-port-pool: Use separate buffer pool per port\\n\"\n \t\t\"  --mode: Packet transfer mode for I/O, poll or eventdev\\n\"\n \t\t\"          Default mode = poll\\n\"\n+#ifdef RTE_LIB_EVENTDEV\n \t\t\"  --eventq-sched: Event queue synchronization method\\n\"\n \t\t\"                  ordered, atomic or parallel.\\n\"\n \t\t\"                  Default: atomic\\n\"\n@@ -432,6 +437,7 @@ print_usage(const char *prgname)\n \t\t\"  --event-vector:  Enable event vectorization.\\n\"\n \t\t\"  --event-vector-size: Max vector size if event vectorization is enabled.\\n\"\n \t\t\"  --event-vector-tmo: Max timeout to form vector in nanoseconds if event vectorization is enabled\\n\"\n+#endif\n \t\t\"  -E : Enable exact match, legacy flag please use --lookup=em instead\\n\"\n \t\t\"  -L : Enable longest prefix match, legacy flag please use --lookup=lpm instead\\n\"\n \t\t\"  --rule_ipv4=FILE: Specify the ipv4 rules entries file.\\n\"\n@@ -559,14 +565,16 @@ parse_eth_dest(const char *optarg)\n }\n \n static void\n-parse_mode(const char *optarg)\n+parse_mode(const char *optarg __rte_unused)\n {\n+#ifdef RTE_LIB_EVENTDEV\n \tstruct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc();\n \n \tif (!strcmp(optarg, \"poll\"))\n \t\tevt_rsrc->enabled = false;\n \telse if (!strcmp(optarg, \"eventdev\"))\n \t\tevt_rsrc->enabled = true;\n+#endif\n }\n \n static void\n@@ -601,6 +609,7 @@ parse_queue_size(const char *queue_size_arg, uint16_t *queue_size, int rx)\n \t*queue_size = value;\n }\n \n+#ifdef RTE_LIB_EVENTDEV\n static void\n parse_eventq_sched(const char *optarg)\n {\n@@ -631,6 +640,7 @@ parse_event_eth_rx_queues(const char *eth_rx_queues)\n \n \tevt_rsrc->eth_rx_queues = num_eth_rx_queues;\n }\n+#endif\n \n static int\n parse_lookup(const char *optarg)\n@@ -756,9 +766,11 @@ parse_args(int argc, char **argv)\n \tint option_index;\n \tchar *prgname = argv[0];\n \tuint8_t lcore_params = 0;\n+#ifdef RTE_LIB_EVENTDEV\n \tuint8_t eventq_sched = 0;\n \tuint8_t eth_rx_q = 0;\n \tstruct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc();\n+#endif\n \n \targvopt = argv;\n \n@@ -850,6 +862,7 @@ parse_args(int argc, char **argv)\n \t\t\tparse_mode(optarg);\n \t\t\tbreak;\n \n+#ifdef RTE_LIB_EVENTDEV\n \t\tcase CMD_LINE_OPT_EVENTQ_SYNC_NUM:\n \t\t\tparse_eventq_sched(optarg);\n \t\t\teventq_sched = 1;\n@@ -860,6 +873,20 @@ parse_args(int argc, char **argv)\n \t\t\teth_rx_q = 1;\n \t\t\tbreak;\n \n+\t\tcase CMD_LINE_OPT_ENABLE_VECTOR_NUM:\n+\t\t\tprintf(\"event vectorization is enabled\\n\");\n+\t\t\tevt_rsrc->vector_enabled = 1;\n+\t\t\tbreak;\n+\n+\t\tcase CMD_LINE_OPT_VECTOR_SIZE_NUM:\n+\t\t\tevt_rsrc->vector_size = strtol(optarg, NULL, 10);\n+\t\t\tbreak;\n+\n+\t\tcase CMD_LINE_OPT_VECTOR_TMO_NS_NUM:\n+\t\t\tevt_rsrc->vector_tmo_ns = strtoull(optarg, NULL, 10);\n+\t\t\tbreak;\n+#endif\n+\n \t\tcase CMD_LINE_OPT_LOOKUP_NUM:\n \t\t\tif (lookup_mode != L3FWD_LOOKUP_DEFAULT) {\n \t\t\t\tfprintf(stderr, \"Only one lookup mode is allowed at a time!\\n\");\n@@ -875,16 +902,6 @@ parse_args(int argc, char **argv)\n \t\t\t\treturn -1;\n \t\t\tbreak;\n \n-\t\tcase CMD_LINE_OPT_ENABLE_VECTOR_NUM:\n-\t\t\tprintf(\"event vectorization is enabled\\n\");\n-\t\t\tevt_rsrc->vector_enabled = 1;\n-\t\t\tbreak;\n-\t\tcase CMD_LINE_OPT_VECTOR_SIZE_NUM:\n-\t\t\tevt_rsrc->vector_size = strtol(optarg, NULL, 10);\n-\t\t\tbreak;\n-\t\tcase CMD_LINE_OPT_VECTOR_TMO_NS_NUM:\n-\t\t\tevt_rsrc->vector_tmo_ns = strtoull(optarg, NULL, 10);\n-\t\t\tbreak;\n \t\tcase CMD_LINE_OPT_RULE_IPV4_NUM:\n \t\t\tl3fwd_set_rule_ipv4_name(optarg);\n \t\t\tbreak;\n@@ -900,6 +917,8 @@ parse_args(int argc, char **argv)\n \t\t}\n \t}\n \n+\tRTE_SET_USED(lcore_params); /* needed if no eventdev block */\n+#ifdef RTE_LIB_EVENTDEV\n \tif (evt_rsrc->enabled && lcore_params) {\n \t\tfprintf(stderr, \"lcore config is not valid when event mode is selected\\n\");\n \t\treturn -1;\n@@ -927,6 +946,7 @@ parse_args(int argc, char **argv)\n \t\t\t\"vector timeout set to default (%\" PRIu64 \" ns)\\n\",\n \t\t\tevt_rsrc->vector_tmo_ns);\n \t}\n+#endif\n \n \t/*\n \t * Nothing is selected, pick longest-prefix match\n@@ -962,7 +982,9 @@ print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)\n int\n init_mem(uint16_t portid, unsigned int nb_mbuf)\n {\n+#ifdef RTE_LIB_EVENTDEV\n \tstruct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc();\n+#endif\n \tstruct lcore_conf *qconf;\n \tint socketid;\n \tunsigned lcore_id;\n@@ -1007,6 +1029,7 @@ init_mem(uint16_t portid, unsigned int nb_mbuf)\n \t\t\t}\n \t\t}\n \n+#ifdef RTE_LIB_EVENTDEV\n \t\tif (evt_rsrc->vector_enabled && vector_pool[portid] == NULL) {\n \t\t\tunsigned int nb_vec;\n \n@@ -1025,6 +1048,7 @@ init_mem(uint16_t portid, unsigned int nb_mbuf)\n \t\t\t\tprintf(\"Allocated vector pool for port %d\\n\",\n \t\t\t\t       portid);\n \t\t}\n+#endif\n \n \t\tqconf = &lcore_conf[lcore_id];\n \t\tqconf->ipv4_lookup_struct =\n@@ -1406,6 +1430,7 @@ l3fwd_service_enable(uint32_t service_id)\n \treturn 0;\n }\n \n+#ifdef RTE_LIB_EVENTDEV\n static void\n l3fwd_event_service_setup(void)\n {\n@@ -1458,16 +1483,20 @@ l3fwd_event_service_setup(void)\n \t\tl3fwd_service_enable(service_id);\n \t}\n }\n+#endif\n \n int\n main(int argc, char **argv)\n {\n+#ifdef RTE_LIB_EVENTDEV\n \tstruct l3fwd_event_resources *evt_rsrc;\n+\tint i;\n+#endif\n \tstruct lcore_conf *qconf;\n \tuint16_t queueid, portid;\n \tunsigned int lcore_id;\n \tuint8_t queue;\n-\tint i, ret;\n+\tint ret;\n \n \t/* init EAL */\n \tret = rte_eal_init(argc, argv);\n@@ -1487,7 +1516,9 @@ main(int argc, char **argv)\n \t\t*(uint64_t *)(val_eth + portid) = dest_eth_addr[portid];\n \t}\n \n+#ifdef RTE_LIB_EVENTDEV\n \tevt_rsrc = l3fwd_get_eventdev_rsrc();\n+#endif\n \t/* parse application arguments (after the EAL ones) */\n \tret = parse_args(argc, argv);\n \tif (ret < 0)\n@@ -1499,6 +1530,7 @@ main(int argc, char **argv)\n \t/* Add the config file rules */\n \tl3fwd_lkp.read_config_files();\n \n+#ifdef RTE_LIB_EVENTDEV\n \tevt_rsrc->per_port_pool = per_port_pool;\n \tevt_rsrc->pkt_pool = pktmbuf_pool;\n \tevt_rsrc->vec_pool = vector_pool;\n@@ -1514,6 +1546,7 @@ main(int argc, char **argv)\n \t\t\tl3fwd_lkp.main_loop = evt_rsrc->ops.lpm_event_loop;\n \t\tl3fwd_event_service_setup();\n \t} else\n+#endif\n \t\tl3fwd_poll_resource_setup();\n \n \t/* start ports */\n@@ -1562,6 +1595,8 @@ main(int argc, char **argv)\n \tret = 0;\n \t/* launch per-lcore init on every lcore */\n \trte_eal_mp_remote_launch(l3fwd_lkp.main_loop, NULL, CALL_MAIN);\n+\n+#ifdef RTE_LIB_EVENTDEV\n \tif (evt_rsrc->enabled) {\n \t\tfor (i = 0; i < evt_rsrc->rx_adptr.nb_rx_adptr; i++)\n \t\t\trte_event_eth_rx_adapter_stop(\n@@ -1589,7 +1624,9 @@ main(int argc, char **argv)\n \t\trte_event_dev_stop(evt_rsrc->event_d_id);\n \t\trte_event_dev_close(evt_rsrc->event_d_id);\n \n-\t} else {\n+\t} else\n+#endif\n+\t{\n \t\trte_eal_mp_wait_lcore();\n \n \t\tRTE_ETH_FOREACH_DEV(portid) {\ndiff --git a/examples/l3fwd/meson.build b/examples/l3fwd/meson.build\nindex b40244a941..c25de77bba 100644\n--- a/examples/l3fwd/meson.build\n+++ b/examples/l3fwd/meson.build\n@@ -7,7 +7,7 @@\n # DPDK instance, use 'make'\n \n allow_experimental_apis = true\n-deps += ['acl', 'hash', 'lpm', 'fib', 'eventdev']\n+deps += ['acl', 'hash', 'lpm', 'fib']\n sources = files(\n         'l3fwd_acl.c',\n         'l3fwd_em.c',\n@@ -18,3 +18,6 @@ sources = files(\n         'l3fwd_lpm.c',\n         'main.c',\n )\n+if dpdk_conf.has('RTE_LIB_EVENTDEV')\n+    deps += 'eventdev'\n+endif\n",
    "prefixes": [
        "v4",
        "6/8"
    ]
}