get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 81501,
    "url": "http://patches.dpdk.org/api/patches/81501/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1603183709-23420-43-git-send-email-arybchenko@solarflare.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": "<1603183709-23420-43-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1603183709-23420-43-git-send-email-arybchenko@solarflare.com",
    "date": "2020-10-20T08:48:09",
    "name": "[42/62] net/sfc: add HW switch ID helpers",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e06072891bc16378e0af61b333e8c2348265273f",
    "submitter": {
        "id": 607,
        "url": "http://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1603183709-23420-43-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [
        {
            "id": 13132,
            "url": "http://patches.dpdk.org/api/series/13132/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13132",
            "date": "2020-10-20T08:47:30",
            "name": "net/sfc: support flow API transfer rules",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/13132/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/81501/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/81501/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 853BCA04DD;\n\tTue, 20 Oct 2020 11:10:25 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 295ACCFB1;\n\tTue, 20 Oct 2020 10:50:32 +0200 (CEST)",
            "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 2D244BBC2\n for <dev@dpdk.org>; Tue, 20 Oct 2020 10:49:08 +0200 (CEST)",
            "from mx1-us1.ppe-hosted.com (unknown [10.7.65.61])\n by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id\n 947686008F for <dev@dpdk.org>; Tue, 20 Oct 2020 08:49:06 +0000 (UTC)",
            "from us4-mdac16-75.ut7.mdlocal (unknown [10.7.64.194])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 953168009E\n for <dev@dpdk.org>; Tue, 20 Oct 2020 08:49:06 +0000 (UTC)",
            "from mx1-us1.ppe-hosted.com (unknown [10.7.65.199])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 23A4680057\n for <dev@dpdk.org>; Tue, 20 Oct 2020 08:49:05 +0000 (UTC)",
            "from webmail.solarflare.com (uk.solarflare.com [193.34.186.16])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n (No client certificate requested)\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n CE5BE18005B\n for <dev@dpdk.org>; Tue, 20 Oct 2020 08:49:04 +0000 (UTC)",
            "from ukex01.SolarFlarecom.com (10.17.10.4) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id\n 15.0.1497.2; Tue, 20 Oct 2020 09:48:50 +0100",
            "from opal.uk.solarflarecom.com (10.17.10.1) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id\n 15.0.1497.2 via Frontend Transport; Tue, 20 Oct 2020 09:48:50 +0100",
            "from ukv-loginhost.uk.solarflarecom.com\n (ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 09K8moXo030863;\n Tue, 20 Oct 2020 09:48:50 +0100",
            "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id EE6471613BE;\n Tue, 20 Oct 2020 09:48:49 +0100 (BST)"
        ],
        "X-Virus-Scanned": "Proofpoint Essentials engine",
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<y@solarflare.com>",
        "CC": "<dev@dpdk.org>, Ivan Malov <ivan.malov@oktetlabs.ru>",
        "Date": "Tue, 20 Oct 2020 09:48:09 +0100",
        "Message-ID": "<1603183709-23420-43-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1603183709-23420-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1603183709-23420-1-git-send-email-arybchenko@solarflare.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.6.1012-25736.003",
        "X-TM-AS-Result": "No-3.017700-8.000000-10",
        "X-TMASE-MatchedRID": "sYi+h+oAOhT90dfary0jKDPF07YFM7bTa01mhnn7t6TplCKCpVh6EKq9\n 0Gjn1y697hDaMZWnA/ExXjnD5osbhP1PYuSZ5yXpqJSK+HSPY+/pVMb1xnESMgaYevV4zG3ZQBz\n oPKhLasitcw7GcMT4xCU0wC5DqKBIeEvDBxAaKu0Pe5gzF3TVt7qGBW9J0Yqje7ijHq7g9oY6ZF\n n4DNCez5Mtkj+Hp5J39OL9KY9jgW4YB2fOueQzjxRFJJyf5BJe0AMabguiKJP6C0ePs7A07X1Hh\n KzShSYnctGEZzK2aB7esV1a3n7zixIep12qiNx4E2x16uMCY42SEWPXfMCsVPtRkLrI9ieM4L6E\n wG9oaSm4DRfskASiEDLh4ElT3qLg2kC7SwvGlKhDwb7Jglhh1lFkOwaJdCKgGObbx/Uctjc=",
        "X-TM-AS-User-Approved-Sender": "Yes",
        "X-TM-AS-User-Blocked-Sender": "No",
        "X-TMASE-Result": "10--3.017700-8.000000",
        "X-TMASE-Version": "SMEX-12.5.0.1300-8.6.1012-25736.003",
        "X-MDID": "1603183745-CMylSaI6B9ds",
        "X-PPE-DISP": "1603183745;CMylSaI6B9ds",
        "Subject": "[dpdk-dev] [PATCH 42/62] net/sfc: add HW switch ID helpers",
        "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: Ivan Malov <ivan.malov@oktetlabs.ru>\n\nThe driver will need a means to figure out relationship between\nRTE ethdev instances and underlying HW switch entities. For now,\nuse board serial number string as a unique HW switch identifier.\n\nSigned-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\n---\n drivers/net/sfc/sfc.c | 44 +++++++++++++++++++++++++++++++++++++++++++\n drivers/net/sfc/sfc.h |  8 ++++++++\n 2 files changed, 52 insertions(+)",
    "diff": "diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c\nindex 3b896490f7..a4fe495788 100644\n--- a/drivers/net/sfc/sfc.c\n+++ b/drivers/net/sfc/sfc.c\n@@ -1259,3 +1259,47 @@ sfc_register_logtype(const struct rte_pci_addr *pci_addr,\n \n \treturn ret;\n }\n+\n+struct sfc_hw_switch_id {\n+\tchar\tboard_sn[RTE_SIZEOF_FIELD(efx_nic_board_info_t, enbi_serial)];\n+};\n+\n+int\n+sfc_hw_switch_id_init(struct sfc_adapter *sa,\n+\t\t      struct sfc_hw_switch_id **idp)\n+{\n+\tefx_nic_board_info_t board_info;\n+\tstruct sfc_hw_switch_id *id;\n+\tint rc;\n+\n+\tif (idp == NULL)\n+\t\treturn EINVAL;\n+\n+\tid = rte_zmalloc(\"sfc_hw_switch_id\", sizeof(*id), 0);\n+\tif (id == NULL)\n+\t\treturn ENOMEM;\n+\n+\trc = efx_nic_get_board_info(sa->nic, &board_info);\n+\tif (rc != 0)\n+\t\treturn rc;\n+\n+\tmemcpy(id->board_sn, board_info.enbi_serial, sizeof(id->board_sn));\n+\n+\t*idp = id;\n+\n+\treturn 0;\n+}\n+\n+void\n+sfc_hw_switch_id_fini(__rte_unused struct sfc_adapter *sa,\n+\t\t      struct sfc_hw_switch_id *id)\n+{\n+\trte_free(id);\n+}\n+\n+bool\n+sfc_hw_switch_ids_equal(const struct sfc_hw_switch_id *left,\n+\t\t\tconst struct sfc_hw_switch_id *right)\n+{\n+\treturn strcmp(left->board_sn, right->board_sn) == 0;\n+}\ndiff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h\nindex 4b5d687108..ed059e142f 100644\n--- a/drivers/net/sfc/sfc.h\n+++ b/drivers/net/sfc/sfc.h\n@@ -403,6 +403,14 @@ int sfc_port_reset_mac_stats(struct sfc_adapter *sa);\n int sfc_set_rx_mode(struct sfc_adapter *sa);\n int sfc_set_rx_mode_unchecked(struct sfc_adapter *sa);\n \n+struct sfc_hw_switch_id;\n+\n+int sfc_hw_switch_id_init(struct sfc_adapter *sa,\n+\t\t\t  struct sfc_hw_switch_id **idp);\n+void sfc_hw_switch_id_fini(struct sfc_adapter *sa,\n+\t\t\t   struct sfc_hw_switch_id *idp);\n+bool sfc_hw_switch_ids_equal(const struct sfc_hw_switch_id *left,\n+\t\t\t     const struct sfc_hw_switch_id *right);\n \n #ifdef __cplusplus\n }\n",
    "prefixes": [
        "42/62"
    ]
}