get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55264,
    "url": "http://patches.dpdk.org/api/patches/55264/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190624164714.6560-9-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": "<20190624164714.6560-9-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190624164714.6560-9-stephen@networkplumber.org",
    "date": "2019-06-24T16:47:13",
    "name": "[v6,8/9] kni: add minimal ethtool",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "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/20190624164714.6560-9-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 5138,
            "url": "http://patches.dpdk.org/api/series/5138/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5138",
            "date": "2019-06-24T16:47:05",
            "name": "kni: fixes and cleanups",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/5138/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55264/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55264/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 03BD21BD6C;\n\tMon, 24 Jun 2019 18:47:51 +0200 (CEST)",
            "from mail-pf1-f194.google.com (mail-pf1-f194.google.com\n\t[209.85.210.194]) by dpdk.org (Postfix) with ESMTP id A3AF81BD23\n\tfor <dev@dpdk.org>; Mon, 24 Jun 2019 18:47:31 +0200 (CEST)",
            "by mail-pf1-f194.google.com with SMTP id m30so7835661pff.8\n\tfor <dev@dpdk.org>; Mon, 24 Jun 2019 09:47:31 -0700 (PDT)",
            "from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\tf7sm12814023pfd.43.2019.06.24.09.47.29\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tMon, 24 Jun 2019 09:47:29 -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=fPhniSRUf6Anabigzq+g/BzAVXFwhkiwU8OTBvwmsGLZ9UPCnmaSyGNksrQGNbguKB\n\tZr86Kbcdv3tYJ5pXf6GipvHWNbbyF2mv8weZfIEg2EWEsmZVknm/RcRKajnZO1UtxPuz\n\tmurDXt/HzqIuDwmVCDSSwWKn+6Y9COIwS52s8/kXzXRB2VTk8J/hQmzDBtlfCV3JTQ8o\n\tFMfF+hTJZe2HkrK8KXmQbuOwCZQzIP8vv29HyN2dUdPitEAzqsMokZPV0c5PrAy2asD1\n\tgX/BalHlcdnY1k0oZm0Rhd2WaupRV7tyhzFdBxK3unL+R+jMGKwJiShBW/cplrkek/IY\n\tRaYg==",
        "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=D3wNN7hajzDthG+/QutiVvgSpzxR2rQGS1xdfhq9xUpXQSp2sjtG3YbcJRjMNFwiLb\n\tUwcOY1vrqLNTeQD61SbR+V1vlI2P28FGkiDrgtOttgwGkICLdq3wCXsx68uLZ7OZSJCc\n\tNQ8/sfe5G8JFCE3c7roqnT9gem9ekaJfy/R5rddEMh5OxVQK40VQ+Oan+NCTzwMxKJ+3\n\tVxMfZ86/yXHLptSVY7V6rQIg4dwCPHAftm8je3ElNrYnPzSlHOHLlrgbCNaflQogsy30\n\tP37mXRDhfJCxTrGDyVQ+E965AdeTXaBhfkcHZVmcf7qojWSivtcZp8Sfo5mBLoCLhZeK\n\tlonQ==",
        "X-Gm-Message-State": "APjAAAVJ3+xcnFvYUwhlWLNPTCZxML/74Hxx3LtEK2AKnEkqn3vPBlwG\n\tosgiFwXOIWG8OV85t9tk6tMTqvBeWWI=",
        "X-Google-Smtp-Source": "APXvYqxwBJ+oFKcpFd5nodOcz/azcBTUn8jWHd+b7a3EVUtvoPjrn6B7L8wwiYJ8i9mT364akOsrow==",
        "X-Received": "by 2002:a17:90a:aa0a:: with SMTP id\n\tk10mr26537013pjq.43.1561394850639; \n\tMon, 24 Jun 2019 09:47:30 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Mon, 24 Jun 2019 09:47:13 -0700",
        "Message-Id": "<20190624164714.6560-9-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190624164714.6560-1-stephen@networkplumber.org>",
        "References": "<20190610175155.21374-1-stephen@networkplumber.org>\n\t<20190624164714.6560-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v6 8/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": [
        "v6",
        "8/9"
    ]
}