get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 112335,
    "url": "http://patchwork.dpdk.org/api/patches/112335/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220606072246.88311-1-ke1x.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20220606072246.88311-1-ke1x.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220606072246.88311-1-ke1x.zhang@intel.com",
    "date": "2022-06-06T07:22:45",
    "name": "[v3] kni: fix warning about discarding const qualifier",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4848dd6fcc5b3431a82811ecfcf8a3c46aa52351",
    "submitter": {
        "id": 2503,
        "url": "http://patchwork.dpdk.org/api/people/2503/?format=api",
        "name": "Zhang, Ke1X",
        "email": "ke1x.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220606072246.88311-1-ke1x.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 23334,
            "url": "http://patchwork.dpdk.org/api/series/23334/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=23334",
            "date": "2022-06-06T07:22:45",
            "name": "[v3] kni: fix warning about discarding const qualifier",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/23334/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/112335/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/112335/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 378C7A0542;\n\tMon,  6 Jun 2022 09:29:37 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D1C5640A7F;\n\tMon,  6 Jun 2022 09:29:36 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by mails.dpdk.org (Postfix) with ESMTP id 44E7440150;\n Mon,  6 Jun 2022 09:29:35 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Jun 2022 00:29:34 -0700",
            "from unknown (HELO localhost.localdomain) ([10.239.251.104])\n by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Jun 2022 00:29:32 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1654500575; x=1686036575;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=Qn5jN4f0NgOBZffwMd/l2tRi1uwI+jve+sPN6guI7OE=;\n b=hag7aUecx0Kk1xKtZslM3xu9KxK4rU/m54cXWEwfAch+X8ktviHENGk9\n /57gqQ0YetecY4SjP9CH8xsegBbKeymJsZT9ouc0RNh12M7uxVgqHc+A4\n KJPAitftZ+i1f57jAE7pZLG7O5OisqEWmCXqDurmST8PTW9BOghPHJBMa\n CWTqiLr6FMIaBWfQxC2j20pQEO5Pwi/yVnG2pNizZrTRMF6ZOkQ3gv0xA\n sUomoKfcsXSopkKiocAlhJQ7ADG2SgdUeJ5VrXcF7jXQRfS01lpNtzu7v\n TTq0UOEeBA6M3ZGuOriyRj+gtFVgsx77pd7FV0zOxp/tsL5KZfwCfTdPk w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10369\"; a=\"362975672\"",
            "E=Sophos;i=\"5.91,280,1647327600\"; d=\"scan'208\";a=\"362975672\"",
            "E=Sophos;i=\"5.91,280,1647327600\"; d=\"scan'208\";a=\"635463286\""
        ],
        "From": "Ke Zhang <ke1x.zhang@intel.com>",
        "To": "ferruh.yigit@intel.com,\n\tdev@dpdk.org",
        "Cc": "Ke Zhang <ke1x.zhang@intel.com>, stable@dpdk.org,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Subject": "[PATCH v3] kni: fix warning about discarding const qualifier",
        "Date": "Mon,  6 Jun 2022 07:22:45 +0000",
        "Message-Id": "<20220606072246.88311-1-ke1x.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220531081304.229902-1-ke1x.zhang@intel.com>",
        "References": "<20220531081304.229902-1-ke1x.zhang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "The warning info:\nwarning: passing argument 1 of ‘memcpy’ discards ‘const’\nqualifier from pointer target type\n\nVariable dev_addr is done const intentionally in v5.17 to\nprevent using it directly. See kernel series [1] for more\ninformation.\n\n[1] https://lore.kernel.org/netdev/YZYAb4X%2FVQFy0iks@shredder/T/\n\nFixes: ea6b39b5b847 (\"kni: remove ethtool support\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ke Zhang <ke1x.zhang@intel.com>\nSigned-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n kernel/linux/kni/compat.h   | 4 ++++\n kernel/linux/kni/kni_misc.c | 6 +++++-\n kernel/linux/kni/kni_net.c  | 5 ++++-\n 3 files changed, 13 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h\nindex 664785674f..ef1526ef85 100644\n--- a/kernel/linux/kni/compat.h\n+++ b/kernel/linux/kni/compat.h\n@@ -141,3 +141,7 @@\n #if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE\n #define HAVE_TSK_IN_GUP\n #endif\n+\n+#if KERNEL_VERSION(5, 15, 0) <= LINUX_VERSION_CODE\n+#define HAVE_ETH_HW_ADDR_SET\n+#endif\ndiff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c\nindex 780187d8bf..11fea961b3 100644\n--- a/kernel/linux/kni/kni_misc.c\n+++ b/kernel/linux/kni/kni_misc.c\n@@ -403,10 +403,14 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,\n \n \t/* if user has provided a valid mac address */\n \tif (is_valid_ether_addr(dev_info.mac_addr))\n+#ifdef HAVE_ETH_HW_ADDR_SET\n+\t\teth_hw_addr_set(net_dev, dev_info.mac_addr);\n+#else\n \t\tmemcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN);\n+#endif\n \telse\n \t\t/* Generate random MAC address. */\n-\t\teth_random_addr(net_dev->dev_addr);\n+\t\teth_hw_addr_random(net_dev);\n \n \tif (dev_info.mtu)\n \t\tnet_dev->mtu = dev_info.mtu;\ndiff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c\nindex 29e5b9e21f..496ce7e4ae 100644\n--- a/kernel/linux/kni/kni_net.c\n+++ b/kernel/linux/kni/kni_net.c\n@@ -779,8 +779,11 @@ kni_net_set_mac(struct net_device *netdev, void *p)\n \t\treturn -EADDRNOTAVAIL;\n \n \tmemcpy(req.mac_addr, addr->sa_data, netdev->addr_len);\n+#ifdef HAVE_ETH_HW_ADDR_SET\n+\teth_hw_addr_set(netdev, addr->sa_data);\n+#else\n \tmemcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);\n-\n+#endif\n \tret = kni_net_process_request(netdev, &req);\n \n \treturn (ret == 0 ? req.result : ret);\n",
    "prefixes": [
        "v3"
    ]
}