get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134177,
    "url": "http://patches.dpdk.org/api/patches/134177/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231113172759.3529518-1-abdullah.sevincer@intel.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": "<20231113172759.3529518-1-abdullah.sevincer@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231113172759.3529518-1-abdullah.sevincer@intel.com",
    "date": "2023-11-13T17:27:59",
    "name": "[v1] bus/pci: revise support PASID control",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "24e6cf96728be8886b65b27238f9874ffcbc79c3",
    "submitter": {
        "id": 2843,
        "url": "http://patches.dpdk.org/api/people/2843/?format=api",
        "name": "Sevincer, Abdullah",
        "email": "abdullah.sevincer@intel.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20231113172759.3529518-1-abdullah.sevincer@intel.com/mbox/",
    "series": [
        {
            "id": 30279,
            "url": "http://patches.dpdk.org/api/series/30279/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30279",
            "date": "2023-11-13T17:27:59",
            "name": "[v1] bus/pci: revise support PASID control",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/30279/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134177/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134177/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 B71734331D;\n\tMon, 13 Nov 2023 18:28:05 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 80C7B4026F;\n\tMon, 13 Nov 2023 18:28:05 +0100 (CET)",
            "from mgamail.intel.com (mgamail.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 9287E4026C\n for <dev@dpdk.org>; Mon, 13 Nov 2023 18:28:03 +0100 (CET)",
            "from fmviesa002.fm.intel.com ([10.60.135.142])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Nov 2023 09:28:02 -0800",
            "from txanpdk02.an.intel.com ([10.123.117.76])\n by fmviesa002.fm.intel.com with ESMTP; 13 Nov 2023 09:28:02 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1699896483; x=1731432483;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=H3CB1clKH5Vdkopinoj9wgvGD5xaXt6Y6N368Ow2GFg=;\n b=JXsAoysbfPNywf67hN1eB20daLzo+5vsZlhOCdvdFZjaCqV3SrpuTEYS\n vL6I4bbJvNPSm08Sy7UXdf+qeLlnlMWUKibze2HlOlFcjo97NSEJFLvKI\n 1SqL8QuMEbflVjktx6/c1grjQJ43AcFjxuymi0ONLzTY01mOc+tcr84zy\n HGBBjloxLG/GaNx5YfNNEvOJylVqvsiBmCCLo34gekXyMKaYAk2+8hI48\n jPtvvrlhsFSYKqxfLUN5POnOvwrfvltmKiqM1ASBMNX/kfw7qKl+gzAeJ\n ehQ+B2WeC2bnVrgyjCODhmA82CYRtklSVTTYCoPCu3ZZMFEAjwRrFv3jB g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10893\"; a=\"375505778\"",
            "E=Sophos;i=\"6.03,299,1694761200\"; d=\"scan'208\";a=\"375505778\"",
            "E=Sophos;i=\"6.03,299,1694761200\";\n   d=\"scan'208\";a=\"5719674\""
        ],
        "X-ExtLoop1": "1",
        "From": "Abdullah Sevincer <abdullah.sevincer@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "jerinj@marvell.com, mike.ximing.chen@intel.com,\n bruce.richardson@intel.com,\n thomas@monjalon.net, david.marchand@redhat.com,\n Abdullah Sevincer <abdullah.sevincer@intel.com>",
        "Subject": "[PATCH v1] bus/pci: revise support PASID control",
        "Date": "Mon, 13 Nov 2023 11:27:59 -0600",
        "Message-Id": "<20231113172759.3529518-1-abdullah.sevincer@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20231106170521.3064038-2-abdullah.sevincer@intel.com>",
        "References": "<20231106170521.3064038-2-abdullah.sevincer@intel.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": "This commit revises PASID control function to accept PASID offset to\npasid *structure* instead of taking exact register for controlling the\nfeature.\n\nPASID control function was introduced in earlier commit.\nPls see commit 5a6878335b81 (\"event/dlb2: disable PASID\") and\ncommit 60ea19609aec (\"bus/pci: add PASID control\").\n\nSigned-off-by: Abdullah Sevincer <abdullah.sevincer@intel.com>\n---\n drivers/bus/pci/pci_common.c      | 5 ++---\n drivers/bus/pci/rte_bus_pci.h     | 5 ++++-\n drivers/event/dlb2/pf/dlb2_main.c | 4 ++--\n lib/pci/rte_pci.h                 | 2 +-\n 4 files changed, 9 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c\nindex ba5e280d33..dbe647d15d 100644\n--- a/drivers/bus/pci/pci_common.c\n+++ b/drivers/bus/pci/pci_common.c\n@@ -943,9 +943,8 @@ rte_pci_pasid_set_state(const struct rte_pci_device *dev,\n \t\toff_t offset, bool enable)\n {\n \tuint16_t pasid = enable;\n-\treturn rte_pci_write_config(dev, &pasid, sizeof(pasid), offset) < 0\n-\t\t? -1\n-\t\t: 0;\n+\treturn rte_pci_write_config(dev, &pasid, sizeof(pasid),\n+\t\t\toffset + RTE_PCI_PASID_CTRL) < 0 ? -1 : 0;\n }\n \n struct rte_pci_bus rte_pci_bus = {\ndiff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h\nindex f07bf9b588..35d07d8294 100644\n--- a/drivers/bus/pci/rte_bus_pci.h\n+++ b/drivers/bus/pci/rte_bus_pci.h\n@@ -161,9 +161,12 @@ int rte_pci_set_bus_master(const struct rte_pci_device *dev, bool enable);\n  * @param dev\n  *   A pointer to a rte_pci_device structure.\n  * @param offset\n- *   Offset of the PASID external capability.\n+ *   Offset of the PASID external capability structure.\n  * @param enable\n  *   Flag to enable or disable PASID.\n+ *\n+ * @return\n+ * 0 on success, -1 on error in PCI config space read/write.\n  */\n __rte_internal\n int rte_pci_pasid_set_state(const struct rte_pci_device *dev,\ndiff --git a/drivers/event/dlb2/pf/dlb2_main.c b/drivers/event/dlb2/pf/dlb2_main.c\nindex 61a7b39eef..a95d3227a4 100644\n--- a/drivers/event/dlb2/pf/dlb2_main.c\n+++ b/drivers/event/dlb2/pf/dlb2_main.c\n@@ -518,8 +518,8 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)\n \t/* Disable PASID if it is enabled by default, which\n \t * breaks the DLB if enabled.\n \t */\n-\toff = DLB2_PCI_PASID_CAP_OFFSET + RTE_PCI_PASID_CTRL;\n-\tif (rte_pci_pasid_set_state(pdev, off, false)) {\n+\toff = DLB2_PCI_PASID_CAP_OFFSET;\n+\tif (rte_pci_pasid_set_state(pdev, off, false) < 0) {\n \t\tDLB2_LOG_ERR(\"[%s()] failed to write the pcie config space at offset %d\\n\",\n \t\t\t\t__func__, (int)off);\n \t\treturn -1;\ndiff --git a/lib/pci/rte_pci.h b/lib/pci/rte_pci.h\nindex 0d2d8d8fed..c26fc77209 100644\n--- a/lib/pci/rte_pci.h\n+++ b/lib/pci/rte_pci.h\n@@ -101,7 +101,7 @@ extern \"C\" {\n #define RTE_PCI_EXT_CAP_ID_ACS\t\t0x0d\t/* Access Control Services */\n #define RTE_PCI_EXT_CAP_ID_SRIOV\t0x10\t/* SR-IOV */\n #define RTE_PCI_EXT_CAP_ID_PRI\t\t0x13\t/* Page Request Interface */\n-#define RTE_PCI_EXT_CAP_ID_PASID\t0x1B    /* Process Address Space ID */\n+#define RTE_PCI_EXT_CAP_ID_PASID\t0x1b    /* Process Address Space ID */\n \n /* Advanced Error Reporting (RTE_PCI_EXT_CAP_ID_ERR) */\n #define RTE_PCI_ERR_UNCOR_STATUS\t0x04\t/* Uncorrectable Error Status */\n",
    "prefixes": [
        "v1"
    ]
}