Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/40536/?format=api
https://patches.dpdk.org/api/patches/40536/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/feb11c52d421567123dc1da39eed9e3e9e16b358.1527764061.git.anatoly.burakov@intel.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": "<feb11c52d421567123dc1da39eed9e3e9e16b358.1527764061.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/feb11c52d421567123dc1da39eed9e3e9e16b358.1527764061.git.anatoly.burakov@intel.com", "date": "2018-05-31T10:57:48", "name": "[dpdk-dev,RFC,1/3] fbarray: allow zero-sized elements", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": true, "hash": "e6b96ad603f5c4ea658d69ede7a02eae062ce270", "submitter": { "id": 4, "url": "https://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.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/feb11c52d421567123dc1da39eed9e3e9e16b358.1527764061.git.anatoly.burakov@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/40536/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/40536/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 589C74CBD;\n\tThu, 31 May 2018 12:58:09 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 46ED74C8E\n\tfor <dev@dpdk.org>; Thu, 31 May 2018 12:58:06 +0200 (CEST)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t31 May 2018 03:58:03 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga001.jf.intel.com with ESMTP; 31 May 2018 03:58:00 -0700", "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tw4VAw0cU004129; Thu, 31 May 2018 11:58:00 +0100", "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w4VAvx56002502;\n\tThu, 31 May 2018 11:57:59 +0100", "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w4VAvx3J002497;\n\tThu, 31 May 2018 11:57:59 +0100" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.49,463,1520924400\"; d=\"scan'208\";a=\"60619520\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net, hemant.agrawal@nxp.com, bruce.richardson@intel.com, \n\tferruh.yigit@intel.com, konstantin.ananyev@intel.com,\n\tjerin.jacob@caviumnetworks.com, olivier.matz@6wind.com,\n\tstephen@networkplumber.org, nhorman@tuxdriver.com,\n\tdavid.marchand@6wind.com, gowrishankar.m@linux.vnet.ibm.com", "Date": "Thu, 31 May 2018 11:57:48 +0100", "Message-Id": "<feb11c52d421567123dc1da39eed9e3e9e16b358.1527764061.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": [ "<cover.1527764061.git.anatoly.burakov@intel.com>", "<cover.1527764061.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1527764061.git.anatoly.burakov@intel.com>", "<cover.1527764061.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [RFC 1/3] fbarray: allow zero-sized elements", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://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": "<https://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": "We need to keep usage of our memory area indexed, but we don't\nactually need to store any data - we need just the indexing\ncapabilities of fbarray. Yet, it currently disallows zero-sized\nelements. Fix that by removing the check for zero-sized elements -\nthe rest will work correctly already.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/eal_common_fbarray.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c\nindex 019f84c18..4a365e7ce 100644\n--- a/lib/librte_eal/common/eal_common_fbarray.c\n+++ b/lib/librte_eal/common/eal_common_fbarray.c\n@@ -391,9 +391,9 @@ set_used(struct rte_fbarray *arr, unsigned int idx, bool used)\n }\n \n static int\n-fully_validate(const char *name, unsigned int elt_sz, unsigned int len)\n+fully_validate(const char *name, unsigned int len)\n {\n-\tif (name == NULL || elt_sz == 0 || len == 0 || len > INT_MAX) {\n+\tif (name == NULL || len == 0 || len > INT_MAX) {\n \t\trte_errno = EINVAL;\n \t\treturn -1;\n \t}\n@@ -420,7 +420,7 @@ rte_fbarray_init(struct rte_fbarray *arr, const char *name, unsigned int len,\n \t\treturn -1;\n \t}\n \n-\tif (fully_validate(name, elt_sz, len))\n+\tif (fully_validate(name, len))\n \t\treturn -1;\n \n \tpage_sz = sysconf(_SC_PAGESIZE);\n@@ -511,7 +511,7 @@ rte_fbarray_attach(struct rte_fbarray *arr)\n \t * the array, so the parts we care about will not race.\n \t */\n \n-\tif (fully_validate(arr->name, arr->elt_sz, arr->len))\n+\tif (fully_validate(arr->name, arr->len))\n \t\treturn -1;\n \n \tpage_sz = sysconf(_SC_PAGESIZE);\n@@ -858,7 +858,7 @@ rte_fbarray_dump_metadata(struct rte_fbarray *arr, FILE *f)\n \t\treturn;\n \t}\n \n-\tif (fully_validate(arr->name, arr->elt_sz, arr->len)) {\n+\tif (fully_validate(arr->name, arr->len)) {\n \t\tfprintf(f, \"Invalid file-backed array\\n\");\n \t\tgoto out;\n \t}\n", "prefixes": [ "dpdk-dev", "RFC", "1/3" ] }{ "id": 40536, "url": "