get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 21278,
    "url": "http://patches.dpdk.org/api/patches/21278/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20743012cc151e3dfd30eff7ef0f6a03b75ac0c9.1488537600.git.pascal.mazon@6wind.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20743012cc151e3dfd30eff7ef0f6a03b75ac0c9.1488537600.git.pascal.mazon@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20743012cc151e3dfd30eff7ef0f6a03b75ac0c9.1488537600.git.pascal.mazon@6wind.com",
    "date": "2017-03-03T10:45:54",
    "name": "[dpdk-dev,1/4] net/tap: move private elements to external header",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "01299fe0231cf925ad1c3fec9dfa4343e3a1afa3",
    "submitter": {
        "id": 657,
        "url": "http://patches.dpdk.org/api/people/657/?format=api",
        "name": "Pascal Mazon",
        "email": "pascal.mazon@6wind.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20743012cc151e3dfd30eff7ef0f6a03b75ac0c9.1488537600.git.pascal.mazon@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/21278/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/21278/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 2BA0D37B0;\n\tFri,  3 Mar 2017 11:46:30 +0100 (CET)",
            "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n\t[62.23.145.76]) by dpdk.org (Postfix) with ESMTP id BFACC2B93\n\tfor <dev@dpdk.org>; Fri,  3 Mar 2017 11:46:11 +0100 (CET)",
            "from 6wind.com (unknown [10.16.0.184])\n\tby proxy.6wind.com (Postfix) with SMTP id 19D1024CBA;\n\tFri,  3 Mar 2017 11:46:06 +0100 (CET)",
            "by 6wind.com (sSMTP sendmail emulation);\n\tFri, 03 Mar 2017 11:46:04 +0100"
        ],
        "From": "Pascal Mazon <pascal.mazon@6wind.com>",
        "To": "keith.wiles@intel.com",
        "Cc": "dev@dpdk.org,\n\tPascal Mazon <pascal.mazon@6wind.com>",
        "Date": "Fri,  3 Mar 2017 11:45:54 +0100",
        "Message-Id": "<20743012cc151e3dfd30eff7ef0f6a03b75ac0c9.1488537600.git.pascal.mazon@6wind.com>",
        "X-Mailer": "git-send-email 2.8.0.rc0",
        "In-Reply-To": "<cover.1488537600.git.pascal.mazon@6wind.com>",
        "References": "<cover.1488537600.git.pascal.mazon@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH 1/4] net/tap: move private elements to external\n\theader",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "In the next patch, access to struct pmd_internals will be necessary in\ntap_flow.c to store the flows.\n\nSigned-off-by: Pascal Mazon <pascal.mazon@6wind.com>\nAcked-by: Olga Shern <olgas@mellanox.com>\n---\n drivers/net/tap/Makefile      |  1 +\n drivers/net/tap/rte_eth_tap.c | 34 ++------------------\n drivers/net/tap/tap.h         | 73 +++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 76 insertions(+), 32 deletions(-)\n create mode 100644 drivers/net/tap/tap.h",
    "diff": "diff --git a/drivers/net/tap/Makefile b/drivers/net/tap/Makefile\nindex e18f30c56f52..bdbe69e62a4e 100644\n--- a/drivers/net/tap/Makefile\n+++ b/drivers/net/tap/Makefile\n@@ -40,6 +40,7 @@ EXPORT_MAP := rte_pmd_tap_version.map\n LIBABIVER := 1\n \n CFLAGS += -O3\n+CFLAGS += -I$(SRCDIR)\n CFLAGS += $(WERROR_FLAGS)\n \n #\ndiff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c\nindex 3fd057225ab3..fa57d645f3b1 100644\n--- a/drivers/net/tap/rte_eth_tap.c\n+++ b/drivers/net/tap/rte_eth_tap.c\n@@ -51,6 +51,8 @@\n #include <linux/if_ether.h>\n #include <fcntl.h>\n \n+#include <tap.h>\n+\n /* Linux based path to the TUN device */\n #define TUN_TAP_DEV_PATH        \"/dev/net/tun\"\n #define DEFAULT_TAP_NAME        \"dtap\"\n@@ -83,38 +85,6 @@ static struct rte_eth_link pmd_link = {\n \t.link_autoneg = ETH_LINK_SPEED_AUTONEG\n };\n \n-struct pkt_stats {\n-\tuint64_t opackets;\t\t/* Number of output packets */\n-\tuint64_t ipackets;\t\t/* Number of input packets */\n-\tuint64_t obytes;\t\t/* Number of bytes on output */\n-\tuint64_t ibytes;\t\t/* Number of bytes on input */\n-\tuint64_t errs;\t\t\t/* Number of error packets */\n-};\n-\n-struct rx_queue {\n-\tstruct rte_mempool *mp;\t\t/* Mempool for RX packets */\n-\tuint16_t in_port;\t\t/* Port ID */\n-\tint fd;\n-\n-\tstruct pkt_stats stats;\t\t/* Stats for this RX queue */\n-};\n-\n-struct tx_queue {\n-\tint fd;\n-\tstruct pkt_stats stats;\t\t/* Stats for this TX queue */\n-};\n-\n-struct pmd_internals {\n-\tchar name[RTE_ETH_NAME_MAX_LEN];\t/* Internal Tap device name */\n-\tuint16_t nb_queues;\t\t/* Number of queues supported */\n-\tstruct ether_addr eth_addr;\t/* Mac address of the device port */\n-\n-\tint if_index;\t\t\t/* IF_INDEX for the port */\n-\n-\tstruct rx_queue rxq[RTE_PMD_TAP_MAX_QUEUES];\t/* List of RX queues */\n-\tstruct tx_queue txq[RTE_PMD_TAP_MAX_QUEUES];\t/* List of TX queues */\n-};\n-\n /* Tun/Tap allocation routine\n  *\n  * name is the number of the interface to use, unless NULL to take the host\ndiff --git a/drivers/net/tap/tap.h b/drivers/net/tap/tap.h\nnew file mode 100644\nindex 000000000000..88f62b895feb\n--- /dev/null\n+++ b/drivers/net/tap/tap.h\n@@ -0,0 +1,73 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright 2017 6WIND S.A.\n+ *   Copyright 2017 Mellanox.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of 6WIND S.A. nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#ifndef _TAP_H_\n+#define _TAP_H_\n+\n+#include <inttypes.h>\n+\n+#include <rte_ethdev.h>\n+#include <rte_ether.h>\n+\n+#define RTE_PMD_TAP_MAX_QUEUES 16\n+\n+struct pkt_stats {\n+\tuint64_t opackets; /* Number of output packets */\n+\tuint64_t ipackets; /* Number of input packets */\n+\tuint64_t obytes; /* Number of bytes on output */\n+\tuint64_t ibytes; /* Number of bytes on input */\n+\tuint64_t errs; /* Number of error packets */\n+};\n+\n+struct rx_queue {\n+\tstruct rte_mempool *mp; /* Mempool for RX packets */\n+\tuint16_t in_port; /* Port ID */\n+\tint fd;\n+\tstruct pkt_stats stats; /* Stats for this RX queue */\n+};\n+\n+struct tx_queue {\n+\tint fd;\n+\tstruct pkt_stats stats; /* Stats for this TX queue */\n+};\n+\n+struct pmd_internals {\n+\tchar name[RTE_ETH_NAME_MAX_LEN]; /* Internal Tap device name */\n+\tuint16_t nb_queues; /* Number of queues supported */\n+\tstruct ether_addr eth_addr; /* Mac address of the device port */\n+\tint if_index; /* IF_INDEX for the port */\n+\tstruct rx_queue rxq[RTE_PMD_TAP_MAX_QUEUES]; /* List of RX queues */\n+\tstruct tx_queue txq[RTE_PMD_TAP_MAX_QUEUES]; /* List of TX queues */\n+};\n+\n+#endif /* _TAP_H_ */\n",
    "prefixes": [
        "dpdk-dev",
        "1/4"
    ]
}