get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 60492,
    "url": "https://patches.dpdk.org/api/patches/60492/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20191003131918.30970-2-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20191003131918.30970-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191003131918.30970-2-bruce.richardson@intel.com",
    "date": "2019-10-03T13:19:13",
    "name": "[1/6] examples/exception_path: remove example from DPDK",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "390e5da7425890d26591ef5e156f53225af42b49",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20191003131918.30970-2-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 6683,
            "url": "https://patches.dpdk.org/api/series/6683/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6683",
            "date": "2019-10-03T13:19:12",
            "name": "remove a few example applications",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/6683/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/60492/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/60492/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F2D531C0DB;\n\tThu,  3 Oct 2019 15:19:33 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 3CB1F1C0D8;\n\tThu,  3 Oct 2019 15:19:31 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Oct 2019 06:19:30 -0700",
            "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.223.2])\n\tby orsmga008.jf.intel.com with ESMTP; 03 Oct 2019 06:19:28 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.67,252,1566889200\"; d=\"scan'208\";a=\"185910445\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "techboard@dpdk.org,\n\tBruce Richardson <bruce.richardson@intel.com>",
        "Date": "Thu,  3 Oct 2019 14:19:13 +0100",
        "Message-Id": "<20191003131918.30970-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20191003131918.30970-1-bruce.richardson@intel.com>",
        "References": "<20191003131918.30970-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 1/6] examples/exception_path: remove example from\n\tDPDK",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The example app shows the use of TUN/TAP with DPDK, but DPDK has a built-in\nTAP PMD, so this example is obsolete and so can be removed.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n MAINTAINERS                                 |   3 -\n doc/guides/sample_app_ug/exception_path.rst | 281 ----------\n doc/guides/sample_app_ug/index.rst          |   1 -\n doc/guides/sample_app_ug/intro.rst          |   2 +-\n examples/Makefile                           |   1 -\n examples/exception_path/Makefile            |  57 --\n examples/exception_path/main.c              | 589 --------------------\n examples/exception_path/meson.build         |  11 -\n examples/meson.build                        |   2 +-\n 9 files changed, 2 insertions(+), 945 deletions(-)\n delete mode 100644 doc/guides/sample_app_ug/exception_path.rst\n delete mode 100644 examples/exception_path/Makefile\n delete mode 100644 examples/exception_path/main.c\n delete mode 100644 examples/exception_path/meson.build",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex b3d9aaddd..330a4d77d 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -1427,9 +1427,6 @@ Other Example Applications\n F: examples/ethtool/\n F: doc/guides/sample_app_ug/ethtool.rst\n \n-F: examples/exception_path/\n-F: doc/guides/sample_app_ug/exception_path.rst\n-\n M: Marko Kovacevic <marko.kovacevic@intel.com>\n F: examples/fips_validation/\n F: doc/guides/sample_app_ug/fips_validation.rst\ndiff --git a/doc/guides/sample_app_ug/exception_path.rst b/doc/guides/sample_app_ug/exception_path.rst\ndeleted file mode 100644\nindex a5590870c..000000000\n--- a/doc/guides/sample_app_ug/exception_path.rst\n+++ /dev/null\n@@ -1,281 +0,0 @@\n-..  SPDX-License-Identifier: BSD-3-Clause\n-    Copyright(c) 2010-2014 Intel Corporation.\n-\n-Exception Path Sample Application\n-=================================\n-\n-The Exception Path sample application is a simple example that demonstrates the use of the DPDK\n-to set up an exception path for packets to go through the Linux* kernel.\n-This is done by using virtual TAP network interfaces.\n-These can be read from and written to by the DPDK application and\n-appear to the kernel as a standard network interface.\n-\n-Overview\n---------\n-\n-The application creates two threads for each NIC port being used.\n-One thread reads from the port and writes the data unmodified to a thread-specific TAP interface.\n-The second thread reads from a TAP interface and writes the data unmodified to the NIC port.\n-\n-The packet flow through the exception path application is as shown in the following figure.\n-\n-.. _figure_exception_path_example:\n-\n-.. figure:: img/exception_path_example.*\n-\n-   Packet Flow\n-\n-\n-To make throughput measurements, kernel bridges must be setup to forward data between the bridges appropriately.\n-\n-Compiling the Application\n--------------------------\n-\n-To compile the sample application see :doc:`compiling`.\n-\n-The application is located in the ``exception_path`` sub-directory.\n-\n-Running the Application\n------------------------\n-\n-The application requires a number of command line options:\n-\n-.. code-block:: console\n-\n-    .build/exception_path [EAL options] -- -p PORTMASK -i IN_CORES -o OUT_CORES\n-\n-where:\n-\n-*   -p PORTMASK: A hex bitmask of ports to use\n-\n-*   -i IN_CORES: A hex bitmask of cores which read from NIC\n-\n-*   -o OUT_CORES: A hex bitmask of cores which write to NIC\n-\n-Refer to the *DPDK Getting Started Guide* for general information on running applications\n-and the Environment Abstraction Layer (EAL) options.\n-\n-The number of bits set in each bitmask must be the same.\n-The coremask -c or the corelist -l parameter of the EAL options should include IN_CORES and OUT_CORES.\n-The same bit must not be set in IN_CORES and OUT_CORES.\n-The affinities between ports and cores are set beginning with the least significant bit of each mask, that is,\n-the port represented by the lowest bit in PORTMASK is read from by the core represented by the lowest bit in IN_CORES,\n-and written to by the core represented by the lowest bit in OUT_CORES.\n-\n-For example to run the application with two ports and four cores:\n-\n-.. code-block:: console\n-\n-    ./build/exception_path -l 0-3 -n 4 -- -p 3 -i 3 -o c\n-\n-Getting Statistics\n-~~~~~~~~~~~~~~~~~~\n-\n-While the application is running, statistics on packets sent and\n-received can be displayed by sending the SIGUSR1 signal to the application from another terminal:\n-\n-.. code-block:: console\n-\n-    killall -USR1 exception_path\n-\n-The statistics can be reset by sending a SIGUSR2 signal in a similar way.\n-\n-Explanation\n------------\n-\n-The following sections provide some explanation of the code.\n-\n-Initialization\n-~~~~~~~~~~~~~~\n-\n-Setup of the mbuf pool, driver and queues is similar to the setup done in the :ref:`l2_fwd_app_real_and_virtual`.\n-In addition, the TAP interfaces must also be created.\n-A TAP interface is created for each lcore that is being used.\n-The code for creating the TAP interface is as follows:\n-\n-.. code-block:: c\n-\n-    /*\n-     *   Create a tap network interface, or use existing one with same name.\n-     *   If name[0]='\\0' then a name is automatically assigned and returned in name.\n-     */\n-\n-    static int tap_create(char *name)\n-    {\n-        struct ifreq ifr;\n-        int fd, ret;\n-\n-        fd = open(\"/dev/net/tun\", O_RDWR);\n-        if (fd < 0)\n-            return fd;\n-\n-        memset(&ifr, 0, sizeof(ifr));\n-\n-        /* TAP device without packet information */\n-\n-        ifr.ifr_flags = IFF_TAP | IFF_NO_PI;\n-        if (name && *name)\n-            rte_snprinf(ifr.ifr_name, IFNAMSIZ, name);\n-\n-        ret = ioctl(fd, TUNSETIFF, (void *) &ifr);\n-\n-        if (ret < 0) {\n-            close(fd);\n-            return ret;\n-\n-        }\n-\n-        if (name)\n-            snprintf(name, IFNAMSIZ, ifr.ifr_name);\n-\n-        return fd;\n-    }\n-\n-The other step in the initialization process that is unique to this sample application\n-is the association of each port with two cores:\n-\n-*   One core to read from the port and write to a TAP interface\n-\n-*   A second core to read from a TAP interface and write to the port\n-\n-This is done using an array called port_ids[], which is indexed by the lcore IDs.\n-The population of this array is shown below:\n-\n-.. code-block:: c\n-\n-    tx_port = 0;\n-    rx_port = 0;\n-\n-    RTE_LCORE_FOREACH(i) {\n-        if (input_cores_mask & (1ULL << i)) {\n-            /* Skip ports that are not enabled */\n-            while ((ports_mask & (1 << rx_port)) == 0) {\n-                rx_port++;\n-                if (rx_port > (sizeof(ports_mask) * 8))\n-                    goto fail; /* not enough ports */\n-            }\n-            port_ids[i] = rx_port++;\n-        } else if (output_cores_mask & (1ULL << i)) {\n-            /* Skip ports that are not enabled */\n-            while ((ports_mask & (1 << tx_port)) == 0) {\n-                tx_port++;\n-                if (tx_port > (sizeof(ports_mask) * 8))\n-                   goto fail; /* not enough ports */\n-            }\n-            port_ids[i] = tx_port++;\n-        }\n-   }\n-\n-Packet Forwarding\n-~~~~~~~~~~~~~~~~~\n-\n-After the initialization steps are complete, the main_loop() function is run on each lcore.\n-This function first checks the lcore_id against the user provided input_cores_mask and output_cores_mask to see\n-if this core is reading from or writing to a TAP interface.\n-\n-For the case that reads from a NIC port, the packet reception is the same as in the L2 Forwarding sample application\n-(see :ref:`l2_fwd_app_rx_tx_packets`).\n-The packet transmission is done by calling write() with the file descriptor of the appropriate TAP interface\n-and then explicitly freeing the mbuf back to the pool.\n-\n-..  code-block:: c\n-\n-    /* Loop forever reading from NIC and writing to tap */\n-\n-    for (;;) {\n-        struct rte_mbuf *pkts_burst[PKT_BURST_SZ];\n-        unsigned i;\n-\n-        const unsigned nb_rx = rte_eth_rx_burst(port_ids[lcore_id], 0, pkts_burst, PKT_BURST_SZ);\n-\n-        lcore_stats[lcore_id].rx += nb_rx;\n-\n-        for (i = 0; likely(i < nb_rx); i++) {\n-            struct rte_mbuf *m = pkts_burst[i];\n-            int ret = write(tap_fd, rte_pktmbuf_mtod(m, void*),\n-\n-            rte_pktmbuf_data_len(m));\n-            rte_pktmbuf_free(m);\n-            if (unlikely(ret<0))\n-                lcore_stats[lcore_id].dropped++;\n-            else\n-                lcore_stats[lcore_id].tx++;\n-        }\n-    }\n-\n-For the other case that reads from a TAP interface and writes to a NIC port,\n-packets are retrieved by doing a read() from the file descriptor of the appropriate TAP interface.\n-This fills in the data into the mbuf, then other fields are set manually.\n-The packet can then be transmitted as normal.\n-\n-.. code-block:: c\n-\n-    /* Loop forever reading from tap and writing to NIC */\n-\n-    for (;;) {\n-        int ret;\n-        struct rte_mbuf *m = rte_pktmbuf_alloc(pktmbuf_pool);\n-\n-        if (m == NULL)\n-            continue;\n-\n-        ret = read(tap_fd, m->pkt.data, MAX_PACKET_SZ); lcore_stats[lcore_id].rx++;\n-        if (unlikely(ret < 0)) {\n-            FATAL_ERROR(\"Reading from %s interface failed\", tap_name);\n-        }\n-\n-        m->pkt.nb_segs = 1;\n-        m->pkt.next = NULL;\n-        m->pkt.data_len = (uint16_t)ret;\n-\n-        ret = rte_eth_tx_burst(port_ids[lcore_id], 0, &m, 1);\n-        if (unlikely(ret < 1)) {\n-            rte_pktmuf_free(m);\n-            lcore_stats[lcore_id].dropped++;\n-        }\n-        else {\n-            lcore_stats[lcore_id].tx++;\n-        }\n-    }\n-\n-To set up loops for measuring throughput, TAP interfaces can be connected using bridging.\n-The steps to do this are described in the section that follows.\n-\n-Managing TAP Interfaces and Bridges\n-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n-\n-The Exception Path sample application creates TAP interfaces with names of the format tap_dpdk_nn,\n-where nn is the lcore ID. These TAP interfaces need to be configured for use:\n-\n-.. code-block:: console\n-\n-    ifconfig tap_dpdk_00 up\n-\n-To set up a bridge between two interfaces so that packets sent to one interface can be read from another,\n-use the brctl tool:\n-\n-.. code-block:: console\n-\n-    brctl addbr \"br0\"\n-    brctl addif br0 tap_dpdk_00\n-    brctl addif br0 tap_dpdk_03\n-    ifconfig br0 up\n-\n-The TAP interfaces created by this application exist only when the application is running,\n-so the steps above need to be repeated each time the application is run.\n-To avoid this, persistent TAP interfaces can be created using openvpn:\n-\n-.. code-block:: console\n-\n-    openvpn --mktun --dev tap_dpdk_00\n-\n-If this method is used, then the steps above have to be done only once and\n-the same TAP interfaces can be reused each time the application is run.\n-To remove bridges and persistent TAP interfaces, the following commands are used:\n-\n-.. code-block:: console\n-\n-    ifconfig br0 down\n-    brctl delbr br0\n-    openvpn --rmtun --dev tap_dpdk_00\n-\ndiff --git a/doc/guides/sample_app_ug/index.rst b/doc/guides/sample_app_ug/index.rst\nindex f23f8f59e..076346a60 100644\n--- a/doc/guides/sample_app_ug/index.rst\n+++ b/doc/guides/sample_app_ug/index.rst\n@@ -12,7 +12,6 @@ Sample Applications User Guides\n     compiling\n     cmd_line\n     ethtool\n-    exception_path\n     hello_world\n     skeleton\n     rxtx_callbacks\ndiff --git a/doc/guides/sample_app_ug/intro.rst b/doc/guides/sample_app_ug/intro.rst\nindex 90704194a..7299253bf 100644\n--- a/doc/guides/sample_app_ug/intro.rst\n+++ b/doc/guides/sample_app_ug/intro.rst\n@@ -39,7 +39,7 @@ applications that are available in the examples directory of DPDK:\n     +---------------------------------------+--------------------------------------+\n     | Ethtool                               | Precision Time Protocol (PTP) Client |\n     +---------------------------------------+--------------------------------------+\n-    | Exception Path                        | Quality of Service (QoS) Metering    |\n+    |                                       | Quality of Service (QoS) Metering    |\n     +---------------------------------------+--------------------------------------+\n     | Hello World                           | QoS Scheduler                        |\n     +---------------------------------------+--------------------------------------+\ndiff --git a/examples/Makefile b/examples/Makefile\nindex de11dd487..c756497d1 100644\n--- a/examples/Makefile\n+++ b/examples/Makefile\n@@ -17,7 +17,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_POWER),y)\n DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += distributor\n endif\n DIRS-y += ethtool\n-DIRS-y += exception_path\n DIRS-$(CONFIG_RTE_LIBRTE_EFD) += server_node_efd\n DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += fips_validation\n DIRS-$(CONFIG_RTE_LIBRTE_FLOW_CLASSIFY) += flow_classify\ndiff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile\ndeleted file mode 100644\nindex 90c7f133a..000000000\n--- a/examples/exception_path/Makefile\n+++ /dev/null\n@@ -1,57 +0,0 @@\n-# SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2010-2014 Intel Corporation\n-\n-# binary name\n-APP = exception_path\n-\n-# all source are stored in SRCS-y\n-SRCS-y := main.c\n-\n-# Build using pkg-config variables if possible\n-ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)\n-\n-all: shared\n-.PHONY: shared static\n-shared: build/$(APP)-shared\n-\tln -sf $(APP)-shared build/$(APP)\n-static: build/$(APP)-static\n-\tln -sf $(APP)-static build/$(APP)\n-\n-PKGCONF=pkg-config --define-prefix\n-\n-PC_FILE := $(shell $(PKGCONF) --path libdpdk)\n-CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)\n-LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)\n-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)\n-\n-build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build\n-\t$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)\n-\n-build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build\n-\t$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC)\n-\n-build:\n-\t@mkdir -p $@\n-\n-.PHONY: clean\n-clean:\n-\trm -f build/$(APP) build/$(APP)-static build/$(APP)-shared\n-\ttest -d build && rmdir -p build || true\n-\n-else\n-\n-ifeq ($(RTE_SDK),)\n-$(error \"Please define RTE_SDK environment variable\")\n-endif\n-\n-# Default target, detect a build directory, by looking for a path with a .config\n-RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config)))))\n-\n-include $(RTE_SDK)/mk/rte.vars.mk\n-\n-CFLAGS += -O3\n-CFLAGS += $(WERROR_FLAGS)\n-\n-include $(RTE_SDK)/mk/rte.extapp.mk\n-\n-endif\ndiff --git a/examples/exception_path/main.c b/examples/exception_path/main.c\ndeleted file mode 100644\nindex 0d79e5a24..000000000\n--- a/examples/exception_path/main.c\n+++ /dev/null\n@@ -1,589 +0,0 @@\n-/* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright(c) 2010-2014 Intel Corporation\n- */\n-\n-#include <stdio.h>\n-#include <stdlib.h>\n-#include <stdint.h>\n-#include <inttypes.h>\n-#include <string.h>\n-#include <sys/queue.h>\n-#include <stdarg.h>\n-#include <errno.h>\n-#include <getopt.h>\n-\n-#include <netinet/in.h>\n-#include <net/if.h>\n-#ifdef RTE_EXEC_ENV_LINUX\n-#include <linux/if_tun.h>\n-#endif\n-#include <fcntl.h>\n-#include <sys/ioctl.h>\n-#include <unistd.h>\n-#include <signal.h>\n-\n-#include <rte_common.h>\n-#include <rte_log.h>\n-#include <rte_memory.h>\n-#include <rte_memcpy.h>\n-#include <rte_eal.h>\n-#include <rte_per_lcore.h>\n-#include <rte_launch.h>\n-#include <rte_atomic.h>\n-#include <rte_lcore.h>\n-#include <rte_branch_prediction.h>\n-#include <rte_interrupts.h>\n-#include <rte_debug.h>\n-#include <rte_ether.h>\n-#include <rte_ethdev.h>\n-#include <rte_mempool.h>\n-#include <rte_mbuf.h>\n-#include <rte_string_fns.h>\n-#include <rte_cycles.h>\n-\n-#ifndef APP_MAX_LCORE\n-#if (RTE_MAX_LCORE > 64)\n-#define APP_MAX_LCORE 64\n-#else\n-#define APP_MAX_LCORE RTE_MAX_LCORE\n-#endif\n-#endif\n-\n-/* Macros for printing using RTE_LOG */\n-#define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1\n-#define FATAL_ERROR(fmt, args...)       rte_exit(EXIT_FAILURE, fmt \"\\n\", ##args)\n-#define PRINT_INFO(fmt, args...)        RTE_LOG(INFO, APP, fmt \"\\n\", ##args)\n-\n-/* Max ports than can be used (each port is associated with two lcores) */\n-#define MAX_PORTS               (APP_MAX_LCORE / 2)\n-\n-/* Max size of a single packet */\n-#define MAX_PACKET_SZ (2048)\n-\n-/* Size of the data buffer in each mbuf */\n-#define MBUF_DATA_SZ (MAX_PACKET_SZ + RTE_PKTMBUF_HEADROOM)\n-\n-/* Number of mbufs in mempool that is created */\n-#define NB_MBUF                 8192\n-\n-/* How many packets to attempt to read from NIC in one go */\n-#define PKT_BURST_SZ            32\n-\n-/* How many objects (mbufs) to keep in per-lcore mempool cache */\n-#define MEMPOOL_CACHE_SZ        PKT_BURST_SZ\n-\n-/* Number of RX ring descriptors */\n-#define NB_RXD                  1024\n-\n-/* Number of TX ring descriptors */\n-#define NB_TXD                  1024\n-\n-/*\n- * RX and TX Prefetch, Host, and Write-back threshold values should be\n- * carefully set for optimal performance. Consult the network\n- * controller's datasheet and supporting DPDK documentation for guidance\n- * on how these parameters should be set.\n- */\n-\n-/* Options for configuring ethernet port */\n-static struct rte_eth_conf port_conf = {\n-\t.txmode = {\n-\t\t.mq_mode = ETH_MQ_TX_NONE,\n-\t},\n-};\n-\n-/* Mempool for mbufs */\n-static struct rte_mempool * pktmbuf_pool = NULL;\n-\n-/* Mask of enabled ports */\n-static uint32_t ports_mask = 0;\n-\n-/* Mask of cores that read from NIC and write to tap */\n-static uint64_t input_cores_mask = 0;\n-\n-/* Mask of cores that read from tap and write to NIC */\n-static uint64_t output_cores_mask = 0;\n-\n-/* Array storing port_id that is associated with each lcore */\n-static uint16_t port_ids[APP_MAX_LCORE];\n-\n-/* Structure type for recording lcore-specific stats */\n-struct stats {\n-\tuint64_t rx;\n-\tuint64_t tx;\n-\tuint64_t dropped;\n-} __rte_cache_aligned;\n-\n-/* Array of lcore-specific stats */\n-static struct stats lcore_stats[APP_MAX_LCORE];\n-\n-/* Print out statistics on packets handled */\n-static void\n-print_stats(void)\n-{\n-\tunsigned i;\n-\n-\tprintf(\"\\n**Exception-Path example application statistics**\\n\"\n-\t       \"=======  ======  ============  ============  ===============\\n\"\n-\t       \" Lcore    Port            RX            TX    Dropped on TX\\n\"\n-\t       \"-------  ------  ------------  ------------  ---------------\\n\");\n-\tRTE_LCORE_FOREACH(i) {\n-\t\t/* limit ourselves to application supported cores only */\n-\t\tif (i >= APP_MAX_LCORE)\n-\t\t\tbreak;\n-\t\tprintf(\"%6u %7u %13\"PRIu64\" %13\"PRIu64\" %16\"PRIu64\"\\n\",\n-\t\t       i, (unsigned)port_ids[i],\n-\t\t       lcore_stats[i].rx, lcore_stats[i].tx,\n-\t\t       lcore_stats[i].dropped);\n-\t}\n-\tprintf(\"=======  ======  ============  ============  ===============\\n\");\n-}\n-\n-/* Custom handling of signals to handle stats */\n-static void\n-signal_handler(int signum)\n-{\n-\t/* When we receive a USR1 signal, print stats */\n-\tif (signum == SIGUSR1) {\n-\t\tprint_stats();\n-\t}\n-\n-\t/* When we receive a USR2 signal, reset stats */\n-\tif (signum == SIGUSR2) {\n-\t\tmemset(&lcore_stats, 0, sizeof(lcore_stats));\n-\t\tprintf(\"\\n**Statistics have been reset**\\n\");\n-\t\treturn;\n-\t}\n-}\n-\n-#ifdef RTE_EXEC_ENV_LINUX\n-/*\n- * Create a tap network interface, or use existing one with same name.\n- * If name[0]='\\0' then a name is automatically assigned and returned in name.\n- */\n-static int tap_create(char *name)\n-{\n-\tstruct ifreq ifr;\n-\tint fd, ret;\n-\n-\tfd = open(\"/dev/net/tun\", O_RDWR);\n-\tif (fd < 0)\n-\t\treturn fd;\n-\n-\tmemset(&ifr, 0, sizeof(ifr));\n-\n-\t/* TAP device without packet information */\n-\tifr.ifr_flags = IFF_TAP | IFF_NO_PI;\n-\n-\tif (name && *name)\n-\t\tstrlcpy(ifr.ifr_name, name, IFNAMSIZ);\n-\n-\tret = ioctl(fd, TUNSETIFF, (void *) &ifr);\n-\tif (ret < 0) {\n-\t\tclose(fd);\n-\t\treturn ret;\n-\t}\n-\n-\tif (name)\n-\t\tstrlcpy(name, ifr.ifr_name, IFNAMSIZ);\n-\n-\treturn fd;\n-}\n-#else\n-/*\n- * Find a free tap network interface, or create a new one.\n- * The name is automatically assigned and returned in name.\n- */\n-static int tap_create(char *name)\n-{\n-\tint i, fd = -1;\n-\tchar devname[PATH_MAX];\n-\n-\tfor (i = 0; i < 255; i++) {\n-\t\tsnprintf(devname, sizeof(devname), \"/dev/tap%d\", i);\n-\t\tfd = open(devname, O_RDWR);\n-\t\tif (fd >= 0 || errno != EBUSY)\n-\t\t\tbreak;\n-\t}\n-\n-\tif (name)\n-\t\tsnprintf(name, IFNAMSIZ, \"tap%d\", i);\n-\n-\treturn fd;\n-}\n-#endif\n-\n-/* Main processing loop */\n-static int\n-main_loop(__attribute__((unused)) void *arg)\n-{\n-\tconst unsigned lcore_id = rte_lcore_id();\n-\tchar tap_name[IFNAMSIZ];\n-\tint tap_fd;\n-\n-\tif ((1ULL << lcore_id) & input_cores_mask) {\n-\t\t/* Create new tap interface */\n-\t\tsnprintf(tap_name, IFNAMSIZ, \"tap_dpdk_%.2u\", lcore_id);\n-\t\ttap_fd = tap_create(tap_name);\n-\t\tif (tap_fd < 0)\n-\t\t\tFATAL_ERROR(\"Could not create tap interface \\\"%s\\\" (%d)\",\n-\t\t\t\t\ttap_name, tap_fd);\n-\n-\t\tPRINT_INFO(\"Lcore %u is reading from port %u and writing to %s\",\n-\t\t           lcore_id, (unsigned)port_ids[lcore_id], tap_name);\n-\t\tfflush(stdout);\n-\t\t/* Loop forever reading from NIC and writing to tap */\n-\t\tfor (;;) {\n-\t\t\tstruct rte_mbuf *pkts_burst[PKT_BURST_SZ];\n-\t\t\tunsigned i;\n-\t\t\tconst unsigned nb_rx =\n-\t\t\t\t\trte_eth_rx_burst(port_ids[lcore_id], 0,\n-\t\t\t\t\t    pkts_burst, PKT_BURST_SZ);\n-\t\t\tlcore_stats[lcore_id].rx += nb_rx;\n-\t\t\tfor (i = 0; likely(i < nb_rx); i++) {\n-\t\t\t\tstruct rte_mbuf *m = pkts_burst[i];\n-\t\t\t\t/* Ignore return val from write() */\n-\t\t\t\tint ret = write(tap_fd,\n-\t\t\t\t                rte_pktmbuf_mtod(m, void*),\n-\t\t\t\t                rte_pktmbuf_data_len(m));\n-\t\t\t\trte_pktmbuf_free(m);\n-\t\t\t\tif (unlikely(ret < 0))\n-\t\t\t\t\tlcore_stats[lcore_id].dropped++;\n-\t\t\t\telse\n-\t\t\t\t\tlcore_stats[lcore_id].tx++;\n-\t\t\t}\n-\t\t}\n-\t}\n-\telse if ((1ULL << lcore_id) & output_cores_mask) {\n-\t\t/* Create new tap interface */\n-\t\tsnprintf(tap_name, IFNAMSIZ, \"tap_dpdk_%.2u\", lcore_id);\n-\t\ttap_fd = tap_create(tap_name);\n-\t\tif (tap_fd < 0)\n-\t\t\tFATAL_ERROR(\"Could not create tap interface \\\"%s\\\" (%d)\",\n-\t\t\t\t\ttap_name, tap_fd);\n-\n-\t\tPRINT_INFO(\"Lcore %u is reading from %s and writing to port %u\",\n-\t\t           lcore_id, tap_name, (unsigned)port_ids[lcore_id]);\n-\t\tfflush(stdout);\n-\t\t/* Loop forever reading from tap and writing to NIC */\n-\t\tfor (;;) {\n-\t\t\tint ret;\n-\t\t\tstruct rte_mbuf *m = rte_pktmbuf_alloc(pktmbuf_pool);\n-\t\t\tif (m == NULL)\n-\t\t\t\tcontinue;\n-\n-\t\t\tret = read(tap_fd, rte_pktmbuf_mtod(m, void *),\n-\t\t\t\tMAX_PACKET_SZ);\n-\t\t\tlcore_stats[lcore_id].rx++;\n-\t\t\tif (unlikely(ret < 0)) {\n-\t\t\t\tFATAL_ERROR(\"Reading from %s interface failed\",\n-\t\t\t\t            tap_name);\n-\t\t\t}\n-\t\t\tm->nb_segs = 1;\n-\t\t\tm->next = NULL;\n-\t\t\tm->pkt_len = (uint16_t)ret;\n-\t\t\tm->data_len = (uint16_t)ret;\n-\t\t\tret = rte_eth_tx_burst(port_ids[lcore_id], 0, &m, 1);\n-\t\t\tif (unlikely(ret < 1)) {\n-\t\t\t\trte_pktmbuf_free(m);\n-\t\t\t\tlcore_stats[lcore_id].dropped++;\n-\t\t\t}\n-\t\t\telse {\n-\t\t\t\tlcore_stats[lcore_id].tx++;\n-\t\t\t}\n-\t\t}\n-\t}\n-\telse {\n-\t\tPRINT_INFO(\"Lcore %u has nothing to do\", lcore_id);\n-\t\treturn 0;\n-\t}\n-\t/*\n-\t * Tap file is closed automatically when program exits. Putting close()\n-\t * here will cause the compiler to give an error about unreachable code.\n-\t */\n-}\n-\n-/* Display usage instructions */\n-static void\n-print_usage(const char *prgname)\n-{\n-\tPRINT_INFO(\"\\nUsage: %s [EAL options] -- -p PORTMASK -i IN_CORES -o OUT_CORES\\n\"\n-\t           \"    -p PORTMASK: hex bitmask of ports to use\\n\"\n-\t           \"    -i IN_CORES: hex bitmask of cores which read from NIC\\n\"\n-\t           \"    -o OUT_CORES: hex bitmask of cores which write to NIC\",\n-\t           prgname);\n-}\n-\n-/* Convert string to unsigned number. 0 is returned if error occurs */\n-static uint64_t\n-parse_unsigned(const char *portmask)\n-{\n-\tchar *end = NULL;\n-\tuint64_t num;\n-\n-\tnum = strtoull(portmask, &end, 16);\n-\tif ((portmask[0] == '\\0') || (end == NULL) || (*end != '\\0'))\n-\t\treturn 0;\n-\n-\treturn (uint64_t)num;\n-}\n-\n-/* Record affinities between ports and lcores in global port_ids[] array */\n-static void\n-setup_port_lcore_affinities(void)\n-{\n-\tunsigned long i;\n-\tuint16_t tx_port = 0;\n-\tuint16_t rx_port = 0;\n-\n-\t/* Setup port_ids[] array, and check masks were ok */\n-\tfor (i = 0; i < APP_MAX_LCORE; i++) {\n-\t\tif (!rte_lcore_is_enabled(i))\n-\t\t\tcontinue;\n-\t\tif (input_cores_mask & (1ULL << i)) {\n-\t\t\t/* Skip ports that are not enabled */\n-\t\t\twhile ((ports_mask & (1 << rx_port)) == 0) {\n-\t\t\t\trx_port++;\n-\t\t\t\tif (rx_port > (sizeof(ports_mask) * 8))\n-\t\t\t\t\tgoto fail; /* not enough ports */\n-\t\t\t}\n-\n-\t\t\tport_ids[i] = rx_port++;\n-\t\t} else if (output_cores_mask & (1ULL << (i & 0x3f))) {\n-\t\t\t/* Skip ports that are not enabled */\n-\t\t\twhile ((ports_mask & (1 << tx_port)) == 0) {\n-\t\t\t\ttx_port++;\n-\t\t\t\tif (tx_port > (sizeof(ports_mask) * 8))\n-\t\t\t\t\tgoto fail; /* not enough ports */\n-\t\t\t}\n-\n-\t\t\tport_ids[i] = tx_port++;\n-\t\t}\n-\t}\n-\n-\tif (rx_port != tx_port)\n-\t\tgoto fail; /* uneven number of cores in masks */\n-\n-\tif (ports_mask & (~((1 << rx_port) - 1)))\n-\t\tgoto fail; /* unused ports */\n-\n-\treturn;\n-fail:\n-\tFATAL_ERROR(\"Invalid core/port masks specified on command line\");\n-}\n-\n-/* Parse the arguments given in the command line of the application */\n-static void\n-parse_args(int argc, char **argv)\n-{\n-\tint opt;\n-\tconst char *prgname = argv[0];\n-\n-\t/* Disable printing messages within getopt() */\n-\topterr = 0;\n-\n-\t/* Parse command line */\n-\twhile ((opt = getopt(argc, argv, \"i:o:p:\")) != EOF) {\n-\t\tswitch (opt) {\n-\t\tcase 'i':\n-\t\t\tinput_cores_mask = parse_unsigned(optarg);\n-\t\t\tbreak;\n-\t\tcase 'o':\n-\t\t\toutput_cores_mask = parse_unsigned(optarg);\n-\t\t\tbreak;\n-\t\tcase 'p':\n-\t\t\tports_mask = parse_unsigned(optarg);\n-\t\t\tbreak;\n-\t\tdefault:\n-\t\t\tprint_usage(prgname);\n-\t\t\tFATAL_ERROR(\"Invalid option specified\");\n-\t\t}\n-\t}\n-\n-\t/* Check that options were parsed ok */\n-\tif (input_cores_mask == 0) {\n-\t\tprint_usage(prgname);\n-\t\tFATAL_ERROR(\"IN_CORES not specified correctly\");\n-\t}\n-\tif (output_cores_mask == 0) {\n-\t\tprint_usage(prgname);\n-\t\tFATAL_ERROR(\"OUT_CORES not specified correctly\");\n-\t}\n-\tif (ports_mask == 0) {\n-\t\tprint_usage(prgname);\n-\t\tFATAL_ERROR(\"PORTMASK not specified correctly\");\n-\t}\n-\n-\tsetup_port_lcore_affinities();\n-}\n-\n-/* Initialise a single port on an Ethernet device */\n-static void\n-init_port(uint16_t port)\n-{\n-\tint ret;\n-\tuint16_t nb_rxd = NB_RXD;\n-\tuint16_t nb_txd = NB_TXD;\n-\tstruct rte_eth_dev_info dev_info;\n-\tstruct rte_eth_rxconf rxq_conf;\n-\tstruct rte_eth_txconf txq_conf;\n-\tstruct rte_eth_conf local_port_conf = port_conf;\n-\n-\t/* Initialise device and RX/TX queues */\n-\tPRINT_INFO(\"Initialising port %u ...\", port);\n-\tfflush(stdout);\n-\trte_eth_dev_info_get(port, &dev_info);\n-\tif (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)\n-\t\tlocal_port_conf.txmode.offloads |=\n-\t\t\tDEV_TX_OFFLOAD_MBUF_FAST_FREE;\n-\tret = rte_eth_dev_configure(port, 1, 1, &local_port_conf);\n-\tif (ret < 0)\n-\t\tFATAL_ERROR(\"Could not configure port%u (%d)\", port, ret);\n-\n-\tret = rte_eth_dev_adjust_nb_rx_tx_desc(port, &nb_rxd, &nb_txd);\n-\tif (ret < 0)\n-\t\tFATAL_ERROR(\"Could not adjust number of descriptors for port%u (%d)\",\n-\t\t\t    port, ret);\n-\n-\trxq_conf = dev_info.default_rxconf;\n-\trxq_conf.offloads = local_port_conf.rxmode.offloads;\n-\tret = rte_eth_rx_queue_setup(port, 0, nb_rxd,\n-\t\t\t\trte_eth_dev_socket_id(port),\n-\t\t\t\t&rxq_conf,\n-\t\t\t\tpktmbuf_pool);\n-\tif (ret < 0)\n-\t\tFATAL_ERROR(\"Could not setup up RX queue for port%u (%d)\",\n-\t\t\t\tport, ret);\n-\n-\ttxq_conf = dev_info.default_txconf;\n-\ttxq_conf.offloads = local_port_conf.txmode.offloads;\n-\tret = rte_eth_tx_queue_setup(port, 0, nb_txd,\n-\t\t\t\trte_eth_dev_socket_id(port),\n-\t\t\t\t&txq_conf);\n-\tif (ret < 0)\n-\t\tFATAL_ERROR(\"Could not setup up TX queue for port%u (%d)\",\n-\t\t\t\tport, ret);\n-\n-\tret = rte_eth_dev_start(port);\n-\tif (ret < 0)\n-\t\tFATAL_ERROR(\"Could not start port%u (%d)\", port, ret);\n-\n-\trte_eth_promiscuous_enable(port);\n-}\n-\n-/* Check the link status of all ports in up to 9s, and print them finally */\n-static void\n-check_all_ports_link_status(uint32_t port_mask)\n-{\n-#define CHECK_INTERVAL 100 /* 100ms */\n-#define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */\n-\tuint16_t portid;\n-\tuint8_t count, all_ports_up, print_flag = 0;\n-\tstruct rte_eth_link link;\n-\n-\tprintf(\"\\nChecking link status\");\n-\tfflush(stdout);\n-\tfor (count = 0; count <= MAX_CHECK_TIME; count++) {\n-\t\tall_ports_up = 1;\n-\t\tRTE_ETH_FOREACH_DEV(portid) {\n-\t\t\tif ((port_mask & (1 << portid)) == 0)\n-\t\t\t\tcontinue;\n-\t\t\tmemset(&link, 0, sizeof(link));\n-\t\t\trte_eth_link_get_nowait(portid, &link);\n-\t\t\t/* print link status if flag set */\n-\t\t\tif (print_flag == 1) {\n-\t\t\t\tif (link.link_status)\n-\t\t\t\t\tprintf(\n-\t\t\t\t\t\"Port%d Link Up. Speed %u Mbps - %s\\n\",\n-\t\t\t\t\t\tportid, link.link_speed,\n-\t\t\t\t(link.link_duplex == ETH_LINK_FULL_DUPLEX) ?\n-\t\t\t\t\t(\"full-duplex\") : (\"half-duplex\\n\"));\n-\t\t\t\telse\n-\t\t\t\t\tprintf(\"Port %d Link Down\\n\", portid);\n-\t\t\t\tcontinue;\n-\t\t\t}\n-\t\t\t/* clear all_ports_up flag if any link down */\n-\t\t\tif (link.link_status == ETH_LINK_DOWN) {\n-\t\t\t\tall_ports_up = 0;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t}\n-\t\t/* after finally printing all link status, get out */\n-\t\tif (print_flag == 1)\n-\t\t\tbreak;\n-\n-\t\tif (all_ports_up == 0) {\n-\t\t\tprintf(\".\");\n-\t\t\tfflush(stdout);\n-\t\t\trte_delay_ms(CHECK_INTERVAL);\n-\t\t}\n-\n-\t\t/* set the print_flag if all ports up or timeout */\n-\t\tif (all_ports_up == 1 || count == (MAX_CHECK_TIME - 1)) {\n-\t\t\tprint_flag = 1;\n-\t\t\tprintf(\"done\\n\");\n-\t\t}\n-\t}\n-}\n-\n-/* Initialise ports/queues etc. and start main loop on each core */\n-int\n-main(int argc, char** argv)\n-{\n-\tint ret;\n-\tunsigned i,high_port;\n-\tuint16_t nb_sys_ports, port;\n-\n-\t/* Associate signal_hanlder function with USR signals */\n-\tsignal(SIGUSR1, signal_handler);\n-\tsignal(SIGUSR2, signal_handler);\n-\n-\t/* Initialise EAL */\n-\tret = rte_eal_init(argc, argv);\n-\tif (ret < 0)\n-\t\tFATAL_ERROR(\"Could not initialise EAL (%d)\", ret);\n-\targc -= ret;\n-\targv += ret;\n-\n-\t/* Parse application arguments (after the EAL ones) */\n-\tparse_args(argc, argv);\n-\n-\t/* Create the mbuf pool */\n-\tpktmbuf_pool = rte_pktmbuf_pool_create(\"mbuf_pool\", NB_MBUF,\n-\t\t\tMEMPOOL_CACHE_SZ, 0, MBUF_DATA_SZ, rte_socket_id());\n-\tif (pktmbuf_pool == NULL) {\n-\t\tFATAL_ERROR(\"Could not initialise mbuf pool\");\n-\t\treturn -1;\n-\t}\n-\n-\t/* Get number of ports found in scan */\n-\tnb_sys_ports = rte_eth_dev_count_avail();\n-\tif (nb_sys_ports == 0)\n-\t\tFATAL_ERROR(\"No supported Ethernet device found\");\n-\t/* Find highest port set in portmask */\n-\tfor (high_port = (sizeof(ports_mask) * 8) - 1;\n-\t\t\t(high_port != 0) && !(ports_mask & (1 << high_port));\n-\t\t\thigh_port--)\n-\t\t; /* empty body */\n-\tif (high_port > nb_sys_ports)\n-\t\tFATAL_ERROR(\"Port mask requires more ports than available\");\n-\n-\t/* Initialise each port */\n-\tRTE_ETH_FOREACH_DEV(port) {\n-\t\t/* Skip ports that are not enabled */\n-\t\tif ((ports_mask & (1 << port)) == 0) {\n-\t\t\tcontinue;\n-\t\t}\n-\t\tinit_port(port);\n-\t}\n-\tcheck_all_ports_link_status(ports_mask);\n-\n-\t/* Launch per-lcore function on every lcore */\n-\trte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER);\n-\tRTE_LCORE_FOREACH_SLAVE(i) {\n-\t\tif (rte_eal_wait_lcore(i) < 0)\n-\t\t\treturn -1;\n-\t}\n-\n-\treturn 0;\n-}\ndiff --git a/examples/exception_path/meson.build b/examples/exception_path/meson.build\ndeleted file mode 100644\nindex c34e11e36..000000000\n--- a/examples/exception_path/meson.build\n+++ /dev/null\n@@ -1,11 +0,0 @@\n-# SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2017 Intel Corporation\n-\n-# meson file, for building this example as part of a main DPDK build.\n-#\n-# To build this example as a standalone application with an already-installed\n-# DPDK instance, use 'make'\n-\n-sources = files(\n-\t'main.c'\n-)\ndiff --git a/examples/meson.build b/examples/meson.build\nindex a046b74ad..4663d9dea 100644\n--- a/examples/meson.build\n+++ b/examples/meson.build\n@@ -13,7 +13,7 @@ all_examples = [\n \t'bbdev_app', 'bond',\n \t'bpf', 'cmdline',\n \t'distributor', 'ethtool',\n-\t'eventdev_pipeline', 'exception_path',\n+\t'eventdev_pipeline',\n \t'fips_validation', 'flow_classify',\n \t'flow_filtering', 'helloworld',\n \t'ip_fragmentation', 'ip_pipeline',\n",
    "prefixes": [
        "1/6"
    ]
}