get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55140,
    "url": "http://patches.dpdk.org/api/patches/55140/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190620192048.13814-10-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": "<20190620192048.13814-10-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190620192048.13814-10-stephen@networkplumber.org",
    "date": "2019-06-20T19:20:48",
    "name": "[v5,9/9] kni: add minimal ethtool",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1fa8b321b06554e278bcc5f2c87fc0d4c2ed8630",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190620192048.13814-10-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 5102,
            "url": "http://patches.dpdk.org/api/series/5102/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5102",
            "date": "2019-06-20T19:20:39",
            "name": "kni: fixes and cleanups",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/5102/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55140/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55140/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 ADDD71D4AF;\n\tThu, 20 Jun 2019 21:21:25 +0200 (CEST)",
            "from mail-pg1-f195.google.com (mail-pg1-f195.google.com\n\t[209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 72EE41D473\n\tfor <dev@dpdk.org>; Thu, 20 Jun 2019 21:21:09 +0200 (CEST)",
            "by mail-pg1-f195.google.com with SMTP id p10so2092650pgn.1\n\tfor <dev@dpdk.org>; Thu, 20 Jun 2019 12:21:09 -0700 (PDT)",
            "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\tj11sm255703pfa.2.2019.06.20.12.21.07\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tThu, 20 Jun 2019 12:21:07 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=VHA65NftE/bw5p/GVwIeWgkJKcWI3PGvUBPGSt32qbc=;\n\tb=mCjrPyRF6FmlFR3wtvJ7+VC8lJL/Ex60V3J1V8h8nPMC3ZM3vzbgOxJGQ54b83nJa4\n\tdYiWXdWSXip3ttV6lDNvRbj+4m+odVKSLZ8Fjvlrg4UMqDE8D7mgZ5rv7yH0GspB3WCE\n\tLGPs9OoC8FTFHWnFxJMyRmVfsqJrOZ0fc5zzOA6RXYCrDxraZ8tnPSx5U+z9ZEcbo1xi\n\twE0XdTNHBfwiB78h23QOHCg84Fa3yOCKvsK5j1mJBYczcIOh2rXEcErzrO+xTEjH6QRW\n\tD9Q5kew0YJipTaZPqd8j6hv8To6P6YQKFyZJ6gTqmG7uV9k9ZUOwNh8gyzsQ/NZ2C3tR\n\tjDeA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=VHA65NftE/bw5p/GVwIeWgkJKcWI3PGvUBPGSt32qbc=;\n\tb=QIlA2oefJHJ8f5oPK0OQ5uDGDv13DOus2tEDdB88IQufv4BRk41p0HQ5SDUurjN+bY\n\tmwN6V+ihDeZo025/nvNIFPh/NVCGkLjMiBm7gwaSVrko7UO9XXOXGU1Rehk4JocsT+t4\n\tUa+Nmcis4kOPYssVXuY+obhNpd7kz8LPvb3QtySDXtcyhJCsu8rYUQsjo+BoFpm1aHmd\n\tTwsBJbMVs12sP9drK0UW5kuOyoITfhVba3vqwteJ6OUtF2BJrs8v06inK+x0zy9tqaSf\n\tz793SOy1I7dV6wb/lYP8tr1iIvrR0Es64EBx6cmXelsWvw4ySoiLAul1WpgdvcprDRpC\n\t7o4w==",
        "X-Gm-Message-State": "APjAAAUMaSU7ls4A4u4HFimrIEKGJopK/tJmuB8lwl2eLyppWfuB+tMd\n\tajmefTXtyGGFBKwB/WVEAuAxdTRVmmY=",
        "X-Google-Smtp-Source": "APXvYqwR63gaOpIUYxDeOa4jq4u8GEgvUi31i9qmRCy+cqUQkoimKxyPeo/7sF9JKAQCmmJROQSDyQ==",
        "X-Received": "by 2002:a17:90a:214f:: with SMTP id\n\ta73mr1256261pje.21.1561058468421; \n\tThu, 20 Jun 2019 12:21:08 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Thu, 20 Jun 2019 12:20:48 -0700",
        "Message-Id": "<20190620192048.13814-10-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190620192048.13814-1-stephen@networkplumber.org>",
        "References": "<20190610175155.21374-1-stephen@networkplumber.org>\n\t<20190620192048.13814-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v5 9/9] kni: add minimal ethtool",
        "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": "Some applications use ethtool so add the minimum ethtool ops.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n kernel/linux/kni/kni_dev.h  |  2 ++\n kernel/linux/kni/kni_misc.c |  1 +\n kernel/linux/kni/kni_net.c  | 14 ++++++++++++++\n 3 files changed, 17 insertions(+)",
    "diff": "diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h\nindex ceba5f73c1d9..c1ca6789ce12 100644\n--- a/kernel/linux/kni/kni_dev.h\n+++ b/kernel/linux/kni/kni_dev.h\n@@ -11,6 +11,8 @@\n #endif\n #define pr_fmt(fmt) KBUILD_MODNAME \": \" fmt\n \n+#define KNI_VERSION\t\"1.0\"\n+\n #include \"compat.h\"\n \n #include <linux/if.h>\ndiff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c\nindex be45f823408f..2b75502a8b0e 100644\n--- a/kernel/linux/kni/kni_misc.c\n+++ b/kernel/linux/kni/kni_misc.c\n@@ -21,6 +21,7 @@\n #include \"compat.h\"\n #include \"kni_dev.h\"\n \n+MODULE_VERSION(KNI_VERSION);\n MODULE_LICENSE(\"Dual BSD/GPL\");\n MODULE_AUTHOR(\"Intel Corporation\");\n MODULE_DESCRIPTION(\"Kernel Module for managing kni devices\");\ndiff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c\nindex 320d51d7fc83..319ee2dcb19a 100644\n--- a/kernel/linux/kni/kni_net.c\n+++ b/kernel/linux/kni/kni_net.c\n@@ -13,6 +13,7 @@\n #include <linux/version.h>\n #include <linux/netdevice.h>\n #include <linux/etherdevice.h> /* eth_type_trans */\n+#include <linux/ethtool.h>\n #include <linux/skbuff.h>\n #include <linux/kthread.h>\n #include <linux/delay.h>\n@@ -725,6 +726,18 @@ static const struct net_device_ops kni_net_netdev_ops = {\n #endif\n };\n \n+static void kni_get_drvinfo(struct net_device *dev,\n+\t\t\t    struct ethtool_drvinfo *info)\n+{\n+\tstrlcpy(info->version, KNI_VERSION, sizeof(info->version));\n+\tstrlcpy(info->driver, \"kni\", sizeof(info->driver));\n+}\n+\n+static const struct ethtool_ops kni_net_ethtool_ops = {\n+\t.get_drvinfo\t= kni_get_drvinfo,\n+\t.get_link\t= ethtool_op_get_link,\n+};\n+\n void\n kni_net_init(struct net_device *dev)\n {\n@@ -736,6 +749,7 @@ kni_net_init(struct net_device *dev)\n \tether_setup(dev); /* assign some of the fields */\n \tdev->netdev_ops      = &kni_net_netdev_ops;\n \tdev->header_ops      = &kni_net_header_ops;\n+\tdev->ethtool_ops     = &kni_net_ethtool_ops;\n \tdev->watchdog_timeo = WD_TIMEOUT;\n }\n \n",
    "prefixes": [
        "v5",
        "9/9"
    ]
}