get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 52412,
    "url": "http://patches.dpdk.org/api/patches/52412/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1554745507-15089-8-git-send-email-g.singh@nxp.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": "<1554745507-15089-8-git-send-email-g.singh@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1554745507-15089-8-git-send-email-g.singh@nxp.com",
    "date": "2019-04-08T11:22:39",
    "name": "[07/13] net/enetc: remove forward declarations",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "55cc56b7f7ebaa54db6d2e9d65022050c656a4a1",
    "submitter": {
        "id": 1068,
        "url": "http://patches.dpdk.org/api/people/1068/?format=api",
        "name": "Gagandeep Singh",
        "email": "g.singh@nxp.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/1554745507-15089-8-git-send-email-g.singh@nxp.com/mbox/",
    "series": [
        {
            "id": 4173,
            "url": "http://patches.dpdk.org/api/series/4173/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4173",
            "date": "2019-04-08T11:22:28",
            "name": "ENETC PMD basic features and bug fixes",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4173/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/52412/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/52412/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A7DEB5A4A;\n\tMon,  8 Apr 2019 13:23:00 +0200 (CEST)",
            "from EUR02-AM5-obe.outbound.protection.outlook.com\n\t(mail-eopbgr00059.outbound.protection.outlook.com [40.107.0.59])\n\tby dpdk.org (Postfix) with ESMTP id 3D07B4F94\n\tfor <dev@dpdk.org>; Mon,  8 Apr 2019 13:22:41 +0200 (CEST)",
            "from VE1PR04MB6365.eurprd04.prod.outlook.com (10.255.118.78) by\n\tVE1PR04MB6606.eurprd04.prod.outlook.com (20.179.235.10) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\t15.20.1771.13; Mon, 8 Apr 2019 11:22:39 +0000",
            "from VE1PR04MB6365.eurprd04.prod.outlook.com\n\t([fe80::f5ad:f178:4c55:13e0]) by\n\tVE1PR04MB6365.eurprd04.prod.outlook.com\n\t([fe80::f5ad:f178:4c55:13e0%3]) with mapi id 15.20.1771.016;\n\tMon, 8 Apr 2019 11:22:39 +0000"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=2miP8QifQM7Og9QpAD1/pzCG9SZBncTaEGTQUqWg2v0=;\n\tb=eZSaPzVDn6OxJkfFaRuRoU5opeTDdarlxY6H2UNold8AONIyEBjLhsZP9gZ7ywHOSUvqfWYNagQq2QdXkDGGYkLaFub5IGwa01uMgeW6EIQm/0fh6FCguATyOn/idAnH+CMB0//c/3v2iyEoCOmfJpKWbZ2t42ZzVD5+NO4njpQ=",
        "From": "Gagandeep Singh <G.Singh@nxp.com>",
        "To": "\"dev@dpdk.org\" <dev@dpdk.org>, \"ferruh.yigit@intel.com\"\n\t<ferruh.yigit@intel.com>",
        "CC": "Gagandeep Singh <G.Singh@nxp.com>",
        "Thread-Topic": "[PATCH 07/13] net/enetc: remove forward declarations",
        "Thread-Index": "AQHU7f1g2f3/GQxeM0qGd4BV9iZFjw==",
        "Date": "Mon, 8 Apr 2019 11:22:39 +0000",
        "Message-ID": "<1554745507-15089-8-git-send-email-g.singh@nxp.com>",
        "References": "<1554745507-15089-1-git-send-email-g.singh@nxp.com>",
        "In-Reply-To": "<1554745507-15089-1-git-send-email-g.singh@nxp.com>",
        "Accept-Language": "en-US",
        "Content-Language": "en-US",
        "X-MS-Has-Attach": "",
        "X-MS-TNEF-Correlator": "",
        "x-clientproxiedby": "BM1PR0101CA0003.INDPRD01.PROD.OUTLOOK.COM\n\t(2603:1096:b00:18::13) To VE1PR04MB6365.eurprd04.prod.outlook.com\n\t(2603:10a6:803:12a::14)",
        "x-mailer": "git-send-email 1.9.1",
        "authentication-results": "spf=none (sender IP is )\n\tsmtp.mailfrom=G.Singh@nxp.com; ",
        "x-ms-exchange-messagesentrepresentingtype": "1",
        "x-originating-ip": "[92.120.1.67]",
        "x-ms-publictraffictype": "Email",
        "x-ms-office365-filtering-correlation-id": "38e23882-73f2-495a-a538-08d6bc148246",
        "x-ms-office365-filtering-ht": "Tenant",
        "x-microsoft-antispam": "BCL:0; PCL:0;\n\tRULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);\n\tSRVR:VE1PR04MB6606; ",
        "x-ms-traffictypediagnostic": "VE1PR04MB6606:",
        "x-microsoft-antispam-prvs": "<VE1PR04MB6606EB01B566EE90B4A598E9E12C0@VE1PR04MB6606.eurprd04.prod.outlook.com>",
        "x-forefront-prvs": "0001227049",
        "x-forefront-antispam-report": "SFV:NSPM;\n\tSFS:(10009020)(366004)(376002)(346002)(39860400002)(396003)(136003)(199004)(189003)(76176011)(97736004)(81156014)(71200400001)(71190400001)(72206003)(3846002)(25786009)(81166006)(53936002)(2616005)(5660300002)(6116002)(8676002)(7736002)(446003)(478600001)(8936002)(11346002)(305945005)(2906002)(256004)(14444005)(66066001)(6512007)(476003)(6436002)(486006)(50226002)(2501003)(99286004)(106356001)(86362001)(110136005)(4326008)(6486002)(68736007)(105586002)(6506007)(52116002)(316002)(26005)(386003)(14454004)(186003)(36756003)(102836004);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:VE1PR04MB6606;\n\tH:VE1PR04MB6365.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en;\n\tPTR:InfoNoRecords; A:1; MX:1; ",
        "received-spf": "None (protection.outlook.com: nxp.com does not designate\n\tpermitted sender hosts)",
        "x-ms-exchange-senderadcheck": "1",
        "x-microsoft-antispam-message-info": "/zMjR7UkUYzGgtSUgdVMjH0CNhcl4II0wDnDXPiBvTA06PI4SNnTdmLxxp7BjIt331snhH3dAOra+sAqBK7NmN+1WgJCqUCWRUhpRg3wvh4Sn/hSul9hULL0drXz1FtKw+5pQysZ8sKjGvbpdd+z7orMpu1UmM/mEll5VmGPiTIjA7k/TCuXktgZXWTZPI0mMDsiR/8z5K7ggyCC4kSEEig5pAPw4Wag2mNdgjV/8uhEBCERfxV+9CaZRvJnDzQg9vPXxNjMWHV+3Ges/ybpu6OvF0dvRMmg0ouvvOwFC7oaB1iLt9fClU6a8chEBufWW8PBXtUBT43w0BFoNdJyqQrl176l0OLU4Ypp+sNnSJZAT6UCx3pyYU2xNf28aWnEY5EYIc5Ii24w6UnXuKOwXZX0NRZoYY0D0RQJZRTkd0c=",
        "Content-Type": "text/plain; charset=\"iso-8859-1\"",
        "Content-Transfer-Encoding": "quoted-printable",
        "MIME-Version": "1.0",
        "X-OriginatorOrg": "nxp.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "38e23882-73f2-495a-a538-08d6bc148246",
        "X-MS-Exchange-CrossTenant-originalarrivaltime": "08 Apr 2019 11:22:39.5322\n\t(UTC)",
        "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted",
        "X-MS-Exchange-CrossTenant-id": "686ea1d3-bc2b-4c6f-a92c-d99c5c301635",
        "X-MS-Exchange-CrossTenant-mailboxtype": "HOSTED",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "VE1PR04MB6606",
        "Subject": "[dpdk-dev] [PATCH 07/13] net/enetc: remove forward declarations",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Remove unneeded forward declarations and re-order the code.\n\nSigned-off-by: Gagandeep Singh <g.singh@nxp.com>\n---\n drivers/net/enetc/enetc_ethdev.c | 237 ++++++++++++++++++---------------------\n 1 file changed, 107 insertions(+), 130 deletions(-)",
    "diff": "diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c\nindex d403d7a..f8b9510 100644\n--- a/drivers/net/enetc/enetc_ethdev.c\n+++ b/drivers/net/enetc/enetc_ethdev.c\n@@ -10,115 +10,6 @@\n \n int enetc_logtype_pmd;\n \n-/* Functions Prototypes */\n-static int enetc_dev_configure(struct rte_eth_dev *dev);\n-static int enetc_dev_start(struct rte_eth_dev *dev);\n-static void enetc_dev_stop(struct rte_eth_dev *dev);\n-static void enetc_dev_close(struct rte_eth_dev *dev);\n-static void enetc_dev_infos_get(struct rte_eth_dev *dev,\n-\t\t\t\tstruct rte_eth_dev_info *dev_info);\n-static int enetc_link_update(struct rte_eth_dev *dev, int wait_to_complete);\n-static int enetc_hardware_init(struct enetc_eth_hw *hw);\n-static int enetc_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,\n-\t\tuint16_t nb_rx_desc, unsigned int socket_id,\n-\t\tconst struct rte_eth_rxconf *rx_conf,\n-\t\tstruct rte_mempool *mb_pool);\n-static void enetc_rx_queue_release(void *rxq);\n-static int enetc_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,\n-\t\tuint16_t nb_tx_desc, unsigned int socket_id,\n-\t\tconst struct rte_eth_txconf *tx_conf);\n-static void enetc_tx_queue_release(void *txq);\n-static const uint32_t *enetc_supported_ptypes_get(struct rte_eth_dev *dev);\n-static int enetc_stats_get(struct rte_eth_dev *dev,\n-\t\tstruct rte_eth_stats *stats);\n-static void enetc_stats_reset(struct rte_eth_dev *dev);\n-\n-/*\n- * The set of PCI devices this driver supports\n- */\n-static const struct rte_pci_id pci_id_enetc_map[] = {\n-\t{ RTE_PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, ENETC_DEV_ID) },\n-\t{ RTE_PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, ENETC_DEV_ID_VF) },\n-\t{ .vendor_id = 0, /* sentinel */ },\n-};\n-\n-/* Features supported by this driver */\n-static const struct eth_dev_ops enetc_ops = {\n-\t.dev_configure        = enetc_dev_configure,\n-\t.dev_start            = enetc_dev_start,\n-\t.dev_stop             = enetc_dev_stop,\n-\t.dev_close            = enetc_dev_close,\n-\t.link_update          = enetc_link_update,\n-\t.stats_get            = enetc_stats_get,\n-\t.stats_reset          = enetc_stats_reset,\n-\t.dev_infos_get        = enetc_dev_infos_get,\n-\t.rx_queue_setup       = enetc_rx_queue_setup,\n-\t.rx_queue_release     = enetc_rx_queue_release,\n-\t.tx_queue_setup       = enetc_tx_queue_setup,\n-\t.tx_queue_release     = enetc_tx_queue_release,\n-\t.dev_supported_ptypes_get = enetc_supported_ptypes_get,\n-};\n-\n-/**\n- * Initialisation of the enetc device\n- *\n- * @param eth_dev\n- *   - Pointer to the structure rte_eth_dev\n- *\n- * @return\n- *   - On success, zero.\n- *   - On failure, negative value.\n- */\n-static int\n-enetc_dev_init(struct rte_eth_dev *eth_dev)\n-{\n-\tint error = 0;\n-\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);\n-\tstruct enetc_eth_hw *hw =\n-\t\tENETC_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);\n-\n-\tPMD_INIT_FUNC_TRACE();\n-\teth_dev->dev_ops = &enetc_ops;\n-\teth_dev->rx_pkt_burst = &enetc_recv_pkts;\n-\teth_dev->tx_pkt_burst = &enetc_xmit_pkts;\n-\n-\t/* Retrieving and storing the HW base address of device */\n-\thw->hw.reg = (void *)pci_dev->mem_resource[0].addr;\n-\thw->device_id = pci_dev->id.device_id;\n-\n-\terror = enetc_hardware_init(hw);\n-\tif (error != 0) {\n-\t\tENETC_PMD_ERR(\"Hardware initialization failed\");\n-\t\treturn -1;\n-\t}\n-\n-\t/* Allocate memory for storing MAC addresses */\n-\teth_dev->data->mac_addrs = rte_zmalloc(\"enetc_eth\", ETHER_ADDR_LEN, 0);\n-\tif (!eth_dev->data->mac_addrs) {\n-\t\tENETC_PMD_ERR(\"Failed to allocate %d bytes needed to \"\n-\t\t\t      \"store MAC addresses\",\n-\t\t\t      ETHER_ADDR_LEN * 1);\n-\t\terror = -ENOMEM;\n-\t\treturn -1;\n-\t}\n-\n-\t/* Copy the permanent MAC address */\n-\tether_addr_copy((struct ether_addr *)hw->mac.addr,\n-\t\t\t&eth_dev->data->mac_addrs[0]);\n-\n-\tENETC_PMD_DEBUG(\"port_id %d vendorID=0x%x deviceID=0x%x\",\n-\t\t\teth_dev->data->port_id, pci_dev->id.vendor_id,\n-\t\t\tpci_dev->id.device_id);\n-\treturn 0;\n-}\n-\n-static int\n-enetc_dev_uninit(struct rte_eth_dev *eth_dev __rte_unused)\n-{\n-\tPMD_INIT_FUNC_TRACE();\n-\treturn 0;\n-}\n-\n static int\n enetc_dev_configure(struct rte_eth_dev *dev __rte_unused)\n {\n@@ -179,27 +70,6 @@ static int enetc_stats_get(struct rte_eth_dev *dev,\n \t\t      val & (~(ENETC_PM0_TX_EN | ENETC_PM0_RX_EN)));\n }\n \n-static void\n-enetc_dev_close(struct rte_eth_dev *dev)\n-{\n-\tuint16_t i;\n-\n-\tPMD_INIT_FUNC_TRACE();\n-\tenetc_dev_stop(dev);\n-\n-\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n-\t\tenetc_rx_queue_release(dev->data->rx_queues[i]);\n-\t\tdev->data->rx_queues[i] = NULL;\n-\t}\n-\tdev->data->nb_rx_queues = 0;\n-\n-\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n-\t\tenetc_tx_queue_release(dev->data->tx_queues[i]);\n-\t\tdev->data->tx_queues[i] = NULL;\n-\t}\n-\tdev->data->nb_tx_queues = 0;\n-}\n-\n static const uint32_t *\n enetc_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)\n {\n@@ -653,6 +523,113 @@ int enetc_stats_get(struct rte_eth_dev *dev,\n \tenetc_port_wr(enetc_hw, ENETC_PM0_STAT_CONFIG, ENETC_CLEAR_STATS);\n }\n \n+static void\n+enetc_dev_close(struct rte_eth_dev *dev)\n+{\n+\tuint16_t i;\n+\n+\tPMD_INIT_FUNC_TRACE();\n+\tenetc_dev_stop(dev);\n+\n+\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\tenetc_rx_queue_release(dev->data->rx_queues[i]);\n+\t\tdev->data->rx_queues[i] = NULL;\n+\t}\n+\tdev->data->nb_rx_queues = 0;\n+\n+\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n+\t\tenetc_tx_queue_release(dev->data->tx_queues[i]);\n+\t\tdev->data->tx_queues[i] = NULL;\n+\t}\n+\tdev->data->nb_tx_queues = 0;\n+}\n+\n+/*\n+ * The set of PCI devices this driver supports\n+ */\n+static const struct rte_pci_id pci_id_enetc_map[] = {\n+\t{ RTE_PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, ENETC_DEV_ID) },\n+\t{ RTE_PCI_DEVICE(PCI_VENDOR_ID_FREESCALE, ENETC_DEV_ID_VF) },\n+\t{ .vendor_id = 0, /* sentinel */ },\n+};\n+\n+/* Features supported by this driver */\n+static const struct eth_dev_ops enetc_ops = {\n+\t.dev_configure        = enetc_dev_configure,\n+\t.dev_start            = enetc_dev_start,\n+\t.dev_stop             = enetc_dev_stop,\n+\t.dev_close            = enetc_dev_close,\n+\t.link_update          = enetc_link_update,\n+\t.stats_get            = enetc_stats_get,\n+\t.stats_reset          = enetc_stats_reset,\n+\t.dev_infos_get        = enetc_dev_infos_get,\n+\t.rx_queue_setup       = enetc_rx_queue_setup,\n+\t.rx_queue_release     = enetc_rx_queue_release,\n+\t.tx_queue_setup       = enetc_tx_queue_setup,\n+\t.tx_queue_release     = enetc_tx_queue_release,\n+\t.dev_supported_ptypes_get = enetc_supported_ptypes_get,\n+};\n+\n+/**\n+ * Initialisation of the enetc device\n+ *\n+ * @param eth_dev\n+ *   - Pointer to the structure rte_eth_dev\n+ *\n+ * @return\n+ *   - On success, zero.\n+ *   - On failure, negative value.\n+ */\n+static int\n+enetc_dev_init(struct rte_eth_dev *eth_dev)\n+{\n+\tint error = 0;\n+\tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);\n+\tstruct enetc_eth_hw *hw =\n+\t\tENETC_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);\n+\n+\tPMD_INIT_FUNC_TRACE();\n+\teth_dev->dev_ops = &enetc_ops;\n+\teth_dev->rx_pkt_burst = &enetc_recv_pkts;\n+\teth_dev->tx_pkt_burst = &enetc_xmit_pkts;\n+\n+\t/* Retrieving and storing the HW base address of device */\n+\thw->hw.reg = (void *)pci_dev->mem_resource[0].addr;\n+\thw->device_id = pci_dev->id.device_id;\n+\n+\terror = enetc_hardware_init(hw);\n+\tif (error != 0) {\n+\t\tENETC_PMD_ERR(\"Hardware initialization failed\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* Allocate memory for storing MAC addresses */\n+\teth_dev->data->mac_addrs = rte_zmalloc(\"enetc_eth\", ETHER_ADDR_LEN, 0);\n+\tif (!eth_dev->data->mac_addrs) {\n+\t\tENETC_PMD_ERR(\"Failed to allocate %d bytes needed to \"\n+\t\t\t      \"store MAC addresses\",\n+\t\t\t      ETHER_ADDR_LEN * 1);\n+\t\terror = -ENOMEM;\n+\t\treturn -1;\n+\t}\n+\n+\t/* Copy the permanent MAC address */\n+\tether_addr_copy((struct ether_addr *)hw->mac.addr,\n+\t\t\t&eth_dev->data->mac_addrs[0]);\n+\n+\tENETC_PMD_DEBUG(\"port_id %d vendorID=0x%x deviceID=0x%x\",\n+\t\t\teth_dev->data->port_id, pci_dev->id.vendor_id,\n+\t\t\tpci_dev->id.device_id);\n+\treturn 0;\n+}\n+\n+static int\n+enetc_dev_uninit(struct rte_eth_dev *eth_dev __rte_unused)\n+{\n+\tPMD_INIT_FUNC_TRACE();\n+\treturn 0;\n+}\n+\n static int\n enetc_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \t\t\t   struct rte_pci_device *pci_dev)\n",
    "prefixes": [
        "07/13"
    ]
}