get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66605,
    "url": "http://patches.dpdk.org/api/patches/66605/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200312172047.19973-2-stephen@networkplumber.org/",
    "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": "<20200312172047.19973-2-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200312172047.19973-2-stephen@networkplumber.org",
    "date": "2020-03-12T17:20:41",
    "name": "[1/7] ethdev: add function to test port ownership",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8480c89d7bf4534529c5bc0556a923d6d837df78",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200312172047.19973-2-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 8898,
            "url": "http://patches.dpdk.org/api/series/8898/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8898",
            "date": "2020-03-12T17:20:40",
            "name": "checking for owned ports in portmask",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8898/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66605/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/66605/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 09C54A056D;\n\tThu, 12 Mar 2020 18:21:09 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2A27F1C00E;\n\tThu, 12 Mar 2020 18:20:58 +0100 (CET)",
            "from mail-pj1-f68.google.com (mail-pj1-f68.google.com\n [209.85.216.68]) by dpdk.org (Postfix) with ESMTP id 5C5F63B5\n for <dev@dpdk.org>; Thu, 12 Mar 2020 18:20:56 +0100 (CET)",
            "by mail-pj1-f68.google.com with SMTP id f15so2818568pjq.2\n for <dev@dpdk.org>; Thu, 12 Mar 2020 10:20:56 -0700 (PDT)",
            "from hermes.corp.microsoft.com (204-195-22-127.wavecable.com.\n [204.195.22.127])\n by smtp.gmail.com with ESMTPSA id v1sm9447511pjy.35.2020.03.12.10.20.53\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 12 Mar 2020 10:20:53 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=jAMlZhKs00QGjTkXwXYH7pTdJ2cb1OdnFOJC+pOtewo=;\n b=T0rYkyX/apGVYlUkQEF53TtS/fxUUaStIRIznjETKz4pE0x5pj0+94oswP9WYyAUxX\n VnVOmXm5g8H2nhMA0OXF/5QDg5TVHDyVZjIm7zkFWqGjLppVb/r6h61tlEYnqT2OS3x4\n T9HeEMslslIQ7PLNZ/R92UoFJBhreisQy3NRAmavVqOmw3Fr1XwjxvOlSt3az0ppbmAg\n YdMr6cjVxqW6TMUNlSYP2KK3X7ZkeziUVtHZKgRmVIajlN8H8bArjE59uwM0lYvWi8T2\n i30nApoW9KC+YyQK+PMJNf56S3x0UPxeRfP9bAZl9NVZU0YkU4H9ZtzUb2DT7j3U2iRs\n oMBA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=jAMlZhKs00QGjTkXwXYH7pTdJ2cb1OdnFOJC+pOtewo=;\n b=k2BET3TV0/rUuYMnnhFNCFyt8UbE4o/4ooL0fnRIFozqsR4AH0TZ0sTCuocxJUNCGp\n O8SR0xwoTDBnuCKq82h+N1QRxcpWJ39ZKAdpcOo6mdFvVS7wJA6VFdLDQEl3GwTmzDhM\n afgo4WuUlCTul+wIQuntvwoB5WadcliA+5+Etfp+J3HJgglI1B94LcPFeBXnyAbWneCC\n BGGv8FryeBzdQRp25O7eSIHu+1t1s4LtuV8HfJ8LaGwHPuX/BVrewLSTOkrqFVsMnAu6\n dVUUvtDmYbjePO6so/PLp1ZP79UppR2LhwwyX6G/ukfG09mGBKQdUQPdahOMsNEu0lOD\n JbLg==",
        "X-Gm-Message-State": "ANhLgQ1068Q9CKU4FXloyRvWijUt7xT4ZVLjO5Z31nmcyFFB3rf7fXLb\n j6jj5fOKXAGWc+5g4iaWN2jeJIq9JwM=",
        "X-Google-Smtp-Source": "\n ADFU+vucyRlnV6owRNPkWF1AJRxh4BEjo2r7Xlyyog9Xw9Z7Q85WI8CHLtO0qsaIEafIpIGK7Uzd5A==",
        "X-Received": "by 2002:a17:902:db83:: with SMTP id\n m3mr9502100pld.166.1584033654916;\n Thu, 12 Mar 2020 10:20:54 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>, matan@mellanox.com,\n stable@dpdk.org",
        "Date": "Thu, 12 Mar 2020 10:20:41 -0700",
        "Message-Id": "<20200312172047.19973-2-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200312172047.19973-1-stephen@networkplumber.org>",
        "References": "<20200312172047.19973-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 1/7] ethdev: add function to test port ownership",
        "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": "Applications using a port mask need a method to be able\nto test for (and reject) ethdev ports that are in use for\nother purposes.\n\nFixes: 5b7ba31148a8 (\"ethdev: add port ownership\")\nCc: matan@mellanox.com\nCc: stable@dpdk.org\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_ethdev/rte_ethdev.c           |  9 +++++++++\n lib/librte_ethdev/rte_ethdev.h           | 15 +++++++++++++++\n lib/librte_ethdev/rte_ethdev_version.map |  3 +++\n 3 files changed, 27 insertions(+)",
    "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 774c721b3484..38f99f417dba 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -685,6 +685,15 @@ rte_eth_dev_owner_unset(const uint16_t port_id, const uint64_t owner_id)\n \treturn ret;\n }\n \n+int\n+rte_eth_dev_is_owned_by(uint16_t port_id, uint64_t owner_id)\n+{\n+\tif (!rte_eth_dev_is_valid_port(port_id))\n+\t\treturn 0;\n+\n+\treturn rte_eth_devices[port_id].data->owner.id == owner_id;\n+}\n+\n int\n rte_eth_dev_owner_delete(const uint64_t owner_id)\n {\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex d1a593ad112a..91a8f9578282 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -1530,6 +1530,21 @@ uint64_t rte_eth_find_next_owned_by(uint16_t port_id,\n \t     (unsigned int)p < (unsigned int)RTE_MAX_ETHPORTS; \\\n \t     p = rte_eth_find_next_owned_by(p + 1, o))\n \n+/**\n+ * Test if a port is owned\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device\n+ * @param\towner_id\n+ *   The owner identifier.\n+ *   RTE_ETH_DEV_NO_OWNER means test if port is not owned.\n+ * @return\n+ *   - 0 if port is out of range or not owned by owner_id\n+ *   - 1 if device is associated with owner_id\n+ */\n+__rte_experimental\n+int rte_eth_dev_is_owned_by(uint16_t port_id, uint64_t owner_id);\n+\n /**\n  * Iterates over valid ethdev ports.\n  *\ndiff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map\nindex 3f32fdecf722..95231fe3410c 100644\n--- a/lib/librte_ethdev/rte_ethdev_version.map\n+++ b/lib/librte_ethdev/rte_ethdev_version.map\n@@ -230,4 +230,7 @@ EXPERIMENTAL {\n \n \t# added in 20.02\n \trte_flow_dev_dump;\n+\n+\t# added in 20.05\n+\trte_eth_dev_is_owned_by;\n };\n",
    "prefixes": [
        "1/7"
    ]
}