get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 18816,
    "url": "http://patches.dpdk.org/api/patches/18816/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1483475171-20387-4-git-send-email-ciwillia@brocade.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": "<1483475171-20387-4-git-send-email-ciwillia@brocade.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1483475171-20387-4-git-send-email-ciwillia@brocade.com",
    "date": "2017-01-03T20:26:11",
    "name": "[dpdk-dev,4/4] net/af_packet: add 802.1Q (VLAN) support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c1c9dfd712e29e3590f876c81c417d1d3ad70b6b",
    "submitter": {
        "id": 424,
        "url": "http://patches.dpdk.org/api/people/424/?format=api",
        "name": "Chas Williams",
        "email": "ciwillia@brocade.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/1483475171-20387-4-git-send-email-ciwillia@brocade.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/18816/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/18816/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 DD2D4F60E;\n\tTue,  3 Jan 2017 21:27:06 +0100 (CET)",
            "from mx0a-000f0801.pphosted.com (mx0a-000f0801.pphosted.com\n\t[67.231.144.122]) by dpdk.org (Postfix) with ESMTP id 104D2377E\n\tfor <dev@dpdk.org>; Tue,  3 Jan 2017 21:26:26 +0100 (CET)",
            "from pps.filterd (m0000542.ppops.net [127.0.0.1])\n\tby mx0a-000f0801.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id\n\tv03KPW48012294; Tue, 3 Jan 2017 12:26:26 -0800",
            "from brmwp-exmb12.corp.brocade.com ([208.47.132.227])\n\tby mx0a-000f0801.pphosted.com with ESMTP id 27pcy1rgrm-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tTue, 03 Jan 2017 12:26:26 -0800",
            "from confsjhq2-2-001.brocade.com (10.252.139.5) by\n\tBRMWP-EXMB12.corp.brocade.com (172.16.59.130) with Microsoft SMTP\n\tServer (TLS) id 15.0.1210.3; Tue, 3 Jan 2017 13:26:24 -0700"
        ],
        "From": "\"Charles (Chas) Williams\" <ciwillia@brocade.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<linville@tuxdriver.com>,\n\t\"Charles (Chas) Williams\" <ciwillia@brocade.com>",
        "Date": "Tue, 3 Jan 2017 15:26:11 -0500",
        "Message-ID": "<1483475171-20387-4-git-send-email-ciwillia@brocade.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1483475171-20387-1-git-send-email-ciwillia@brocade.com>",
        "References": "<1483475171-20387-1-git-send-email-ciwillia@brocade.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "hq1wp-excas11.corp.brocade.com (10.70.36.102) To\n\tBRMWP-EXMB12.corp.brocade.com (172.16.59.130)",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-01-03_16:, , signatures=0",
        "X-Proofpoint-Spam-Details": "rule=notspam policy=default score=0\n\tpriorityscore=1501 malwarescore=0\n\tsuspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015\n\tlowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam\n\tadjust=0\n\treason=mlx scancount=1 engine=8.0.1-1612050000\n\tdefinitions=main-1701030298",
        "Subject": "[dpdk-dev] [PATCH 4/4] net/af_packet: add 802.1Q (VLAN) support",
        "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": "AF_PACKET has some flags to check on the receive side for 802.1Q\ninformation.  If present, we copy into the mbuf.  For transmit, we\ninsert any 802.1Q information into the packet before copying to the ring.\n\nSigned-off-by: Charles (Chas) Williams <ciwillia@brocade.com>\n---\n drivers/net/af_packet/rte_eth_af_packet.c | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)",
    "diff": "diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c\nindex b01a8d1..7f1df92 100644\n--- a/drivers/net/af_packet/rte_eth_af_packet.c\n+++ b/drivers/net/af_packet/rte_eth_af_packet.c\n@@ -161,6 +161,12 @@ eth_af_packet_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\tpbuf = (uint8_t *) ppd + ppd->tp_mac;\n \t\tmemcpy(rte_pktmbuf_mtod(mbuf, void *), pbuf, rte_pktmbuf_data_len(mbuf));\n \n+\t\t/* check for vlan info */\n+\t\tif (ppd->tp_status & TP_STATUS_VLAN_VALID) {\n+\t\t\tmbuf->vlan_tci = ppd->tp_vlan_tci;\n+\t\t\tmbuf->ol_flags |= (PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED);\n+\t\t}\n+\n \t\t/* release incoming frame and advance ring buffer */\n \t\tppd->tp_status = TP_STATUS_KERNEL;\n \t\tif (++framenum >= framecount)\n@@ -214,6 +220,14 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t\tcontinue;\n \t\t}\n \n+\t\t/* insert vlan info if necessary */\n+\t\tif (mbuf->ol_flags & PKT_TX_VLAN_PKT) {\n+\t\t\tif (rte_vlan_insert(&mbuf)) {\n+\t\t\t\trte_pktmbuf_free(mbuf);\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\t\t}\n+\n \t\t/* point at the next incoming frame */\n \t\tif ((ppd->tp_status != TP_STATUS_AVAILABLE) &&\n \t\t    (poll(&pfd, 1, -1) < 0))\n",
    "prefixes": [
        "dpdk-dev",
        "4/4"
    ]
}