get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 71774,
    "url": "https://patches.dpdk.org/api/patches/71774/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1592538166-18617-3-git-send-email-xavier.huwei@huawei.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": "<1592538166-18617-3-git-send-email-xavier.huwei@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1592538166-18617-3-git-send-email-xavier.huwei@huawei.com",
    "date": "2020-06-19T03:42:46",
    "name": "[2/2] ethdev: fix VLAN offloads set if no relative capabilities",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fbb3026fdf3ca8b4effe2fdf223fb052a46c433e",
    "submitter": {
        "id": 1405,
        "url": "https://patches.dpdk.org/api/people/1405/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "xavier.huwei@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1592538166-18617-3-git-send-email-xavier.huwei@huawei.com/mbox/",
    "series": [
        {
            "id": 10513,
            "url": "https://patches.dpdk.org/api/series/10513/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10513",
            "date": "2020-06-19T03:42:44",
            "name": "ethdev: minor bugfixes",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/10513/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/71774/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/71774/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id DFB00A04F5;\n\tFri, 19 Jun 2020 05:44:44 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9A89514581;\n\tFri, 19 Jun 2020 05:44:32 +0200 (CEST)",
            "from huawei.com (szxga06-in.huawei.com [45.249.212.32])\n by dpdk.org (Postfix) with ESMTP id 3A0D658C4\n for <dev@dpdk.org>; Fri, 19 Jun 2020 05:44:29 +0200 (CEST)",
            "from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59])\n by Forcepoint Email with ESMTP id 964D44CF142E6B1F20AE\n for <dev@dpdk.org>; Fri, 19 Jun 2020 11:44:25 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id\n 14.3.487.0; Fri, 19 Jun 2020 11:44:18 +0800"
        ],
        "From": "\"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<xavier.huwei@huawei.com>",
        "Date": "Fri, 19 Jun 2020 11:42:46 +0800",
        "Message-ID": "<1592538166-18617-3-git-send-email-xavier.huwei@huawei.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1592538166-18617-1-git-send-email-xavier.huwei@huawei.com>",
        "References": "<1592538166-18617-1-git-send-email-xavier.huwei@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH 2/2] ethdev: fix VLAN offloads set if no relative\n\tcapabilities",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Chengchang Tang <tangchengchang@huawei.com>\n\nCurrently, there is a potential problem that calling the API function\nrte_eth_dev_set_vlan_offload to start a vlan hardware offloads which the\ndriver does not support. if the PMD driver does not support the relative\nhardware offloads and does not check for it, the hardware setting will\nnot change, but the relative offload in dev->data->dev_conf.rxmode.offloads\nwill be turned on.\n\nIt is supposed to check the hardware capabilities to decide whether the\nrelative callback needs to be called just like the behavior in the API\nfunction named rte_eth_dev_configure.\n\nFixes: 81f9db8ecc2c (\"ethdev: add vlan offload support\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chengchang Tang <tangchengchang@huawei.com>\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n lib/librte_ethdev/rte_ethdev.c | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)",
    "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 122fd2a..5176a0e 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -3261,12 +3261,14 @@ rte_eth_dev_set_vlan_ether_type(uint16_t port_id,\n int\n rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)\n {\n+\tstruct rte_eth_dev_info dev_info;\n \tstruct rte_eth_dev *dev;\n \tint ret = 0;\n \tint mask = 0;\n \tint cur, org = 0;\n \tuint64_t orig_offloads;\n \tuint64_t dev_offloads;\n+\tuint64_t new_offloads;\n \n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n@@ -3320,6 +3322,25 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)\n \tif (mask == 0)\n \t\treturn ret;\n \n+\tret = rte_eth_dev_info_get(port_id, &dev_info);\n+\tif (ret != 0)\n+\t\treturn ret;\n+\n+\t/*\n+\t * New added Rx vlan offloading which are not enabled in\n+\t * rte_eth_dev_configure() must be within its device capabilities\n+\t */\n+\tif ((dev_offloads & dev_info.rx_offload_capa) != dev_offloads) {\n+\t\tnew_offloads = dev_offloads & ~orig_offloads;\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Ethdev port_id=%u requested new added vlan offloads \"\n+\t\t\t\"0x%\" PRIx64 \" must be within Rx offloads capabilities \"\n+\t\t\t\"0x%\"PRIx64 \" in %s()\\n\",\n+\t\t\tport_id, new_offloads, dev_info.rx_offload_capa,\n+\t\t\t__func__);\n+\t\treturn -EINVAL;\n+\t}\n+\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_offload_set, -ENOTSUP);\n \tdev->data->dev_conf.rxmode.offloads = dev_offloads;\n \tret = (*dev->dev_ops->vlan_offload_set)(dev, mask);\n",
    "prefixes": [
        "2/2"
    ]
}