Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/131420/?format=api
https://patches.dpdk.org/api/patches/131420/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230914123615.1705654-8-david.marchand@redhat.com/", "project": { "id": 1, "url": "https://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": "<20230914123615.1705654-8-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230914123615.1705654-8-david.marchand@redhat.com", "date": "2023-09-14T12:36:06", "name": "[v3,07/15] pci: define some command constants", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "dfbd35ab74a3c7327e0bfecbca60c68c41db8938", "submitter": { "id": 1173, "url": "https://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230914123615.1705654-8-david.marchand@redhat.com/mbox/", "series": [ { "id": 29507, "url": "https://patches.dpdk.org/api/series/29507/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=29507", "date": "2023-09-14T12:35:59", "name": "Cleanup PCI(e) drivers", "version": 3, "mbox": "https://patches.dpdk.org/series/29507/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/131420/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/131420/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 2848842597;\n\tThu, 14 Sep 2023 14:37:21 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5389A40A7A;\n\tThu, 14 Sep 2023 14:36:57 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id CF54140A80\n for <dev@dpdk.org>; Thu, 14 Sep 2023 14:36:55 +0200 (CEST)", "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-687-cBlSODHEMD6CpUOJHhmZHw-1; Thu, 14 Sep 2023 08:36:51 -0400", "from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com\n [10.11.54.5])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7702B18056AA;\n Thu, 14 Sep 2023 12:36:50 +0000 (UTC)", "from dmarchan.redhat.com (unknown [10.45.225.25])\n by smtp.corp.redhat.com (Postfix) with ESMTP id D95CE7B62;\n Thu, 14 Sep 2023 12:36:48 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1694695015;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=n6S9CWiD4/E0jbTjcsimyWx30UNa2czs98GLKh6XV54=;\n b=e3gP2GtW7qKY9SjtrZ2E6nZd26P1bcN/wl87YgmZls9ozY2yvpMU5CvCCjLtJ4aF0uj8t6\n xrGa+1deLie0OFExqYe3v1BTyKg6kDdGJ2TwsqwFIYf1X6+6TpY7kIXmmJewXXmz/X8qRU\n 4QwkhawE28UJkXnwNYd29vf5s/Afbxs=", "X-MC-Unique": "cBlSODHEMD6CpUOJHhmZHw-1", "From": "David Marchand <david.marchand@redhat.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net, ferruh.yigit@amd.com, chenbo.xia@intel.com,\n nipun.gupta@amd.com, bruce.richardson@intel.com,\n Anatoly Burakov <anatoly.burakov@intel.com>,\n Abdullah Sevincer <abdullah.sevincer@intel.com>,\n Gaetan Rivet <grive@u256.net>", "Subject": "[PATCH v3 07/15] pci: define some command constants", "Date": "Thu, 14 Sep 2023 14:36:06 +0200", "Message-ID": "<20230914123615.1705654-8-david.marchand@redhat.com>", "In-Reply-To": "<20230914123615.1705654-1-david.marchand@redhat.com>", "References": "<20230803075038.307012-1-david.marchand@redhat.com>\n <20230914123615.1705654-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.5", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true", "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": "Define some PCI command constants and use them in existing drivers.\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\nAcked-by: Bruce Richardson <bruce.richardson@intel.com>\nReviewed-by: Chenbo Xia <chenbo.xia@intel.com>\n---\n drivers/bus/pci/linux/pci_vfio.c | 8 ++++----\n drivers/event/dlb2/pf/dlb2_main.c | 8 +++-----\n lib/pci/rte_pci.h | 6 ++++--\n 3 files changed, 11 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c\nindex 7881b7a946..bf91492dd9 100644\n--- a/drivers/bus/pci/linux/pci_vfio.c\n+++ b/drivers/bus/pci/linux/pci_vfio.c\n@@ -156,18 +156,18 @@ pci_vfio_enable_bus_memory(struct rte_pci_device *dev, int dev_fd)\n \t\treturn -1;\n \t}\n \n-\tret = pread64(dev_fd, &cmd, sizeof(cmd), offset + PCI_COMMAND);\n+\tret = pread64(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);\n \n \tif (ret != sizeof(cmd)) {\n \t\tRTE_LOG(ERR, EAL, \"Cannot read command from PCI config space!\\n\");\n \t\treturn -1;\n \t}\n \n-\tif (cmd & PCI_COMMAND_MEMORY)\n+\tif (cmd & RTE_PCI_COMMAND_MEMORY)\n \t\treturn 0;\n \n-\tcmd |= PCI_COMMAND_MEMORY;\n-\tret = pwrite64(dev_fd, &cmd, sizeof(cmd), offset + PCI_COMMAND);\n+\tcmd |= RTE_PCI_COMMAND_MEMORY;\n+\tret = pwrite64(dev_fd, &cmd, sizeof(cmd), offset + RTE_PCI_COMMAND);\n \n \tif (ret != sizeof(cmd)) {\n \t\tRTE_LOG(ERR, EAL, \"Cannot write command to PCI config space!\\n\");\ndiff --git a/drivers/event/dlb2/pf/dlb2_main.c b/drivers/event/dlb2/pf/dlb2_main.c\nindex c6606a9bee..6dbaa2ff97 100644\n--- a/drivers/event/dlb2/pf/dlb2_main.c\n+++ b/drivers/event/dlb2/pf/dlb2_main.c\n@@ -33,7 +33,6 @@\n #define DLB2_PCI_EXP_DEVCTL2 40\n #define DLB2_PCI_LNKCTL2 48\n #define DLB2_PCI_SLTCTL2 56\n-#define DLB2_PCI_CMD 4\n #define DLB2_PCI_EXP_DEVSTA 10\n #define DLB2_PCI_EXP_DEVSTA_TRPND 0x20\n #define DLB2_PCI_EXP_DEVCTL_BCR_FLR 0x8000\n@@ -47,7 +46,6 @@\n #define DLB2_PCI_ERR_ROOT_STATUS 0x30\n #define DLB2_PCI_ERR_COR_STATUS 0x10\n #define DLB2_PCI_ERR_UNCOR_STATUS 0x4\n-#define DLB2_PCI_COMMAND_INTX_DISABLE 0x400\n #define DLB2_PCI_ACS_CAP 0x4\n #define DLB2_PCI_ACS_CTRL 0x6\n #define DLB2_PCI_ACS_SV 0x1\n@@ -286,7 +284,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)\n \n \t/* clear the PCI command register before issuing the FLR */\n \n-\toff = DLB2_PCI_CMD;\n+\toff = RTE_PCI_COMMAND;\n \tcmd = 0;\n \tif (rte_pci_write_config(pdev, &cmd, 2, off) != 2) {\n \t\tDLB2_LOG_ERR(\"[%s()] failed to write the pci command\\n\",\n@@ -468,9 +466,9 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)\n \t\t}\n \t}\n \n-\toff = DLB2_PCI_CMD;\n+\toff = RTE_PCI_COMMAND;\n \tif (rte_pci_read_config(pdev, &cmd, 2, off) == 2) {\n-\t\tcmd &= ~DLB2_PCI_COMMAND_INTX_DISABLE;\n+\t\tcmd &= ~RTE_PCI_COMMAND_INTX_DISABLE;\n \t\tif (rte_pci_write_config(pdev, &cmd, 2, off) != 2) {\n \t\t\tDLB2_LOG_ERR(\"[%s()] failed to write the pci command\\n\",\n \t\t\t __func__);\ndiff --git a/lib/pci/rte_pci.h b/lib/pci/rte_pci.h\nindex 650dbb7645..8bf60b9fb7 100644\n--- a/lib/pci/rte_pci.h\n+++ b/lib/pci/rte_pci.h\n@@ -37,8 +37,10 @@ extern \"C\" {\n #define RTE_PCI_STATUS\t\t0x06\t/* 16 bits */\n #define RTE_PCI_CAPABILITY_LIST\t0x34\t/* 32 bits */\n \n-/* PCI Command Register */\n-#define RTE_PCI_COMMAND_MASTER\t0x4\t/* Bus Master Enable */\n+/* PCI Command Register (RTE_PCI_COMMAND) */\n+#define RTE_PCI_COMMAND_MEMORY\t\t0x2\t/* Enable response in Memory space */\n+#define RTE_PCI_COMMAND_MASTER\t\t0x4\t/* Bus Master Enable */\n+#define RTE_PCI_COMMAND_INTX_DISABLE\t0x400\t/* INTx Emulation Disable */\n \n /* PCI Status Register (RTE_PCI_STATUS) */\n #define RTE_PCI_STATUS_CAP_LIST\t\t0x10\t/* Support Capability List */\n", "prefixes": [ "v3", "07/15" ] }{ "id": 131420, "url": "