Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/102203/?format=api
http://patches.dpdk.org/api/patches/102203/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211019112540.1825132-9-kevin.laatz@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": "<20211019112540.1825132-9-kevin.laatz@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211019112540.1825132-9-kevin.laatz@intel.com", "date": "2021-10-19T11:25:32", "name": "[v9,08/16] dma/idxd: add start and stop functions for pci devices", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f55fbfb4441a75fe1a3fce978ada0c586e32bf5c", "submitter": { "id": 921, "url": "http://patches.dpdk.org/api/people/921/?format=api", "name": "Kevin Laatz", "email": "kevin.laatz@intel.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/20211019112540.1825132-9-kevin.laatz@intel.com/mbox/", "series": [ { "id": 19786, "url": "http://patches.dpdk.org/api/series/19786/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19786", "date": "2021-10-19T11:25:24", "name": "add dmadev driver for idxd devices", "version": 9, "mbox": "http://patches.dpdk.org/series/19786/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/102203/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/102203/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 B768FA0C43;\n\tTue, 19 Oct 2021 13:26:38 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 585B841189;\n\tTue, 19 Oct 2021 13:26:01 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id E454C41187\n for <dev@dpdk.org>; Tue, 19 Oct 2021 13:25:57 +0200 (CEST)", "from fmsmga007.fm.intel.com ([10.253.24.52])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Oct 2021 04:25:57 -0700", "from silpixa00401122.ir.intel.com ([10.55.128.10])\n by fmsmga007.fm.intel.com with ESMTP; 19 Oct 2021 04:25:55 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10141\"; a=\"228433207\"", "E=Sophos;i=\"5.85,384,1624345200\"; d=\"scan'208\";a=\"228433207\"", "E=Sophos;i=\"5.85,384,1624345200\"; d=\"scan'208\";a=\"490246479\"" ], "X-ExtLoop1": "1", "From": "Kevin Laatz <kevin.laatz@intel.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net, bruce.richardson@intel.com, fengchengwen@huawei.com,\n jerinj@marvell.com, conor.walsh@intel.com,\n Kevin Laatz <kevin.laatz@intel.com>", "Date": "Tue, 19 Oct 2021 11:25:32 +0000", "Message-Id": "<20211019112540.1825132-9-kevin.laatz@intel.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20211019112540.1825132-1-kevin.laatz@intel.com>", "References": "<20210827172048.558704-1-kevin.laatz@intel.com>\n <20211019112540.1825132-1-kevin.laatz@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v9 08/16] dma/idxd: add start and stop functions\n for pci devices", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Add device start/stop functions for DSA devices bound to vfio. For devices\nbound to the IDXD kernel driver, these are not required since the IDXD\nkernel driver takes care of this.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nSigned-off-by: Kevin Laatz <kevin.laatz@intel.com>\nReviewed-by: Conor Walsh <conor.walsh@intel.com>\n---\n doc/guides/dmadevs/idxd.rst | 3 +++\n drivers/dma/idxd/idxd_pci.c | 51 +++++++++++++++++++++++++++++++++++++\n 2 files changed, 54 insertions(+)", "diff": "diff --git a/doc/guides/dmadevs/idxd.rst b/doc/guides/dmadevs/idxd.rst\nindex 62ffd39ee0..711890bd9e 100644\n--- a/doc/guides/dmadevs/idxd.rst\n+++ b/doc/guides/dmadevs/idxd.rst\n@@ -135,3 +135,6 @@ IDXD configuration requirements:\n * Only one ``vchan`` is supported per device (work queue).\n * IDXD devices do not support silent mode.\n * The transfer direction must be set to ``RTE_DMA_DIR_MEM_TO_MEM`` to copy from memory to memory.\n+\n+Once configured, the device can then be made ready for use by calling the\n+``rte_dma_start()`` API.\ndiff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c\nindex 681bb55efe..ed5bf99425 100644\n--- a/drivers/dma/idxd/idxd_pci.c\n+++ b/drivers/dma/idxd/idxd_pci.c\n@@ -59,6 +59,55 @@ idxd_is_wq_enabled(struct idxd_dmadev *idxd)\n \treturn ((state >> WQ_STATE_SHIFT) & WQ_STATE_MASK) == 0x1;\n }\n \n+static int\n+idxd_pci_dev_stop(struct rte_dma_dev *dev)\n+{\n+\tstruct idxd_dmadev *idxd = dev->fp_obj->dev_private;\n+\tuint8_t err_code;\n+\n+\tif (!idxd_is_wq_enabled(idxd)) {\n+\t\tIDXD_PMD_ERR(\"Work queue %d already disabled\", idxd->qid);\n+\t\treturn -EALREADY;\n+\t}\n+\n+\terr_code = idxd_pci_dev_command(idxd, idxd_disable_wq);\n+\tif (err_code || idxd_is_wq_enabled(idxd)) {\n+\t\tIDXD_PMD_ERR(\"Failed disabling work queue %d, error code: %#x\",\n+\t\t\t\tidxd->qid, err_code);\n+\t\treturn err_code == 0 ? -1 : -err_code;\n+\t}\n+\tIDXD_PMD_DEBUG(\"Work queue %d disabled OK\", idxd->qid);\n+\n+\treturn 0;\n+}\n+\n+static int\n+idxd_pci_dev_start(struct rte_dma_dev *dev)\n+{\n+\tstruct idxd_dmadev *idxd = dev->fp_obj->dev_private;\n+\tuint8_t err_code;\n+\n+\tif (idxd_is_wq_enabled(idxd)) {\n+\t\tIDXD_PMD_WARN(\"WQ %d already enabled\", idxd->qid);\n+\t\treturn 0;\n+\t}\n+\n+\tif (idxd->desc_ring == NULL) {\n+\t\tIDXD_PMD_ERR(\"WQ %d has not been fully configured\", idxd->qid);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\terr_code = idxd_pci_dev_command(idxd, idxd_enable_wq);\n+\tif (err_code || !idxd_is_wq_enabled(idxd)) {\n+\t\tIDXD_PMD_ERR(\"Failed enabling work queue %d, error code: %#x\",\n+\t\t\t\tidxd->qid, err_code);\n+\t\treturn err_code == 0 ? -1 : -err_code;\n+\t}\n+\tIDXD_PMD_DEBUG(\"Work queue %d enabled OK\", idxd->qid);\n+\n+\treturn 0;\n+}\n+\n static int\n idxd_pci_dev_close(struct rte_dma_dev *dev)\n {\n@@ -87,6 +136,8 @@ static const struct rte_dma_dev_ops idxd_pci_ops = {\n \t.dev_configure = idxd_configure,\n \t.vchan_setup = idxd_vchan_setup,\n \t.dev_info_get = idxd_info_get,\n+\t.dev_start = idxd_pci_dev_start,\n+\t.dev_stop = idxd_pci_dev_stop,\n };\n \n /* each portal uses 4 x 4k pages */\n", "prefixes": [ "v9", "08/16" ] }{ "id": 102203, "url": "