Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/7342/?format=api
https://patches.dpdk.org/api/patches/7342/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1443652138-31782-2-git-send-email-stephen@networkplumber.org/", "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": "<1443652138-31782-2-git-send-email-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/1443652138-31782-2-git-send-email-stephen@networkplumber.org", "date": "2015-09-30T22:28:57", "name": "[dpdk-dev,1/2] uio: add support for ioctls", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "5d9ee9386a66cf0fe60a94ac5047f44c2671b4dd", "submitter": { "id": 27, "url": "https://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1443652138-31782-2-git-send-email-stephen@networkplumber.org/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/7342/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/7342/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id BD6DF8E56;\n\tThu, 1 Oct 2015 00:28:54 +0200 (CEST)", "from mail-pa0-f54.google.com (mail-pa0-f54.google.com\n\t[209.85.220.54]) by dpdk.org (Postfix) with ESMTP id 251638D8A\n\tfor <dev@dpdk.org>; Thu, 1 Oct 2015 00:28:52 +0200 (CEST)", "by pacfv12 with SMTP id fv12so53962680pac.2\n\tfor <dev@dpdk.org>; Wed, 30 Sep 2015 15:28:51 -0700 (PDT)", "from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net.\n\t[50.53.82.155]) by smtp.gmail.com with ESMTPSA id\n\tgw3sm2603289pbc.46.2015.09.30.15.28.50\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 30 Sep 2015 15:28:50 -0700 (PDT)" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=lyuhMHZGtnqW5d0x4cQhF02RPCQAbRGbUvhWnI2571Q=;\n\tb=cxONMsNZey+PdMkCrXKx/jKD5GBYzqD5taA8MOmCI3eTAZEJ+prhR2phM5DpHrv2Ng\n\tDe5VbV0sRrZP+2e13tPYUxS04cB9vomQS45tN93P9LDue3fYGJVjWvBzCsBKKZpfDBc8\n\tpfJdRhcZWj/mZ63IhA2DROtIKbHXwnZlaBIshp61ut6oJq9m5NISqWMiD1ahVc4+PgNG\n\t3Lcf/0vd9vbwAszbhnl1EYpYXjOGicE6RylhMld1Z2N8TUDzjDknF894A9+AfadxhRzg\n\t6ebMiTDTiic4qzd0tIokSE8BRIUYwRRS244a1Eg/IQfUGRDoh5j9j75s0a/2/yAYSEqw\n\t1JrQ==", "X-Gm-Message-State": "ALoCoQnLExiwHR7eOfxfOZ5+GYaLaH2JzG+qHgfjMWMKRF770+TrbcwloH/+zAni75RfdN/txdPe", "X-Received": "by 10.69.16.166 with SMTP id fx6mr7747747pbd.18.1443652131573;\n\tWed, 30 Sep 2015 15:28:51 -0700 (PDT)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "hjk@hansjkoch.de,\n\tgregkh@linux-foundation.org", "Date": "Wed, 30 Sep 2015 15:28:57 -0700", "Message-Id": "<1443652138-31782-2-git-send-email-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1443652138-31782-1-git-send-email-stephen@networkplumber.org>", "References": "<1443652138-31782-1-git-send-email-stephen@networkplumber.org>", "Cc": "dev@dpdk.org, linux-kernel@vger.kernel.org", "Subject": "[dpdk-dev] [PATCH 1/2] uio: add support for ioctls", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Allow UIO device driver to provide ioctl interface.\nThis allow additional API's for UIO.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n drivers/uio/uio.c | 15 +++++++++++++++\n include/linux/uio_driver.h | 3 +++\n 2 files changed, 18 insertions(+)", "diff": "diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c\nindex 8196581..5ab32ab 100644\n--- a/drivers/uio/uio.c\n+++ b/drivers/uio/uio.c\n@@ -576,6 +576,20 @@ static ssize_t uio_write(struct file *filep, const char __user *buf,\n \treturn retval ? retval : sizeof(s32);\n }\n \n+static long uio_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)\n+{\n+\tstruct uio_listener *listener = filep->private_data;\n+\tstruct uio_device *idev = listener->dev;\n+\n+\tif (!idev->info)\n+\t\treturn -EIO;\n+\n+\tif (!idev->info->ioctl)\n+\t\treturn -ENOTTY;\n+\n+\treturn idev->info->ioctl(idev->info, cmd, arg);\n+}\n+\n static int uio_find_mem_index(struct vm_area_struct *vma)\n {\n \tstruct uio_device *idev = vma->vm_private_data;\n@@ -712,6 +726,7 @@ static const struct file_operations uio_fops = {\n \t.write\t\t= uio_write,\n \t.mmap\t\t= uio_mmap,\n \t.poll\t\t= uio_poll,\n+\t.unlocked_ioctl\t= uio_ioctl,\n \t.fasync\t\t= uio_fasync,\n \t.llseek\t\t= noop_llseek,\n };\ndiff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h\nindex 32c0e83..10d7833 100644\n--- a/include/linux/uio_driver.h\n+++ b/include/linux/uio_driver.h\n@@ -89,6 +89,7 @@ struct uio_device {\n * @mmap:\t\tmmap operation for this uio device\n * @open:\t\topen operation for this uio device\n * @release:\t\trelease operation for this uio device\n+ * @ioctl:\t\tioctl handler\n * @irqcontrol:\t\tdisable/enable irqs when 0/1 is written to /dev/uioX\n */\n struct uio_info {\n@@ -105,6 +106,8 @@ struct uio_info {\n \tint (*open)(struct uio_info *info, struct inode *inode);\n \tint (*release)(struct uio_info *info, struct inode *inode);\n \tint (*irqcontrol)(struct uio_info *info, s32 irq_on);\n+\tint (*ioctl)(struct uio_info *info, unsigned int cmd,\n+\t\t unsigned long arg);\n };\n \n extern int __must_check\n", "prefixes": [ "dpdk-dev", "1/2" ] }{ "id": 7342, "url": "