Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/104425/?format=api
https://patches.dpdk.org/api/patches/104425/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211117002155.293267-7-tduszynski@marvell.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": "<20211117002155.293267-7-tduszynski@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211117002155.293267-7-tduszynski@marvell.com", "date": "2021-11-17T00:21:51", "name": "[06/10] raw/cnxk_gpio: support enqueuing buffers", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "9ac55e9d4c11bd308ac58cb352589ab2179a1d6f", "submitter": { "id": 2215, "url": "https://patches.dpdk.org/api/people/2215/?format=api", "name": "Tomasz Duszynski", "email": "tduszynski@marvell.com" }, "delegate": { "id": 310, "url": "https://patches.dpdk.org/api/users/310/?format=api", "username": "jerin", "first_name": "Jerin", "last_name": "Jacob", "email": "jerinj@marvell.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20211117002155.293267-7-tduszynski@marvell.com/mbox/", "series": [ { "id": 20603, "url": "https://patches.dpdk.org/api/series/20603/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=20603", "date": "2021-11-17T00:21:45", "name": "Add cnxk_gpio PMD", "version": 1, "mbox": "https://patches.dpdk.org/series/20603/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/104425/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/104425/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 E7D25A0C47;\n\tWed, 17 Nov 2021 01:23:24 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C56274117A;\n\tWed, 17 Nov 2021 01:22:58 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 9C8BE4115F\n for <dev@dpdk.org>; Wed, 17 Nov 2021 01:22:55 +0100 (CET)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id\n 1AGJnS4V008504\n for <dev@dpdk.org>; Tue, 16 Nov 2021 16:22:54 -0800", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3cck4h8yh6-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Tue, 16 Nov 2021 16:22:54 -0800", "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Tue, 16 Nov 2021 16:22:53 -0800", "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Tue, 16 Nov 2021 16:22:53 -0800", "from localhost.localdomain (unknown [10.28.34.39])\n by maili.marvell.com (Postfix) with ESMTP id 103893F705B;\n Tue, 16 Nov 2021 16:22:51 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=s3Ae8ZAYexJkQow3+yjvoK4hDQORdpuCqSMxaEKodNo=;\n b=Y3v21J3wo/lebN0MBsT06wDt6NCFs+flOVsTTdvZYiMnVZts5BU+BXW9Bayn7UM03klt\n mytYPnqHTbm3Gvd6eZte9NQMCF+jxILLYNVEGGLG2BikFYMKwKVI/L/YZkdrSc4w/iBm\n ql2WlIqbRFVK5NOzqXi8VpY0VqByoztQ/Apzhd4Ekv2wqJxmF8jtLdbdNBRGIouffTJG\n 7ufjITbjqL+HTtaf3Bus3UcHT1NIwV6hD66ziJab9kYn9NJDov60Y7yqt+nDtVMXH4WA\n K9rEa5Gps4FaFJI0AxHe6OX8LntUrK3fCjK3mVrJAm19B+GWg1OUJh5q/tGaChhb8X8K OA==", "From": "Tomasz Duszynski <tduszynski@marvell.com>", "To": "<dev@dpdk.org>", "CC": "<jerinj@marvell.com>, Tomasz Duszynski <tduszynski@marvell.com>", "Subject": "[PATCH 06/10] raw/cnxk_gpio: support enqueuing buffers", "Date": "Wed, 17 Nov 2021 01:21:51 +0100", "Message-ID": "<20211117002155.293267-7-tduszynski@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20211117002155.293267-1-tduszynski@marvell.com>", "References": "<20211117002155.293267-1-tduszynski@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "VslG-WqFpvw2gHf5FwgjG4iRg-wShK4d", "X-Proofpoint-GUID": "VslG-WqFpvw2gHf5FwgjG4iRg-wShK4d", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475\n definitions=2021-11-16_07,2021-11-16_01,2020-04-07_01", "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": "Add dummy support for enqueuing buffers.\n\nSigned-off-by: Tomasz Duszynski <tduszynski@marvell.com>\n---\n drivers/raw/cnxk_gpio/cnxk_gpio.c | 46 +++++++++++++++++++++++\n drivers/raw/cnxk_gpio/cnxk_gpio.h | 1 +\n drivers/raw/cnxk_gpio/meson.build | 1 +\n drivers/raw/cnxk_gpio/rte_pmd_cnxk_gpio.h | 38 +++++++++++++++++++\n 4 files changed, 86 insertions(+)\n create mode 100644 drivers/raw/cnxk_gpio/rte_pmd_cnxk_gpio.h", "diff": "diff --git a/drivers/raw/cnxk_gpio/cnxk_gpio.c b/drivers/raw/cnxk_gpio/cnxk_gpio.c\nindex 8ac3c5e1be..c08ccdfbb8 100644\n--- a/drivers/raw/cnxk_gpio/cnxk_gpio.c\n+++ b/drivers/raw/cnxk_gpio/cnxk_gpio.c\n@@ -14,6 +14,7 @@\n #include <roc_api.h>\n \n #include \"cnxk_gpio.h\"\n+#include \"rte_pmd_cnxk_gpio.h\"\n \n #define CNXK_GPIO_BUFSZ 128\n #define CNXK_GPIO_CLASS_PATH \"/sys/class/gpio\"\n@@ -262,7 +263,52 @@ cnxk_gpio_queue_count(struct rte_rawdev *dev)\n \treturn gpiochip->num_gpios;\n }\n \n+static int\n+cnxk_gpio_process_buf(struct cnxk_gpio *gpio, struct rte_rawdev_buf *rbuf)\n+{\n+\tstruct cnxk_gpio_msg *msg = rbuf->buf_addr;\n+\tvoid *rsp = NULL;\n+\n+\tswitch (msg->type) {\n+\tdefault:\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* get rid of last response if any */\n+\tif (gpio->rsp) {\n+\t\tRTE_LOG(WARNING, PMD, \"previous response got overwritten\\n\");\n+\t\trte_free(gpio->rsp);\n+\t}\n+\tgpio->rsp = rsp;\n+\n+\treturn 0;\n+}\n+\n+static int\n+cnxk_gpio_enqueue_bufs(struct rte_rawdev *dev, struct rte_rawdev_buf **buffers,\n+\t\t unsigned int count, rte_rawdev_obj_t context)\n+{\n+\tstruct cnxk_gpiochip *gpiochip = dev->dev_private;\n+\tunsigned int queue = (size_t)context;\n+\tstruct cnxk_gpio *gpio;\n+\tint ret;\n+\n+\tif (count == 0)\n+\t\treturn 0;\n+\n+\tgpio = cnxk_gpio_lookup(gpiochip, queue);\n+\tif (!gpio)\n+\t\treturn -ENODEV;\n+\n+\tret = cnxk_gpio_process_buf(gpio, buffers[0]);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\treturn 1;\n+}\n+\n static const struct rte_rawdev_ops cnxk_gpio_rawdev_ops = {\n+\t.enqueue_bufs = cnxk_gpio_enqueue_bufs,\n \t.queue_def_conf = cnxk_gpio_queue_def_conf,\n \t.queue_count = cnxk_gpio_queue_count,\n \t.queue_setup = cnxk_gpio_queue_setup,\ndiff --git a/drivers/raw/cnxk_gpio/cnxk_gpio.h b/drivers/raw/cnxk_gpio/cnxk_gpio.h\nindex 0ee9789a01..1eadde965e 100644\n--- a/drivers/raw/cnxk_gpio/cnxk_gpio.h\n+++ b/drivers/raw/cnxk_gpio/cnxk_gpio.h\n@@ -7,6 +7,7 @@\n \n struct cnxk_gpio {\n \tstruct cnxk_gpiochip *gpiochip;\n+\tvoid *rsp;\n \tint num;\n };\n \ndiff --git a/drivers/raw/cnxk_gpio/meson.build b/drivers/raw/cnxk_gpio/meson.build\nindex 9a7e716c1e..3fbfdd838c 100644\n--- a/drivers/raw/cnxk_gpio/meson.build\n+++ b/drivers/raw/cnxk_gpio/meson.build\n@@ -6,3 +6,4 @@ deps += ['bus_vdev', 'common_cnxk', 'rawdev', 'kvargs']\n sources = files(\n 'cnxk_gpio.c',\n )\n+headers = files('rte_pmd_cnxk_gpio.h')\ndiff --git a/drivers/raw/cnxk_gpio/rte_pmd_cnxk_gpio.h b/drivers/raw/cnxk_gpio/rte_pmd_cnxk_gpio.h\nnew file mode 100644\nindex 0000000000..c71065e10c\n--- /dev/null\n+++ b/drivers/raw/cnxk_gpio/rte_pmd_cnxk_gpio.h\n@@ -0,0 +1,38 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2021 Marvell.\n+ */\n+\n+#ifndef _RTE_PMD_CNXK_GPIO_H_\n+#define _RTE_PMD_CNXK_GPIO_H_\n+\n+/**\n+ * @file rte_pmd_cnxk_gpio.h\n+ *\n+ * Marvell GPIO PMD specific structures and interface\n+ *\n+ * This API allows applications to manage GPIOs in user space along with\n+ * installing interrupt handlers for low latency signal processing.\n+ */\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/** Available message types */\n+enum cnxk_gpio_msg_type {\n+\t/** Invalid message type */\n+\tCNXK_GPIO_MSG_TYPE_INVALID,\n+};\n+\n+struct cnxk_gpio_msg {\n+\t/** Message type */\n+\tenum cnxk_gpio_msg_type type;\n+\t/** Message data passed to PMD or received from PMD */\n+\tvoid *data;\n+};\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _RTE_PMD_CNXK_GPIO_H_ */\n", "prefixes": [ "06/10" ] }{ "id": 104425, "url": "