Show 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": "https://patches.dpdk.org/api/patches/3/?format=api",
    "web_url": "https://patches.dpdk.org/patch/3/",
    "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"
    },
    "msgid": "<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": "https://patches.dpdk.org/api/people/5/?format=api",
        "name": "Saori USAMI",
        "email": "susami@igel.co.jp"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/3/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/3/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/3/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "Return-Path": "<susami@igel.co.jp>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "To": "dev@dpdk.org",
        "Date": "Fri,  5 Sep 2014 19:10:36 +0900",
        "Precedence": "list",
        "Message-Id": "<1409911836-17294-1-git-send-email-susami@igel.co.jp>",
        "X-Mailer": "git-send-email 1.9.1",
        "X-Gm-Message-State": "ALoCoQlcA2N/Q5S8LPJGLf5SpwDBfSlhxOGDF2pQDmBaqIqdgJKAEiIDJmz3odLHE0vHC1vKqDb3",
        "From": "Saori USAMI <susami@igel.co.jp>",
        "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",
        "X-Received": "by 10.66.65.202 with SMTP id z10mr19737561pas.20.1409911883856; \n\tFri, 05 Sep 2014 03:11:23 -0700 (PDT)",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Subject": "[dpdk-dev] [PATCH] pcap: set in_port value in packet mbuf data when\n\teach packet is received",
        "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-Mailman-Version": "2.1.15",
        "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==",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>"
    },
    "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"
    ]
}