get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87058,
    "url": "https://patches.dpdk.org/api/patches/87058/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210122094800.197748-2-jiawenwu@trustnetic.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": "<20210122094800.197748-2-jiawenwu@trustnetic.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210122094800.197748-2-jiawenwu@trustnetic.com",
    "date": "2021-01-22T09:47:41",
    "name": "[v1,01/20] net/txgbe: add ethdev probe and remove for VF device",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "4a15ab79c139a2fbd18cdedc6ee8396fc73c5b40",
    "submitter": {
        "id": 1932,
        "url": "https://patches.dpdk.org/api/people/1932/?format=api",
        "name": "Jiawen Wu",
        "email": "jiawenwu@trustnetic.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/20210122094800.197748-2-jiawenwu@trustnetic.com/mbox/",
    "series": [
        {
            "id": 14902,
            "url": "https://patches.dpdk.org/api/series/14902/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14902",
            "date": "2021-01-22T09:47:41",
            "name": "net/txgbe: add VF driver support",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/14902/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/87058/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/87058/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2461AA0A0A;\n\tFri, 22 Jan 2021 10:48:03 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AA132140E28;\n\tFri, 22 Jan 2021 10:48:02 +0100 (CET)",
            "from smtpbgeu1.qq.com (smtpbgeu1.qq.com [52.59.177.22])\n by mails.dpdk.org (Postfix) with ESMTP id 24407140E1D\n for <dev@dpdk.org>; Fri, 22 Jan 2021 10:47:59 +0100 (CET)",
            "from wxdbg.localdomain.com (unknown [183.129.236.74])\n by esmtp6.qq.com (ESMTP) with\n id ; Fri, 22 Jan 2021 17:47:54 +0800 (CST)"
        ],
        "X-QQ-mid": "bizesmtp9t1611308874tb9inzyqx",
        "X-QQ-SSF": "01400000002000C0D000B00A0000000",
        "X-QQ-FEAT": "fYJ0eR3mMJ139c1hbxm3xldVao8MLtMQUyaDwK1iDDs8KQ6SzZ/pQnFSzhU4u\n eifyo/ctSBrgt4LXYTxvqjjwG82cCB6RJxrghvFKF6sAjz2EbcD3WjdGWnA5T5oj7fbaNFW\n Jv+RR4PGIv/rnT1OrjdXBMLu5EoENCNbD0FMDLxPdyqlK8mOmnCA39i/DqORkoeicJLlcgp\n TaTrrS7UygAoUar8dD+hgJMXupWDYZVTnCxBIMhbC3FfU0WbqBvePSA3MKb/WAJlMyOzEF3\n isRVfCXqyBKPlL1lopHtpxD3QARJ5xkoTSvs+EdWtP3ao567zf4EJrGY7y0EYpv8GyL2LFg\n NsOhisqO/6elhIJ5mjCg2lZ2cS36w==",
        "X-QQ-GoodBg": "2",
        "From": "Jiawen Wu <jiawenwu@trustnetic.com>",
        "To": "dev@dpdk.org",
        "Cc": "Jiawen Wu <jiawenwu@trustnetic.com>",
        "Date": "Fri, 22 Jan 2021 17:47:41 +0800",
        "Message-Id": "<20210122094800.197748-2-jiawenwu@trustnetic.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210122094800.197748-1-jiawenwu@trustnetic.com>",
        "References": "<20210122094800.197748-1-jiawenwu@trustnetic.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-QQ-SENDSIZE": "520",
        "Feedback-ID": "bizesmtp:trustnetic.com:qybgforeign:qybgforeign7",
        "X-QQ-Bgrelay": "1",
        "Subject": "[dpdk-dev] [PATCH v1 01/20] net/txgbe: add ethdev probe and remove\n for VF device",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "Introduce virtual function driver in txgbe PMD,\nadd simple init and uninit function to probe and remove the device.\n\nSigned-off-by: Jiawen Wu <jiawenwu@trustnetic.com>\n---\n doc/guides/nics/features/txgbe_vf.ini |  12 +++\n drivers/net/txgbe/meson.build         |   1 +\n drivers/net/txgbe/txgbe_ethdev_vf.c   | 137 ++++++++++++++++++++++++++\n 3 files changed, 150 insertions(+)\n create mode 100644 doc/guides/nics/features/txgbe_vf.ini\n create mode 100644 drivers/net/txgbe/txgbe_ethdev_vf.c",
    "diff": "diff --git a/doc/guides/nics/features/txgbe_vf.ini b/doc/guides/nics/features/txgbe_vf.ini\nnew file mode 100644\nindex 000000000..d2f3e5e61\n--- /dev/null\n+++ b/doc/guides/nics/features/txgbe_vf.ini\n@@ -0,0 +1,12 @@\n+;\n+; Supported features of the 'txgbe_vf' network poll mode driver.\n+;\n+; Refer to default.ini for the full list of available PMD features.\n+;\n+[Features]\n+Multiprocess aware   = Y\n+Linux UIO            = Y\n+Linux VFIO           = Y\n+ARMv8                = Y\n+x86-32               = Y\n+x86-64               = Y\ndiff --git a/drivers/net/txgbe/meson.build b/drivers/net/txgbe/meson.build\nindex 60505e211..3b9994aa9 100644\n--- a/drivers/net/txgbe/meson.build\n+++ b/drivers/net/txgbe/meson.build\n@@ -12,6 +12,7 @@ objs = [base_objs]\n \n sources = files(\n \t'txgbe_ethdev.c',\n+\t'txgbe_ethdev_vf.c',\n \t'txgbe_fdir.c',\n \t'txgbe_flow.c',\n \t'txgbe_ipsec.c',\ndiff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c\nnew file mode 100644\nindex 000000000..e5d0e1adf\n--- /dev/null\n+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c\n@@ -0,0 +1,137 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2015-2020\n+ */\n+\n+#include <sys/queue.h>\n+#include <stdio.h>\n+#include <errno.h>\n+#include <stdint.h>\n+#include <string.h>\n+#include <rte_log.h>\n+#include <rte_ethdev_pci.h>\n+\n+#include \"txgbe_logs.h\"\n+#include \"base/txgbe.h\"\n+#include \"txgbe_ethdev.h\"\n+#include \"txgbe_rxtx.h\"\n+\n+#define TXGBEVF_PMD_NAME \"rte_txgbevf_pmd\" /* PMD name */\n+static int txgbevf_dev_close(struct rte_eth_dev *dev);\n+\n+/*\n+ * The set of PCI devices this driver supports (for VF)\n+ */\n+static const struct rte_pci_id pci_id_txgbevf_map[] = {\n+\t{ RTE_PCI_DEVICE(PCI_VENDOR_ID_WANGXUN, TXGBE_DEV_ID_RAPTOR_VF) },\n+\t{ RTE_PCI_DEVICE(PCI_VENDOR_ID_WANGXUN, TXGBE_DEV_ID_RAPTOR_VF_HV) },\n+\t{ .vendor_id = 0, /* sentinel */ },\n+};\n+\n+static const struct eth_dev_ops txgbevf_eth_dev_ops;\n+\n+/*\n+ * Virtual Function device init\n+ */\n+static int\n+eth_txgbevf_dev_init(struct rte_eth_dev *eth_dev)\n+{\n+\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);\n+\tstruct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev);\n+\tPMD_INIT_FUNC_TRACE();\n+\n+\teth_dev->dev_ops = &txgbevf_eth_dev_ops;\n+\n+\t/* for secondary processes, we don't initialise any further as primary\n+\t * has already done this work. Only check we don't need a different\n+\t * RX function\n+\t */\n+\tif (rte_eal_process_type() != RTE_PROC_PRIMARY) {\n+\t\tstruct txgbe_tx_queue *txq;\n+\t\tuint16_t nb_tx_queues = eth_dev->data->nb_tx_queues;\n+\t\t/* TX queue function in primary, set by last queue initialized\n+\t\t * Tx queue may not initialized by primary process\n+\t\t */\n+\t\tif (eth_dev->data->tx_queues) {\n+\t\t\ttxq = eth_dev->data->tx_queues[nb_tx_queues - 1];\n+\t\t\ttxgbe_set_tx_function(eth_dev, txq);\n+\t\t} else {\n+\t\t\t/* Use default TX function if we get here */\n+\t\t\tPMD_INIT_LOG(NOTICE,\n+\t\t\t\t     \"No TX queues configured yet. Using default TX function.\");\n+\t\t}\n+\n+\t\ttxgbe_set_rx_function(eth_dev);\n+\n+\t\treturn 0;\n+\t}\n+\n+\trte_eth_copy_pci_info(eth_dev, pci_dev);\n+\n+\thw->device_id = pci_dev->id.device_id;\n+\thw->vendor_id = pci_dev->id.vendor_id;\n+\thw->subsystem_device_id = pci_dev->id.subsystem_device_id;\n+\thw->subsystem_vendor_id = pci_dev->id.subsystem_vendor_id;\n+\thw->hw_addr = (void *)pci_dev->mem_resource[0].addr;\n+\n+\treturn 0;\n+}\n+\n+/* Virtual Function device uninit */\n+\n+static int\n+eth_txgbevf_dev_uninit(struct rte_eth_dev *eth_dev)\n+{\n+\tPMD_INIT_FUNC_TRACE();\n+\n+\tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n+\t\treturn 0;\n+\n+\ttxgbevf_dev_close(eth_dev);\n+\n+\treturn 0;\n+}\n+\n+static int eth_txgbevf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n+\tstruct rte_pci_device *pci_dev)\n+{\n+\treturn rte_eth_dev_pci_generic_probe(pci_dev,\n+\t\tsizeof(struct txgbe_adapter), eth_txgbevf_dev_init);\n+}\n+\n+static int eth_txgbevf_pci_remove(struct rte_pci_device *pci_dev)\n+{\n+\treturn rte_eth_dev_pci_generic_remove(pci_dev, eth_txgbevf_dev_uninit);\n+}\n+\n+/*\n+ * virtual function driver struct\n+ */\n+static struct rte_pci_driver rte_txgbevf_pmd = {\n+\t.id_table = pci_id_txgbevf_map,\n+\t.drv_flags = RTE_PCI_DRV_NEED_MAPPING,\n+\t.probe = eth_txgbevf_pci_probe,\n+\t.remove = eth_txgbevf_pci_remove,\n+};\n+\n+static int\n+txgbevf_dev_close(struct rte_eth_dev *dev)\n+{\n+\tPMD_INIT_FUNC_TRACE();\n+\tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n+\t\treturn 0;\n+\n+\tdev->dev_ops = NULL;\n+\n+\treturn 0;\n+}\n+\n+/*\n+ * dev_ops for virtual function, bare necessities for basic vf\n+ * operation have been implemented\n+ */\n+static const struct eth_dev_ops txgbevf_eth_dev_ops = {\n+};\n+\n+RTE_PMD_REGISTER_PCI(net_txgbe_vf, rte_txgbevf_pmd);\n+RTE_PMD_REGISTER_PCI_TABLE(net_txgbe_vf, pci_id_txgbevf_map);\n+RTE_PMD_REGISTER_KMOD_DEP(net_txgbe_vf, \"* igb_uio | vfio-pci\");\n",
    "prefixes": [
        "v1",
        "01/20"
    ]
}