get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134588,
    "url": "http://patches.dpdk.org/api/patches/134588/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231123155149.306556-2-christian.ehrhardt@canonical.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": "<20231123155149.306556-2-christian.ehrhardt@canonical.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231123155149.306556-2-christian.ehrhardt@canonical.com",
    "date": "2023-11-23T15:51:49",
    "name": "[1/1] eal/linux: force iova-mode va without pa available",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b600dc82aa936847eb2850cf7ef9c7ccc4889a33",
    "submitter": {
        "id": 382,
        "url": "http://patches.dpdk.org/api/people/382/?format=api",
        "name": "Christian Ehrhardt",
        "email": "christian.ehrhardt@canonical.com"
    },
    "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/20231123155149.306556-2-christian.ehrhardt@canonical.com/mbox/",
    "series": [
        {
            "id": 30376,
            "url": "http://patches.dpdk.org/api/series/30376/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30376",
            "date": "2023-11-23T15:51:48",
            "name": "rebase iova fixes",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/30376/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134588/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/134588/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 C4FDC433AC;\n\tThu, 23 Nov 2023 16:52:03 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B7CCE42F0B;\n\tThu, 23 Nov 2023 16:52:03 +0100 (CET)",
            "from smtp-relay-internal-0.canonical.com\n (smtp-relay-internal-0.canonical.com [185.125.188.122])\n by mails.dpdk.org (Postfix) with ESMTP id 074A742F0B\n for <dev@dpdk.org>; Thu, 23 Nov 2023 16:52:03 +0100 (CET)",
            "from mail-ej1-f71.google.com (mail-ej1-f71.google.com\n [209.85.218.71])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id CE5AB406D3\n for <dev@dpdk.org>; Thu, 23 Nov 2023 15:52:02 +0000 (UTC)",
            "by mail-ej1-f71.google.com with SMTP id\n a640c23a62f3a-a047f347c1cso193512366b.1\n for <dev@dpdk.org>; Thu, 23 Nov 2023 07:52:02 -0800 (PST)",
            "from Keschdeichel.fritz.box\n ([2a02:6d40:39cc:3f00:f31c:f858:3d7f:329d])\n by smtp.gmail.com with ESMTPSA id\n mm21-20020a170906cc5500b009fd490c4cb6sm933879ejb.39.2023.11.23.07.52.00\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 23 Nov 2023 07:52:01 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com;\n s=20210705; t=1700754722;\n bh=vBTN66N67BzxWYV/bemFonc7ERUGcD24Z7x37wuNaOs=;\n h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n MIME-Version;\n b=Jb6dRawR5zFVN+3XJePC9Ya5iPUmLHSM/+ZHJCuRWTVrpUSuo6Mu8csNhzbysWvNr\n crr2MhS6a12ni2x37UTEHPFVk9nW8TdGOnjlVAtjtj+WDWoGBX2dCEiEDG0xzX1WO+\n iYUfQafkFE8nEPVZ04YodF4OkOYRN+gCeRyTZyu0ROYbDOtyQkkF1kvY2fz+xTHPwV\n 132uF7hJDBiCpeJLty1WwSHzbjaEzDd8rHJ8QBEnmFQSj1OpvIBiBBQVnSsHDm+7gi\n D04amC70DG67FGKMocZ9aLivv1sbbDOCTFkBSnT06obl84nqy/G6paskNS/6uhksbs\n lBgNAzhZAs5jg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1700754722; x=1701359522;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=vBTN66N67BzxWYV/bemFonc7ERUGcD24Z7x37wuNaOs=;\n b=lqBvYSljRVUsApdfKFRDi8GZRYCmLu50Y2EjnMvvr9ICpxWPlx5Ej/gPkO10ofIASp\n 0XU3tfE4EBU1VOouSHqjY9k8b70y1w/kGMqQ3nP0DohkFa6uJg81v3Y+BAson6VF/Ie0\n TENX7cWVUiSQ7Lh390GaBtSjWjSrcW5mIo3hsJyXCK9laJ3+vOD3Mh2IEuW+KpzsVn7q\n vxtr2iTqaGhkIcAPDl/pV7gPKT3fWJs8bTcyslFrUNfUEsN0cyyArY59fOT4+Bm3+/dx\n yHqNR0GBkWxMRqTZAJg/bDmQLCp9PTH6K/fEGnF88pLPVNBEN142SGYZeu/JWGJ0nm16\n UIyA==",
        "X-Gm-Message-State": "AOJu0YxVvuI73stzRiQWxwJuLfw4ZK8/7oMvqXctrLfoEuAPVlzgHh7t\n CllCuDPFIKATwoy75RY96/S3uIuKHOsMPxQH8s8OFJMVrWyDi9sixm9XBzRS08dmJO3iEZqEX9Z\n 1hXmLomT4ohpYohTzfprmCZlPCCm1",
        "X-Received": [
            "by 2002:a17:906:19c8:b0:9fd:79b3:e2b3 with SMTP id\n h8-20020a17090619c800b009fd79b3e2b3mr2814127ejd.9.1700754721732;\n Thu, 23 Nov 2023 07:52:01 -0800 (PST)",
            "by 2002:a17:906:19c8:b0:9fd:79b3:e2b3 with SMTP id\n h8-20020a17090619c800b009fd79b3e2b3mr2814120ejd.9.1700754721459;\n Thu, 23 Nov 2023 07:52:01 -0800 (PST)"
        ],
        "X-Google-Smtp-Source": "\n AGHT+IHL/uQ0e/I2COFoT7dAv7ScLxzazASoakWBrV56xoEdjoXY/RYXAJwSrxpWpIrKQ4QXgUvN7A==",
        "From": "christian.ehrhardt@canonical.com",
        "To": "dev <dev@dpdk.org>",
        "Cc": "Luca Boccassi <bluca@debian.org>, David Wilder <dwilder@us.ibm.com>,\n Christian Ehrhardt <christian.ehrhardt@canonical.com>",
        "Subject": "[PATCH 1/1] eal/linux: force iova-mode va without pa available",
        "Date": "Thu, 23 Nov 2023 16:51:49 +0100",
        "Message-Id": "<20231123155149.306556-2-christian.ehrhardt@canonical.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20231123155149.306556-1-christian.ehrhardt@canonical.com>",
        "References": "<20231123155149.306556-1-christian.ehrhardt@canonical.com>",
        "MIME-Version": "1.0",
        "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": "From: David Wilder <dwilder@us.ibm.com>\n\nWhen using --no-huge option physical address are not guaranteed\nto be persistent.\n\nThis change effectively makes \"--no-huge\" the same as\n\"--no-huge --iova-mode=va\".\n\nWhen --no-huge is used (or any other condition making physical\naddresses unavailable) setting --iova-mode=pa will have no effect.\n\nSigned-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>\n---\n doc/guides/prog_guide/env_abstraction_layer.rst |  9 ++++++---\n lib/eal/linux/eal.c                             | 14 ++++++++------\n 2 files changed, 14 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst\nindex 6debf54efb..20c7355e0f 100644\n--- a/doc/guides/prog_guide/env_abstraction_layer.rst\n+++ b/doc/guides/prog_guide/env_abstraction_layer.rst\n@@ -559,9 +559,12 @@ IOVA Mode is selected by considering what the current usable Devices on the\n system require and/or support.\n \n On FreeBSD, RTE_IOVA_PA is always the default. On Linux, the IOVA mode is\n-detected based on a 2-step heuristic detailed below.\n+detected based on a heuristic detailed below.\n \n-For the first step, EAL asks each bus its requirement in terms of IOVA mode\n+For the first step, if no Physical Addresses are available RTE_IOVA_VA is\n+selected.\n+\n+Then EAL asks each bus its requirement in terms of IOVA mode\n and decides on a preferred IOVA mode.\n \n - if all buses report RTE_IOVA_PA, then the preferred IOVA mode is RTE_IOVA_PA,\n@@ -575,7 +578,7 @@ and decides on a preferred IOVA mode.\n If the buses have expressed no preference on which IOVA mode to pick, then a\n default is selected using the following logic:\n \n-- if physical addresses are not available, RTE_IOVA_VA mode is used\n+- if enable_iova_as_pa was not set at build RTE_IOVA_VA mode is used\n - if /sys/kernel/iommu_groups is not empty, RTE_IOVA_VA mode is used\n - otherwise, RTE_IOVA_PA mode is used\n \ndiff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c\nindex 57da058cec..7d0eedef57 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -1067,6 +1067,14 @@ rte_eal_init(int argc, char **argv)\n \n \tphys_addrs = rte_eal_using_phys_addrs() != 0;\n \n+\tif (!phys_addrs) {\n+\t\t/* if we have no access to physical addresses,\n+\t\t * pick IOVA as VA mode.\n+\t\t */\n+\t\tiova_mode = RTE_IOVA_VA;\n+\t\tRTE_LOG(INFO, EAL, \"Physical addresses are unavailable, selecting IOVA as VA mode.\\n\");\n+\t}\n+\n \t/* if no EAL option \"--iova-mode=<pa|va>\", use bus IOVA scheme */\n \tif (internal_conf->iova_mode == RTE_IOVA_DC) {\n \t\t/* autodetect the IOVA mapping mode */\n@@ -1078,12 +1086,6 @@ rte_eal_init(int argc, char **argv)\n \t\t\tif (!RTE_IOVA_IN_MBUF) {\n \t\t\t\tiova_mode = RTE_IOVA_VA;\n \t\t\t\tRTE_LOG(DEBUG, EAL, \"IOVA as VA mode is forced by build option.\\n\");\n-\t\t\t} else if (!phys_addrs) {\n-\t\t\t\t/* if we have no access to physical addresses,\n-\t\t\t\t * pick IOVA as VA mode.\n-\t\t\t\t */\n-\t\t\t\tiova_mode = RTE_IOVA_VA;\n-\t\t\t\tRTE_LOG(DEBUG, EAL, \"Physical addresses are unavailable, selecting IOVA as VA mode.\\n\");\n \t\t\t} else if (is_iommu_enabled()) {\n \t\t\t\t/* we have an IOMMU, pick IOVA as VA mode */\n \t\t\t\tiova_mode = RTE_IOVA_VA;\n",
    "prefixes": [
        "1/1"
    ]
}