get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 3,
    "url": "http://patches.dpdk.org/api/patches/3/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1409911836-17294-1-git-send-email-susami@igel.co.jp/",
    "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": "<1409911836-17294-1-git-send-email-susami@igel.co.jp>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1409911836-17294-1-git-send-email-susami@igel.co.jp",
    "date": "2014-09-05T10:10:36",
    "name": "[dpdk-dev] pcap: set in_port value in packet mbuf data when each packet is received",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "12122839adfefd25f3a2cfa0e342836092964f31",
    "submitter": {
        "id": 5,
        "url": "http://patches.dpdk.org/api/people/5/?format=api",
        "name": "Saori USAMI",
        "email": "susami@igel.co.jp"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1409911836-17294-1-git-send-email-susami@igel.co.jp/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/3/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/3/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<susami@igel.co.jp>",
        "Received": [
            "from mail-ig0-f174.google.com (mail-ig0-f174.google.com\n\t[209.85.213.174]) by dpdk.org (Postfix) with ESMTP id 62BF468C2\n\tfor <dev@dpdk.org>; Fri,  5 Sep 2014 12:06:40 +0200 (CEST)",
            "by mail-ig0-f174.google.com with SMTP id a13so724912igq.1\n\tfor <dev@dpdk.org>; Fri, 05 Sep 2014 03:11:24 -0700 (PDT)",
            "from Negima.hq.igel.co.jp ([219.106.231.132])\n\tby mx.google.com with ESMTPSA id\n\tge5sm1339762pbc.81.2014.09.05.03.11.21 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tFri, 05 Sep 2014 03:11:22 -0700 (PDT)"
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=Iuzsfo0o+gLAAjXQ94jI7hYRih+C2BBGwutRrOYJTTw=;\n\tb=bCC94ukUm4E5E5nicAUuQirBLnKCVc5TvJXjnbNKMMAsa/9gkckBAVaDBjTSTPL3wj\n\tw/CBoAz7VN/OJaC98Do/FBVXRtooBd6200ZllEDiCScRHYKJNWMCUcG9Q5DyWjnAbi6A\n\t/xm4PSB5bOSRgHAvdMF2N5UfITIf1/Hup9TblTl8I9Vbz8+331AfR8ZCs5aG97EH3OEw\n\tu1FY1P5BsJRAVqVPsCwBfwS7LGeZXTnCw8UV3E+l4lZfrYeCGfTbp5ySKXwV2Xu+wbnA\n\tFVu6rKey23wqGzlhxDWjdnmMAgYRjYloYqWwwdsiDGmQyijKWxoHOtXTwKh4YgO6mcIP\n\tXbUQ==",
        "X-Gm-Message-State": "ALoCoQlcA2N/Q5S8LPJGLf5SpwDBfSlhxOGDF2pQDmBaqIqdgJKAEiIDJmz3odLHE0vHC1vKqDb3",
        "X-Received": "by 10.66.65.202 with SMTP id z10mr19737561pas.20.1409911883856; \n\tFri, 05 Sep 2014 03:11:23 -0700 (PDT)",
        "From": "Saori USAMI <susami@igel.co.jp>",
        "To": "dev@dpdk.org",
        "Date": "Fri,  5 Sep 2014 19:10:36 +0900",
        "Message-Id": "<1409911836-17294-1-git-send-email-susami@igel.co.jp>",
        "X-Mailer": "git-send-email 1.9.1",
        "Subject": "[dpdk-dev] [PATCH] pcap: set in_port value in packet mbuf data when\n\teach packet is received",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <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>",
        "X-List-Received-Date": "Fri, 05 Sep 2014 10:06:40 -0000"
    },
    "content": "The pkt.in_port parameter in mbuf should be set with an input port id\nbecause DPDK apps may use it to know where each packet came from.\n\nSigned-off-by: Saori USAMI <susami@igel.co.jp>\n---\n lib/librte_pmd_pcap/rte_eth_pcap.c | 3 +++\n 1 file changed, 3 insertions(+)",
    "diff": "diff --git a/lib/librte_pmd_pcap/rte_eth_pcap.c b/lib/librte_pmd_pcap/rte_eth_pcap.c\nindex eebe768..cfd3de4 100644\n--- a/lib/librte_pmd_pcap/rte_eth_pcap.c\n+++ b/lib/librte_pmd_pcap/rte_eth_pcap.c\n@@ -63,6 +63,7 @@ static uint64_t hz;\n \n struct pcap_rx_queue {\n \tpcap_t *pcap;\n+\tuint8_t in_port;\n \tstruct rte_mempool *mb_pool;\n \tvolatile unsigned long rx_pkts;\n \tvolatile unsigned long err_pkts;\n@@ -154,6 +155,7 @@ eth_pcap_rx(void *queue,\n \t\t\trte_memcpy(mbuf->pkt.data, packet, header.len);\n \t\t\tmbuf->pkt.data_len = (uint16_t)header.len;\n \t\t\tmbuf->pkt.pkt_len = mbuf->pkt.data_len;\n+\t\t\tmbuf->pkt.in_port = pcap_q->in_port;\n \t\t\tbufs[num_rx] = mbuf;\n \t\t\tnum_rx++;\n \t\t} else {\n@@ -373,6 +375,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,\n \tstruct pcap_rx_queue *pcap_q = &internals->rx_queue[rx_queue_id];\n \tpcap_q->mb_pool = mb_pool;\n \tdev->data->rx_queues[rx_queue_id] = pcap_q;\n+\tpcap_q->in_port = dev->data->port_id;\n \treturn 0;\n }\n \n",
    "prefixes": [
        "dpdk-dev"
    ]
}