get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105233,
    "url": "http://patches.dpdk.org/api/patches/105233/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211217095816.2599242-1-dkozlyuk@nvidia.com/",
    "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": "<20211217095816.2599242-1-dkozlyuk@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211217095816.2599242-1-dkozlyuk@nvidia.com",
    "date": "2021-12-17T09:58:16",
    "name": "app/testpmd: fix external buffer allocation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "db7565ec11f57cd657b6cd9e3c6594d953f1cc4d",
    "submitter": {
        "id": 2248,
        "url": "http://patches.dpdk.org/api/people/2248/?format=api",
        "name": "Dmitry Kozlyuk",
        "email": "dkozlyuk@nvidia.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211217095816.2599242-1-dkozlyuk@nvidia.com/mbox/",
    "series": [
        {
            "id": 20967,
            "url": "http://patches.dpdk.org/api/series/20967/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20967",
            "date": "2021-12-17T09:58:16",
            "name": "app/testpmd: fix external buffer allocation",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/20967/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/105233/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/105233/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 2FCA6A0352;\n\tFri, 17 Dec 2021 10:58:41 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 091D24013F;\n\tFri, 17 Dec 2021 10:58:41 +0100 (CET)",
            "from NAM12-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam12on2060.outbound.protection.outlook.com [40.107.243.60])\n by mails.dpdk.org (Postfix) with ESMTP id CA27640040;\n Fri, 17 Dec 2021 10:58:38 +0100 (CET)",
            "from MWHPR2201CA0038.namprd22.prod.outlook.com\n (2603:10b6:301:16::12) by DM5PR12MB1450.namprd12.prod.outlook.com\n (2603:10b6:4:3::8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14; Fri, 17 Dec\n 2021 09:58:36 +0000",
            "from CO1NAM11FT042.eop-nam11.prod.protection.outlook.com\n (2603:10b6:301:16:cafe::62) by MWHPR2201CA0038.outlook.office365.com\n (2603:10b6:301:16::12) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.15 via Frontend\n Transport; Fri, 17 Dec 2021 09:58:36 +0000",
            "from mail.nvidia.com (12.22.5.236) by\n CO1NAM11FT042.mail.protection.outlook.com (10.13.174.250) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4801.14 via Frontend Transport; Fri, 17 Dec 2021 09:58:34 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com\n (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Fri, 17 Dec 2021 09:58:33 +0000",
            "from nvidia.com (172.20.187.6) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Fri, 17 Dec 2021\n 01:58:31 -0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=V7OPJ+BquDHdihwl+dHcyzMl8HLSmJ3wTEklyuwBmKwdOeIjly3S4qzUM6Kthd161f3X2OKuzcQ0S52AAEC80A/Q/efRcBVeJvWYyyC/cqvOT8VEDAEzecXo/RtPL6DLW1YVl8OeIxNo/LhD+k7YXmEIWGCYe0X/2wu2bLt31ieqGIGxjiljZunTuMYU8Egs9wmR+BdgZ/G6oXjZa3uzJ65MbuWHdLMgpN+GoMnxyeOFCI9qaue5ahEQLyslI/J+WJfiMaSDKXs0f8gyMPf3U4MNYyv66tDhf8wB6OuXC9PxHqGsN0x7BuWm4L52YRrUSDebt612oQlBmS/L6JIX+Q==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\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=TTY9gVbGxjj/x2VIx6QsCBnIKxzVH/kG8CCndbmZS0w=;\n b=KFkXgJ+KOkO7Xl7DIRh95Ig2gdQsAaAJJHAINXEHGPnAdAB+cIbnQyl4tGiZHcs2r8UU4b2elR927R4NnlabdMuzKMF0EntZd6PYFJF03T4mkmUAINmnRwBQMK+jaVi0hGdJBQBpZyDu5D84oQfCOfmNc+c064UAdMk8uE79599rapHTQAtsIcFGEzj4bp8y40139mI1s+K87nwoZ2NUsIlWr7YjYvuRxJF7iXncALiOUuEfFRUT13k8AgNba3rIt5igrxEgTK3zWvCiCnvZ2YP8DXyQ/NYBz+WLnD8KvL05quhbI56xWPmklt3cqqWvSt5E8sc1Jhurzyky6NCbYw==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 12.22.5.236) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass\n (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none",
        "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=TTY9gVbGxjj/x2VIx6QsCBnIKxzVH/kG8CCndbmZS0w=;\n b=OZYcG3W1olzoaubHbsiW+b0uRTcxOSeJtFa2qGSciojHneUhBWmYtOC9T61xqu/OEHYHF0nm39W9ALf7hS4i7SWEHKCK+OBu87d1L1kGN1sq3mHKeJ87vontCMGEbRD4unjwpIK6APgCPj7LXWGveCPcPBkkiYxylQIdeyzowRdLN1h8kBbIMaBXvKC0foBib0taPV9TTJmgwJ2PgmjYswVxfebJWG4UZGyRzupe+NTGpwYIcgYNvrqo3e0m8yQOStcYmFdQLvLnGUvuA3HAML3PZZ1uoxNEBtba4mVMeZjh8MTLHISx63uEQqEWyhaV89ead8wfOWu++kqO0dmrfQ==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 12.22.5.236)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 12.22.5.236 as permitted sender) receiver=protection.outlook.com;\n client-ip=12.22.5.236; helo=mail.nvidia.com;",
        "From": "Dmitry Kozlyuk <dkozlyuk@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<stable@dpdk.org>, Viacheslav Ovsiienko <viacheslavo@nvidia.com>, \"Xiaoyun\n Li\" <xiaoyun.li@intel.com>, Aman Singh <aman.deep.singh@intel.com>",
        "Subject": "[PATCH] app/testpmd: fix external buffer allocation",
        "Date": "Fri, 17 Dec 2021 11:58:16 +0200",
        "Message-ID": "<20211217095816.2599242-1-dkozlyuk@nvidia.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[172.20.187.6]",
        "X-ClientProxiedBy": "HQMAIL105.nvidia.com (172.20.187.12) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "c97e7b17-4410-4f3b-a6fd-08d9c143c9c9",
        "X-MS-TrafficTypeDiagnostic": "DM5PR12MB1450:EE_",
        "X-Microsoft-Antispam-PRVS": "\n <DM5PR12MB14509BFE5831D9805485A625B9789@DM5PR12MB1450.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:9508;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n cqWYfJnsmsn5susiTxO8y6cgRzxoRkCXZctswmD1TnJpJz4nx2ONnxDgP5347s3VeHS8bpO2Iu1PET0O9DJV5kdV6mZOa+MVaLPnLZrfX+RKmQh1+xX1/1HHNnZ3WjFwM96ZjQqxkyBMwLgIjUxt9sJVA6mS1MljsEITZCSEU8CsaiYmQbq5YhPiaiZkZMu/mab9b7hmlJAFQXPCI3zAofYhhcoFfQXYyHqsqhEDOBLHdD9cSTtfnIhfq0PgfiasL3VZJp7Ea1SZRi7l27nwp/0s8cduX6QRxVHM2LFQZDkrNNXcW1+rQX1fZEMdrl22OuyJWUHLxge6ksz/T64Dc0f9DL1z4of01psGcaLevcblyxi4eleWTbKLJ242JlJitk4sVXv5fff7kvdFTGxbIYevJxvBXpIE5hWcZyU1AwG8osHqqL39SVG+fARNtu8yvhNz/QeohkY1wRuO1QPgee2MNZKejsdT5yrcxMxYiJ8fhYqby+1gtTHlKvTZijlJ6JhODHoQTsXF00TdWub7DgTtEc/1WSw7JnbSa2Fc+X2FaOhtAUq022me7sWqKEU/ZKfa40jc78RqDk9gy+wqe9zUqklHdRpzTSTGjTPQ25njQz1wauO4tHHvN7e8k0w5pOpPIgL0JEYNTYjPyalJQ5qV6bj8uKX7B0IoB/RJ0QJKfDOCcxYl8n1+cHIzrDq+UygV9OxMF9Oj77t1VD6y7GYQNlvWJz1ZJIiMHkafHrK1tuwxpbPXhxdSxA6AnLmOeILIOcpxlveHy04g7q9hJfDPfeggdSx1PjQy7GvZEN6QXdC2pni54cy1cbktT1BjwIEL+lwoqX8mVbbA93OKDg==",
        "X-Forefront-Antispam-Report": "CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE;\n SFS:(4636009)(46966006)(36840700001)(40470700001)(6286002)(5660300002)(47076005)(6666004)(34020700004)(4326008)(36860700001)(55016003)(82310400004)(8676002)(83380400001)(36756003)(356005)(1076003)(81166007)(8936002)(40460700001)(86362001)(316002)(6916009)(2906002)(70206006)(70586007)(2616005)(336012)(26005)(426003)(508600001)(54906003)(16526019)(186003)(7696005)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "17 Dec 2021 09:58:34.0166 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n c97e7b17-4410-4f3b-a6fd-08d9c143c9c9",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n CO1NAM11FT042.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DM5PR12MB1450",
        "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": "External pinned buffer memory (--mp-alloc=xbuf)\nwas allocated as multiple IOVA-contiguous memzones\nof 2M size and 2M alignment.\nDue to the malloc overhead and the alignment requirement,\neach 2M memzone consumed 4M of hugepage memory:\n2M of usable memory + X of malloc overhead + (2M-X) padding.\nThe allocation often failed with 2M hugepages and IOVA-as-PA\nif a PA-contiguous span of 2 hugepages could not be found.\nAlso, with any hugepage size and IOVA mode\nmemory consumption was almost 2x of the usable amount.\n\nAlignment requirement of 2M for external buffers is redundant.\nIt was an attempt to ensure IOVA-contiguity\nby forcing memzones to start at hugepage boundaries,\nwhile 2M size intended to leave no unused space on the page.\nAs shown above, this in fact caused excessive memory consumption\nand decreased the chance of a successful allocation.\nRTE_MEMZONE_F_IOVA_CONTIG already ensures IOVA-contiguity.\n\nRemove the alignment requirement.\nReduce the memzone size by the malloc overhead size (4 cache lines),\nso that memory consumption for each memzone is\n(2M-X) of usable memory + X of malloc overhead = 2M.\nThis also means that whenever there are free 2M hugepages,\nan IOVA-contiguous memzone can always be allocated.\n\nFixes: 72512e1897b2 (\"app/testpmd: add mempool with external data buffers\")\nCc: stable@dpdk.org\n\nSigned-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n---\n app/test-pmd/testpmd.c | 19 ++++++++++++-------\n 1 file changed, 12 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex 55eb293cc0..fa04cc6be6 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -84,7 +84,13 @@\n #endif\n \n #define EXTMEM_HEAP_NAME \"extmem\"\n-#define EXTBUF_ZONE_SIZE RTE_PGSIZE_2M\n+/*\n+ * Zone size with the malloc overhead (max of debug and release variants)\n+ * must fit into the smallest supported hugepage size (2M),\n+ * so that an IOVA-contiguous zone of this size can always be allocated\n+ * if there are free 2M hugepages.\n+ */\n+#define EXTBUF_ZONE_SIZE (RTE_PGSIZE_2M - 4 * RTE_CACHE_LINE_SIZE)\n \n uint16_t verbose_level = 0; /**< Silent by default. */\n int testpmd_logtype; /**< Log type for testpmd logs */\n@@ -1061,12 +1067,11 @@ setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,\n \t\t\text_num = 0;\n \t\t\tbreak;\n \t\t}\n-\t\tmz = rte_memzone_reserve_aligned(mz_name, EXTBUF_ZONE_SIZE,\n-\t\t\t\t\t\t socket_id,\n-\t\t\t\t\t\t RTE_MEMZONE_IOVA_CONTIG |\n-\t\t\t\t\t\t RTE_MEMZONE_1GB |\n-\t\t\t\t\t\t RTE_MEMZONE_SIZE_HINT_ONLY,\n-\t\t\t\t\t\t EXTBUF_ZONE_SIZE);\n+\t\tmz = rte_memzone_reserve(mz_name, EXTBUF_ZONE_SIZE,\n+\t\t\t\t\t socket_id,\n+\t\t\t\t\t RTE_MEMZONE_IOVA_CONTIG |\n+\t\t\t\t\t RTE_MEMZONE_1GB |\n+\t\t\t\t\t RTE_MEMZONE_SIZE_HINT_ONLY);\n \t\tif (mz == NULL) {\n \t\t\t/*\n \t\t\t * The caller exits on external buffer creation\n",
    "prefixes": []
}