Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1920/?format=api
https://patches.dpdk.org/api/patches/1920/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1418209443-1744-3-git-send-email-jmiao@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": "<1418209443-1744-3-git-send-email-jmiao@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1418209443-1744-3-git-send-email-jmiao@redhat.com", "date": "2014-12-10T11:04:01", "name": "[dpdk-dev,v4,2/4] igb_uio: replace strict_strtoul with kstrtoul", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "c98cffba40ec98baf9987809eda1b49eab24d342", "submitter": { "id": 99, "url": "https://patches.dpdk.org/api/people/99/?format=api", "name": "Jincheng Miao", "email": "jmiao@redhat.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1418209443-1744-3-git-send-email-jmiao@redhat.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/1920/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/1920/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 9BE8B803E;\n\tWed, 10 Dec 2014 12:04:17 +0100 (CET)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id D53678031\n\tfor <dev@dpdk.org>; Wed, 10 Dec 2014 12:04:15 +0100 (CET)", "from int-mx11.intmail.prod.int.phx2.redhat.com\n\t(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])\n\tby mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBAB4CKD008417\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=FAIL); Wed, 10 Dec 2014 06:04:13 -0500", "from mon2.nay.redhat.com. ([10.66.6.6])\n\tby int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with\n\tESMTP id sBAB44GR010808; Wed, 10 Dec 2014 06:04:11 -0500" ], "From": "Jincheng Miao <jmiao@redhat.com>", "To": "dev@dpdk.org", "Date": "Wed, 10 Dec 2014 19:04:01 +0800", "Message-Id": "<1418209443-1744-3-git-send-email-jmiao@redhat.com>", "In-Reply-To": "<1418209443-1744-1-git-send-email-jmiao@redhat.com>", "References": "<1418209443-1744-1-git-send-email-jmiao@redhat.com>", "X-Scanned-By": "MIMEDefang 2.68 on 10.5.11.24", "Subject": "[dpdk-dev] [PATCH v4 2/4] igb_uio: replace strict_strtoul with\n\tkstrtoul", "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": "From upstream kernel commit 3db2e9cd, strict_strto* serial functions\nare removed. So that we should directly used kstrtoul instead.\n\nKstrtoul exists from RHEL6.4, so for compatible with old kernel and RHEL,\nadd some logic to igb_uio/compat.h, same as what we do for pci_num_vf().\n\nSigned-off-by: Jincheng Miao <jmiao@redhat.com>\n---\n lib/librte_eal/linuxapp/igb_uio/compat.h | 8 ++++++++\n lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 4 ++--\n 2 files changed, 10 insertions(+), 2 deletions(-)", "diff": "diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h b/lib/librte_eal/linuxapp/igb_uio/compat.h\nindex a36f034..455e8b4 100644\n--- a/lib/librte_eal/linuxapp/igb_uio/compat.h\n+++ b/lib/librte_eal/linuxapp/igb_uio/compat.h\n@@ -44,6 +44,14 @@ static int pci_num_vf(struct pci_dev *dev)\n \n #endif /* < 2.6.34 */\n \n+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) && \\\n+\t(!(defined(RHEL_RELEASE_CODE) && \\\n+\t RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6, 4)))\n+\n+#define kstrtoul strict_strtoul\n+\n+#endif /* < 2.6.39 */\n+\n #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) && \\\n \t(!(defined(RHEL_RELEASE_CODE) && \\\n \t RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6, 3)))\ndiff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c\nindex d1ca26e..47ff2f3 100644\n--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c\n+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c\n@@ -83,7 +83,7 @@ store_max_vfs(struct device *dev, struct device_attribute *attr,\n \tunsigned long max_vfs;\n \tstruct pci_dev *pdev = container_of(dev, struct pci_dev, dev);\n \n-\tif (0 != strict_strtoul(buf, 0, &max_vfs))\n+\tif (0 != kstrtoul(buf, 0, &max_vfs))\n \t\treturn -EINVAL;\n \n \tif (0 == max_vfs)\n@@ -174,7 +174,7 @@ store_max_read_request_size(struct device *dev,\n \tunsigned long size = 0;\n \tint ret;\n \n-\tif (strict_strtoul(buf, 0, &size) != 0)\n+\tif (0 != kstrtoul(buf, 0, &size))\n \t\treturn -EINVAL;\n \n \tret = pcie_set_readrq(pci_dev, (int)size);\n", "prefixes": [ "dpdk-dev", "v4", "2/4" ] }{ "id": 1920, "url": "