get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218453,
    "url": "http://patchwork.ozlabs.org/api/patches/2218453/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260401091318.2671624-10-elibr@nvidia.com/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api",
        "name": "Open vSwitch",
        "link_name": "openvswitch",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "git@github.com:openvswitch/ovs.git",
        "webscm_url": "https://github.com/openvswitch/ovs",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260401091318.2671624-10-elibr@nvidia.com>",
    "list_archive_url": null,
    "date": "2026-04-01T09:13:16",
    "name": "[ovs-dev,v3,09/11] unixctl: Introduce unixctl_mem_stream().",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "fdff11895361e33bc136d82a76793f7e5f6356a5",
    "submitter": {
        "id": 79848,
        "url": "http://patchwork.ozlabs.org/api/people/79848/?format=api",
        "name": "Eli Britstein",
        "email": "elibr@nvidia.com"
    },
    "delegate": {
        "id": 75123,
        "url": "http://patchwork.ozlabs.org/api/users/75123/?format=api",
        "username": "echaudron",
        "first_name": "Eelco",
        "last_name": "Chaudron",
        "email": "echaudro@redhat.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260401091318.2671624-10-elibr@nvidia.com/mbox/",
    "series": [
        {
            "id": 498297,
            "url": "http://patchwork.ozlabs.org/api/series/498297/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=498297",
            "date": "2026-04-01T09:13:07",
            "name": "netdev-doca",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/498297/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218453/comments/",
    "check": "warning",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218453/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=KT5n4KhH;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)",
            "smtp1.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key,\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=KT5n4KhH",
            "smtp4.osuosl.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com",
            "smtp4.osuosl.org; dkim=pass (2048-bit key,\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=KT5n4KhH"
        ],
        "Received": [
            "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flzqH20Xkz1yGH\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 20:15:39 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id BFF8380D84;\n\tWed,  1 Apr 2026 09:15:37 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id qSTtnJiUQH-Q; Wed,  1 Apr 2026 09:15:36 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id B1CFA808C5;\n\tWed,  1 Apr 2026 09:15:36 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id A97CAC0070;\n\tWed,  1 Apr 2026 09:15:36 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 1071AC003D\n for <dev@openvswitch.org>; Wed,  1 Apr 2026 09:15:36 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id AA50A406D0\n for <dev@openvswitch.org>; Wed,  1 Apr 2026 09:15:14 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id GHasVeAtazje for <dev@openvswitch.org>;\n Wed,  1 Apr 2026 09:15:13 +0000 (UTC)",
            "from SJ2PR03CU001.outbound.protection.outlook.com\n (mail-westusazlp170120002.outbound.protection.outlook.com\n [IPv6:2a01:111:f403:c001::2])\n by smtp4.osuosl.org (Postfix) with ESMTPS id B82BD40794\n for <dev@openvswitch.org>; Wed,  1 Apr 2026 09:15:13 +0000 (UTC)",
            "from PH1PEPF000132E4.NAMP220.PROD.OUTLOOK.COM (2603:10b6:518:1::24)\n by SJ2PR12MB9243.namprd12.prod.outlook.com (2603:10b6:a03:578::7)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.15; Wed, 1 Apr\n 2026 09:15:09 +0000",
            "from SA2PEPF000015CB.namprd03.prod.outlook.com\n (2a01:111:f403:c931::1) by PH1PEPF000132E4.outlook.office365.com\n (2603:1036:903:47::3) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.27 via Frontend Transport; Wed,\n 1 Apr 2026 09:15:09 +0000",
            "from mail.nvidia.com (216.228.117.161) by\n SA2PEPF000015CB.mail.protection.outlook.com (10.167.241.201) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9769.17 via Frontend Transport; Wed, 1 Apr 2026 09:15:09 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Wed, 1 Apr\n 2026 02:14:52 -0700",
            "from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Wed, 1 Apr\n 2026 02:14:49 -0700"
        ],
        "X-Virus-Scanned": [
            "amavis at osuosl.org",
            "amavis at osuosl.org"
        ],
        "X-Comment": "SPF check N/A for local connections -\n client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ",
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 smtp1.osuosl.org B1CFA808C5",
            "OpenDKIM Filter v2.11.0 smtp4.osuosl.org B82BD40794"
        ],
        "Received-SPF": [
            "Pass (mailfrom) identity=mailfrom;\n client-ip=2a01:111:f403:c001::2;\n helo=sj2pr03cu001.outbound.protection.outlook.com;\n envelope-from=elibr@nvidia.com; receiver=<UNKNOWN>",
            "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.117.161 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org B82BD40794",
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=WssN4xkAoDwMof7I3SVMld5VHYi8eW9i1GuHMlQW2Du8mwoXdYNbUdhGMFAhqew847zJG9heMHSTkvgbEPrrxV9fIRi1lBu1NEvIA6dWBnivowc2veki7dwz1UxkME64aLIOynVyiVmjrWFNcl0aX48BPb+TrtXJYpmEtLNXATOyGeSF82GrijH6tl7nx2t9gxSkGLKrOIl2eMw3iPRHagAH6xxh7GL2bC8kSAzQ5JaFF6aEbCRvEO/lxfWWFVZfjGkEPOtAhmladFmYxoUA/96zua/Ozu5X6hs/Cr6d2aJwCAhwQvJTBjagw+OX170qYEuKB0YBn0NZLL5XLCvLeA==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=8mUMI+Yji0+quQKW8wSynYU7AWimK+Z1TXZTZdomg2o=;\n b=XgGztEbb+/dOcuSj3sS91iaNnEVd+7nIsEPCzzGSQ8L814gdpxRCwot6CMRuS9Xg3F8eLz+2n0KDXbpaGwh3rRvdnbOyfFgje6759p99/Luo5yhfZvhpAd6HrvxlxLzfB9svpjti48O5l3UwzgdIjNmoeYWjZy4AGKsyzjunPpdXhOISri3D+wj1zKcY2qMW6yWlVoU2yU6RB2kEeDve+/l0KhmkZdMZDUWnFURf9hecX36FA3junNg7kbhPXsTiUCBGokI2JAMYLAARA1aUSmdrXs9Hj0rD1u4WhxvljgReZsR85sf/Fce9TRKEIWzXu9JG1j8Ir492gChtbp73Hg==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.161) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none (0)",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=8mUMI+Yji0+quQKW8wSynYU7AWimK+Z1TXZTZdomg2o=;\n b=KT5n4KhHjZs8cJQPuW97ce/RsMRrhJ+K1BJ3Wds3llEiYD2VT7Iw7MMJFEj8VQv6GOWuRocP8cvXyPROQZ6xljSSCgRKfE0GigdNmWWiTXyYsfJKgzsccKvA5l6yNcnyehZKXBa0zRMTXZttb0XjRYglWC7x/vC5GX6FAsJvCaXipwMqfS3gvMJSmGDBHBCS+siDRA594812t86uSKyyaZyaGLeRNtKB+rXNZwV2htAHOoOMa3BxexmCOfs3/GcNy38BIfqtMpmJ+Dwdcoxru/q324brPJzVDDVzpQwv3f9RCxrs8dYdqfOpUk/PzpLirYHhtCmcdLp4xzO2k7Uv2A==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.117.161)\n smtp.mailfrom=nvidia.com;\n dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "From": "Eli Britstein <elibr@nvidia.com>",
        "To": "<dev@openvswitch.org>",
        "Date": "Wed, 1 Apr 2026 12:13:16 +0300",
        "Message-ID": "<20260401091318.2671624-10-elibr@nvidia.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20260401091318.2671624-1-elibr@nvidia.com>",
        "References": "<20260401091318.2671624-1-elibr@nvidia.com>",
        "MIME-Version": "1.0",
        "X-Originating-IP": "[10.126.231.35]",
        "X-ClientProxiedBy": "rnnvmail203.nvidia.com (10.129.68.9) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "SA2PEPF000015CB:EE_|SJ2PR12MB9243:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "603ad34c-1129-4fd8-2593-08de8fcf2c32",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;\n ARA:13230040|82310400026|1800799024|376014|36860700016|22082099003|18002099003|56012099003;",
        "X-Microsoft-Antispam-Message-Info": "\n 5NKPgTpz5CGHxsl/UJB/I8UsRqsVdI2Cscf5KK7QksCxKu9tLxNbxdusGGMKoAss9JfGkQ+D07ZzOZDKRhkjqAR9bTmqj4YHdFJMr/4QyQ+gHqunTj7vCxx/f+VouNmhLvHO2Xr5j2w4sjA0j34KwX80lnV+xs29ck6lA6ySQ19tWe8DhVAGUD2ScAZzI79WJcIp5ftJTDWxIC0QNoygss4k/toYgPE6KajGEIbCvwqw7hbStgCxn1Rc+5V3+isepo4aLS/bYyXZa8cXvvKpIqBrEucGNTX55qVNAZ5uNBwW5pPzEiYFD0iX3zd39gdrfSdy6MVeDLqjR6APKU9+dUL6NI2JjxyPeMwyZWLePsv0sX7u7bXouLilQpjFyW+Gc1vvLK5CNnekWuQ9wt6Z0KKftjJkPFvBivRsjTtDXxqQchyPcj7LbuxkUONrkNpWFIKpvBGrDWZ8HYpw+uVKXqOuSfgPwmni8ZnGP8iemGYAEF4kOIWyS88uBGKXvHLqONhUS0rpcK3APpu2zWVUw22uoFmwU3vKXGpwAKCX4C0f0ilV1GYS7+1ho7nCImBNytR4PFIJlprXyTDMpr7LN5Hne0APcqbv1NbawzDBl+OPhZyVYDA/r4IWSel/5XG1noIrO1oVE/vmfhPj6y2PzMnLZeehVf0VJWZuLPRRTz4tfSvqleBR/+ZD9lobAAqqZUWAstqanGHBNzSHp1ljduUQRDzzwFHSIt9dpP7OockJ8GRXoemaiTc6oyEwRtj9sPgCqDdaEpXa9X03cc0dMQ==",
        "X-Forefront-Antispam-Report": "CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE;\n SFS:(13230040)(82310400026)(1800799024)(376014)(36860700016)(22082099003)(18002099003)(56012099003);\n DIR:OUT; SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n aaMy8G9fZsNIHEEoxuSo7cei200yqvLQS985GJAsyh8lp1XL+sJEcULrp8ubBb/yAO6Wx+uRS9B1epKts3hoMnaLYejG3WOQJjrm2S/wXBIxInTk2X4HE9Y0/MBgQyQWX9qklhuNrt/6PmxW6G8bkO9GMJtaLweDcLND+EVo2dNpdJy3luI1aVFRS/7XVdIOJR2mgIjknmcYZOMp26D3sW16sbRnQTknge1LxEBNCPwLCAN01wh74NlBRZ1wM+f6sTOGBIqYjU9aBdUBU0WYakMUII7Wxs3+T9945XU/i6y62TAxVyH+s7zGKjnKqYdr8+fovbB59jKvDr42ahoVZVjIj6XzYyBipkQc71HFTAAbTHsRWadyKwq5LJRAV8iQiZvWaalIq358btHaLfbnada8tNK5atZQ9lZgSY2ZxSb5f2P0pHqUGPmViRsnIbcS",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "01 Apr 2026 09:15:09.4323 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 603ad34c-1129-4fd8-2593-08de8fcf2c32",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n SA2PEPF000015CB.namprd03.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SJ2PR12MB9243",
        "Subject": "[ovs-dev] [PATCH v3 09/11] unixctl: Introduce unixctl_mem_stream().",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>",
        "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>",
        "List-Post": "<mailto:ovs-dev@openvswitch.org>",
        "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>",
        "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "Cc": "Eli Britstein <elibr@nvidia.com>, Ilya Maximets <i.maximets@ovn.org>,\n David Marchand <david.marchand@redhat.com>, Maor Dickman <maord@nvidia.com>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ovs-dev-bounces@openvswitch.org",
        "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>"
    },
    "content": "A utility function for mem-stream is introduced. It replaces the usage\nin dpdk and later for doca.\n\nSigned-off-by: Eli Britstein <elibr@nvidia.com>\n---\n configure.ac  |  2 +-\n lib/dpdk.c    | 32 ++++----------------------------\n lib/unixctl.c | 44 +++++++++++++++++++++++++++++++++++++++-----\n lib/unixctl.h |  3 +++\n 4 files changed, 47 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/configure.ac b/configure.ac\nindex 56eacbbc7..cd063f811 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -115,7 +115,7 @@ AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id], [], [],\n   [[#include <sys/socket.h>\n #include <sys/types.h>\n #include <netinet/in.h>]])\n-AC_CHECK_FUNCS([mlockall strnlen getloadavg statvfs getmntent_r sendmmsg clock_gettime])\n+AC_CHECK_FUNCS([mlockall strnlen getloadavg statvfs getmntent_r sendmmsg clock_gettime open_memstream])\n AC_CHECK_HEADERS([mntent.h sys/statvfs.h linux/types.h linux/if_ether.h])\n AC_CHECK_HEADERS([linux/net_namespace.h stdatomic.h bits/floatn-common.h])\n AC_CHECK_HEADERS([net/if_mib.h], [], [], [[#include <sys/types.h>\ndiff --git a/lib/dpdk.c b/lib/dpdk.c\nindex d27b95cd9..edd07e3ac 100644\n--- a/lib/dpdk.c\n+++ b/lib/dpdk.c\n@@ -273,30 +273,6 @@ static cookie_io_functions_t dpdk_log_func = {\n     .write = dpdk_log_write,\n };\n \n-static void\n-dpdk_unixctl_mem_stream(struct unixctl_conn *conn, int argc OVS_UNUSED,\n-                        const char *argv[] OVS_UNUSED, void *aux)\n-{\n-    void (*callback)(FILE *) = aux;\n-    char *response = NULL;\n-    FILE *stream;\n-    size_t size;\n-\n-    stream = open_memstream(&response, &size);\n-    if (!stream) {\n-        response = xasprintf(\"Unable to open memstream: %s.\",\n-                             ovs_strerror(errno));\n-        unixctl_command_reply_error(conn, response);\n-        goto out;\n-    }\n-\n-    callback(stream);\n-    fclose(stream);\n-    unixctl_command_reply(conn, response);\n-out:\n-    free(response);\n-}\n-\n static int\n dpdk_parse_log_level(const char *s)\n {\n@@ -491,16 +467,16 @@ dpdk_init__(const struct smap *ovs_other_config)\n     }\n \n     unixctl_command_register(\"dpdk/lcore-list\", \"\", 0, 0,\n-                             dpdk_unixctl_mem_stream, rte_lcore_dump);\n+                             unixctl_mem_stream, rte_lcore_dump);\n     unixctl_command_register(\"dpdk/log-list\", \"\", 0, 0,\n-                             dpdk_unixctl_mem_stream, rte_log_dump);\n+                             unixctl_mem_stream, rte_log_dump);\n     unixctl_command_register(\"dpdk/log-set\", \"{level | pattern:level}\", 0,\n                              INT_MAX, dpdk_unixctl_log_set, NULL);\n     unixctl_command_register(\"dpdk/get-malloc-stats\", \"\", 0, 0,\n-                             dpdk_unixctl_mem_stream,\n+                             unixctl_mem_stream,\n                              malloc_dump_stats_wrapper);\n     unixctl_command_register(\"dpdk/get-memzone-stats\", \"\", 0, 0,\n-                             dpdk_unixctl_mem_stream, rte_memzone_dump);\n+                             unixctl_mem_stream, rte_memzone_dump);\n \n     /* We are called from the main thread here */\n     RTE_PER_LCORE(_lcore_id) = NON_PMD_CORE_ID;\ndiff --git a/lib/unixctl.c b/lib/unixctl.c\nindex 4fd150959..b8499394f 100644\n--- a/lib/unixctl.c\n+++ b/lib/unixctl.c\n@@ -15,22 +15,26 @@\n  */\n \n #include <config.h>\n-#include \"unixctl.h\"\n+\n #include <errno.h>\n #include <getopt.h>\n+#include <stdio.h>\n #include <unistd.h>\n+\n #include \"command-line.h\"\n #include \"coverage.h\"\n #include \"dirs.h\"\n+#include \"jsonrpc.h\"\n+#include \"stream.h\"\n+#include \"stream-provider.h\"\n+#include \"svec.h\"\n+#include \"unixctl.h\"\n+\n #include \"openvswitch/dynamic-string.h\"\n #include \"openvswitch/json.h\"\n-#include \"jsonrpc.h\"\n #include \"openvswitch/list.h\"\n #include \"openvswitch/poll-loop.h\"\n #include \"openvswitch/shash.h\"\n-#include \"stream.h\"\n-#include \"stream-provider.h\"\n-#include \"svec.h\"\n #include \"openvswitch/vlog.h\"\n \n VLOG_DEFINE_THIS_MODULE(unixctl);\n@@ -643,3 +647,33 @@ unixctl_client_transact(struct jsonrpc *client, const char *command, int argc,\n     jsonrpc_msg_destroy(reply);\n     return error;\n }\n+\n+#ifdef HAVE_OPEN_MEMSTREAM\n+\n+void\n+unixctl_mem_stream(struct unixctl_conn *conn, int argc OVS_UNUSED,\n+                   const char *argv[] OVS_UNUSED, void *aux)\n+{\n+    void (*callback)(FILE *) = aux;\n+    char *response = NULL;\n+    FILE *stream;\n+    size_t size;\n+\n+    ovs_assert(callback);\n+\n+    stream = open_memstream(&response, &size);\n+    if (!stream) {\n+        response = xasprintf(\"Unable to open memstream: %s.\",\n+                             ovs_strerror(errno));\n+        unixctl_command_reply_error(conn, response);\n+        goto out;\n+    }\n+\n+    callback(stream);\n+    fclose(stream);\n+    unixctl_command_reply(conn, response);\n+out:\n+    free(response);\n+}\n+\n+#endif\ndiff --git a/lib/unixctl.h b/lib/unixctl.h\nindex 1965f100d..377ecd0a9 100644\n--- a/lib/unixctl.h\n+++ b/lib/unixctl.h\n@@ -62,6 +62,9 @@ void unixctl_command_reply_error(struct unixctl_conn *, const char *error);\n void unixctl_command_reply(struct unixctl_conn *, const char *body);\n void unixctl_command_reply_json(struct unixctl_conn *,\n                                 struct json *body);\n+#ifdef HAVE_OPEN_MEMSTREAM\n+unixctl_cb_func unixctl_mem_stream;\n+#endif\n \n #ifdef  __cplusplus\n }\n",
    "prefixes": [
        "ovs-dev",
        "v3",
        "09/11"
    ]
}