From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0080.outbound.protection.outlook.com [104.47.40.80]) by dpdk.org (Postfix) with ESMTP id 8393758D1 for ; Tue, 4 Jul 2017 06:54:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hRaSb0sUGaPO4oylYP4Y9XA0IjWr/sKFuIY8IiGJzZ4=; b=RHgNEkwctMgoMtvXWDmkBAx6nOvtWRX4LQnPSbkQgI9WKgZGOCPbc6Ucm6cjNNH+Msadrb/KE/YgHz5aDy69CmsVga2T17FhRyohEShn9j0kIn3oD5dM8yIY2LVwhgRpAAWgvN2phC3J+XJ0PMGqvvhm0+kd7u8p5zmhsJJ045k= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin.domain.name (106.200.206.49) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Tue, 4 Jul 2017 04:54:15 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: harry.van.haaren@intel.com, bruce.richardson@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, narender.vangati@intel.com, nikhil.rao@intel.com, gprathyusha@caviumnetworks.com Date: Tue, 4 Jul 2017 10:22:59 +0530 Message-Id: <20170704045329.24711-5-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170704045329.24711-1-jerin.jacob@caviumnetworks.com> References: <20170703191402.3638-1-jerin.jacob@caviumnetworks.com> <20170704045329.24711-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [106.200.206.49] X-ClientProxiedBy: BM1PR01CA0106.INDPRD01.PROD.OUTLOOK.COM (10.174.208.22) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8763fffc-7baf-400f-3a3d-08d4c298ba68 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 3:xIhCTq5XeSXItrAnSqAI6VH0OzBy3tVaYYZpN5Z0rIDEMIF2SkdRkbDceX6w84Ue/GQTfQJWs/cd2D901Lg/QcmVAJ1TdlcJHIqdWW9OwdO/KRfzVMUvRsCT5V2rGoI/lJkJf77ITFgMeeN5vgLhK1UFxsjnnV5O6Ts7/Av5SntebU5waAwb9KWTITM2oPjFmlEa6Uu5Db776BsnQnc0nvRae/7+0q+iRi5xO4vZzC5oFZuC6fjTZP3ytX3S96vsCuwqEEm3+bvXEZ/LGpLuuiOOFrAwJ8AF6NVd0vDhfGZK1VVdHwtzOPpdQd62r2srhKcGJ7nyPEWFFaR0sb7T3rrcsJmbtVtND0bXHaOy/44SWwGZMTPPL9r7/jjHh6jaiujASl/XnNvxM3lxy8iEZ9x0c5BMKRLTMPI6sTBQLRCAjnrU++yIX6Ji9VD1Lbk7/VAhpjelmSGd/SM92jOMwxVV4Rni21/0XotdJ6Nt0TfLEN2/eUathgJKnCTBUrXwI9vDUky3sRyU+g5DDqUXQ9Aw4kapqNP53AiDgWa/RnGLDMpMehjaqsSdkbzQltTZjM4gF7RLQyBzJDskK4zIndtsSRooYyoyVgzOk5oHa/a267ZS92aYUUTGrr1EjevblehUrb3m3q7PbAKIoZXJe7EdOJg61YAehYfY80Oq8sKxtw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o9p7emr4FqcODTOrOyFNxVXA6nIZCTMx6lqZWOfc/Yn7knZctO5QYfPSpknM+vWvv5C5bVhpeyEbrJTu+/xnEHGbNxwcEa88o1XWqCpMsXHYXkezcGes72aWIUVDDmuOrLa5nyZW1X57F4L4uwGBy/QqI5ipV4JVj53fkjg0PGPp+LlQTOzI12gFLj3/oNCWA1ON3wMfg49iyAkvZWsfjS45GfKnFxZlEjyQRUPD8DF2BUfQNrgSktgib5h9Kdgczji4lCZl5Aly2aVYeZes5bcoJOuIVN2ECtfOa2GP+RRF5wWvZ1GdJn8Cxe9uXoHBqXo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(148574349560750)(158140799945019)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 4:qdr67ptRzR680jAnhTHgxhqKbbZj7o1Pu7/FFqx9?= =?us-ascii?Q?W79hemBJ34KQYIeypvZEpTyVmLuW0OMamxvq50Ah37SfPUZp2hXhjA7Lu9eK?= =?us-ascii?Q?w7DidmlN5kW+Iql0f6v/K/r7saUJyli6RS9tmhxbSn2tIdAE58xcFCrKW+TV?= =?us-ascii?Q?Xl6t4d10ovAHHdPSQv4hFdxzy+tixDfRF8W42g8tTdaQKVPqdlvA8LEyWOgi?= =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8ulVUOs9x8h+?= =?us-ascii?Q?UM1CVxHvqEvi/3AC7xRTs3XCnBNi4OFEg2EPw+eDO60zKKxqboWiRxUHdywz?= =?us-ascii?Q?QSEO38dH7VaDQHHk+CSLBfPDoEaZVhr5yvIjPi2tkOwfciqoFsBB6I36bX2J?= =?us-ascii?Q?2GRIDdSqOvkfs2LBBghZYNg18rqTnOH0uyvuDEcm?= X-Forefront-PRVS: 0358535363 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39400400002)(39840400002)(39410400002)(39450400003)(4326008)(107886003)(38730400002)(6512007)(42186005)(6486002)(8656002)(6506006)(33646002)(53936002)(25786009)(6116002)(6916009)(1076002)(5003940100001)(3846002)(42882006)(47776003)(2950100002)(478600001)(2906002)(6666003)(66066001)(8676002)(50226002)(48376002)(81166006)(7736002)(110136004)(2361001)(2351001)(5009440100003)(189998001)(5660300001)(305945005)(72206003)(53416004)(50986999)(76176999)(50466002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:jerin.domain.name; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:rn+P7IInX4JFgjqXBMUFnn3BStxrf7EN9kZLeVP?= =?us-ascii?Q?AAcwqPGZ1LFvtFPPRqcwkp87C00ITMYuo0R4cBW3rvoYjWM0LbXEVeYeRve4?= =?us-ascii?Q?XBR8YRp4f4Htn7Cte4LsKy9bqWvWizpmagu97C+uMJeKuEBK+OddmrYtVkE1?= =?us-ascii?Q?pjwXfLatn7kJKoPg1DmQpqaYxppQyPVUcT9ur3Y1N89q1DXx8oQNn/sfX7Je?= =?us-ascii?Q?9Dz/nGN7u2/uI6944KR44BBzMhf+ro8Njiu4v+JL3lRH1u/nW7WcxpVZiQDa?= =?us-ascii?Q?Qd/CwCjldvqJBZMmjQLJsUAsJ7gJZESdH0WSCrauUg3oGfEb0Fh4mYSNU//H?=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+xoIa?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 6:85esfsxVJwuJ6OdZIvUV6VOVJDsLnHjWbUGH/4o8?= =?us-ascii?Q?/WgDqGjkX8zs3qc7q70CgWNNxp02jl0IjduttClwa1G3KfMfmMurQg1vfOGx?= =?us-ascii?Q?G4jVxOUgDEFJ4GyMjS8i8syrGu48R3HGlm3+rcnUXHId4x1R0RxRF+1OK04j?= =?us-ascii?Q?GxtKPdqEEZUHUr4CGBh0bgTqc4efKchExXzoV5yWxFqBGgV6KCxZl+5FLuXT?= =?us-ascii?Q?zXYMLYkZLnznL3XLramG4eKZHiPI/oJZZCbjgQW9emUw4c0CrRINJPeZJfs4?= =?us-ascii?Q?Ol/YDpjvaqbc5RPkUuz29gUzjtNwlnbV58fsHMxdFfop1sXSfSwD8jbAgGpn?= =?us-ascii?Q?POhXkZAAWG74Mk5CeQGz4lqeEiKdaPHMtCrBDnx+/D+qhQ42Fzlqh68DTCYg?= =?us-ascii?Q?PFnPuG8qNAmh1Sjhb3VqdKsNuMtdHq+AXUF+blVCVaWu5mopBtabguII5O77?= =?us-ascii?Q?r1ABDVzpS4lkZzaA82XH8JDyKeV2G+unkgiWgYTa9vBDZYCrLMzqwBfDLCMu?= =?us-ascii?Q?xs0XjMhNygcsTDDRHzCaJ7nUzonwuxgrYRh8IF2nthQZJOTy4xfk/u3yjXNE?= =?us-ascii?Q?/KXoAEZU56iO6WjUJ6PYQJkSvxaebO+rzo2lH7EjHZ8HENK0iU9c3N3Y/fS3?= =?us-ascii?Q?3uXzqh4/3Mi/Dll6kf18EhMk4A2YxzL+tjoezgNdQCgf4dg3z9EBFQt24upj?= =?us-ascii?Q?BGif8trk4HU+zfemA+Nc/dwaOhuQ/dA7QBrnc/2YxqHLL+afY8holeooFDXY?= =?us-ascii?Q?CJDNxfzqaMhGmp5DDihrv5MmuuCxkii+e1VAG/dRMXj/TKb5DA80Mm4bgYpk?= =?us-ascii?Q?d97ZWYtjcFwTMtpEgwPjurS8/EGeZsBsKMDUFEBPfHh4myEOfCK2CzLuuXcl?= =?us-ascii?Q?pVDi+RJOHJy8L6YBVKZUQzUSrb4KwNwM84T8Jb7kCZgMW60Bch5+jZ5stALq?= =?us-ascii?Q?TxraKA4yBTYmZxndKJtEjjm5pfXZtJ/zNkCuGnhhTUpqsPPZOBPvKRkYmE/9?= =?us-ascii?Q?Mp4=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 5:qX2FVs3ZjzKyvsbrmv/IuOTeTrK/WM6tOi9h2/7EmY3CacOZZmkuqDzkWwHFPMRw8v78jJdZ1Bp3MAaYwjChDsUkNY6YxHKScxam2BeOn7F8CPpo5cqkk/lFSJxWA3+11HbbRgbIX0A5dDP3nM9Wi6lOI/71nf14Pr+f8xIfcKGE0QzMSDE5A3HAnXWLLOlIJ75aKKNhg9tq1CXpxoTiSn3i4u6OlZ81yFrp22kUSP4Iu2raSkoYhR76HDjaBH6JCI9h3fsmoRAIIO3U/EMau07yr+s8bWKEawlLzkpuD0rii0C+K5IU+GcKix7uQOKVTM4P7kASJ/XiUfQak3e7hemn4hn4Xt+VR8+mh15biboko+m+oMQZHcoJBc0g4dgSXw6ZHq6N9nRaDAfzcSPMZdXFKet/kG7SSF7aXqx1pLJgc1/+PZVnz0uDUTKoFW+zlLv4j/Dcm8Kyp3+9UhUVomoO6O+dC+u0ewcNloU0lUSzOknq/rCRSUCeiE9eSM53; 24:hvLsVZ6AboCbd0M1YA4oZbLtQzC9Teo9icMNSO0WsCjCWBO1JRSaUjeYQopscPpAWFHivxsoVshn+C5qjuUpt5SykATZKavC8bbx+CWmFAs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 7:qhQZy5tmq88qfAGdBfhUCu6xw/pBGiO1H1saNeiAa+43T2exY/WNkXONklnb2LQY/z+d8u36yZzI0MkdUiD148riOX9jd1QLOIYsqwpXIA9jAjcxaline3L9JLrMedGYK9vipkfCr5xe1FqR/Bo8H4Apk39/qw/cR8pn3ezNX9rMYlJZemVoxeJU5l7pU1aoPmDuyHtx00xf1QjVM6lCa6Bt84Bgd7bQ4b+l1vuqryLhA3VU0TZsPS4CXCeGISDK1rEXMciJGcqbnWfU/hRSJ9puNp8N4ILfgKU7BF409B9Y7B4aLrGUwqzgAOwh7jjtGpYOXv3qhQ4TD8VPmq8pSEx6Wgl4SYKDeygGDLA/qWBkGaulzOcfA6TO9i3SYKMtNUNpWfpddLX71uQFHJQ1Ipf7+BRaPI+jBRDEWjDKH8s4p+AVmWtvKriuifbrsH8N7XLd3vmhy3PxX9jS5DiINxQdEJFUJX19eF03/Px8sByT2zHay99iSGaW4YoBD/zEO5w0KfHTUwmb/JYR1TV/KLN79VrvyFtB/QdHV95+TyDtkO4lSzSUqmPgtVIso2X57jsDCoEsWk4+HCCt7mTXsY8jKeFjLy+tsBgJEPk19D9Meis6xonjaGRDpiHgTfdcPjEUz7SwYj0zuF4HoepJ1p/HdBUAPhX2hPQ9vJIhqjBsTSGERh+u4DYi0INr1y1BqR7IzLoEcL92oXyCUtv+2uOikj7cICJMrgASVGDJoRl1Jx15IxhmmKliOJBUNKBi0t0dZQv+0YE1n3TJx/LvYWEvJM+Kt4Kp/mASNAXsX8g= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2017 04:54:15.6878 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: [dpdk-dev] [PATCH v3 04/34] app/testeventdev: add string parsing helpers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jul 2017 04:54:21 -0000 From: Guduri Prathyusha Add a couple of help functions that will allow parsing many types of input parameters, i.e.: bool, 16, 32, 64 bits, hex and list of cores etc. Derived from examples/ip_pipeline/parser.h Signed-off-by: Guduri Prathyusha Acked-by: Harry van Haaren --- app/test-eventdev/Makefile | 1 + app/test-eventdev/parser.c | 388 +++++++++++++++++++++++++++++++++++++++++++++ app/test-eventdev/parser.h | 79 +++++++++ 3 files changed, 468 insertions(+) create mode 100644 app/test-eventdev/parser.c create mode 100644 app/test-eventdev/parser.h diff --git a/app/test-eventdev/Makefile b/app/test-eventdev/Makefile index 8f4fc5f45..2e552a084 100644 --- a/app/test-eventdev/Makefile +++ b/app/test-eventdev/Makefile @@ -40,5 +40,6 @@ CFLAGS += $(WERROR_FLAGS) # SRCS-y := evt_main.c SRCS-y += evt_test.c +SRCS-y += parser.c include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-eventdev/parser.c b/app/test-eventdev/parser.c new file mode 100644 index 000000000..4925e196f --- /dev/null +++ b/app/test-eventdev/parser.c @@ -0,0 +1,388 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2016 Intel Corporation. All rights reserved. + * Copyright(c) 2017 Cavium Networks Ltd. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "parser.h" + +static uint32_t +get_hex_val(char c) +{ + switch (c) { + case '0': case '1': case '2': case '3': case '4': case '5': + case '6': case '7': case '8': case '9': + return c - '0'; + case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': + return c - 'A' + 10; + case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': + return c - 'a' + 10; + default: + return 0; + } +} + +int +parser_read_arg_bool(const char *p) +{ + p = skip_white_spaces(p); + int result = -EINVAL; + + if (((p[0] == 'y') && (p[1] == 'e') && (p[2] == 's')) || + ((p[0] == 'Y') && (p[1] == 'E') && (p[2] == 'S'))) { + p += 3; + result = 1; + } + + if (((p[0] == 'o') && (p[1] == 'n')) || + ((p[0] == 'O') && (p[1] == 'N'))) { + p += 2; + result = 1; + } + + if (((p[0] == 'n') && (p[1] == 'o')) || + ((p[0] == 'N') && (p[1] == 'O'))) { + p += 2; + result = 0; + } + + if (((p[0] == 'o') && (p[1] == 'f') && (p[2] == 'f')) || + ((p[0] == 'O') && (p[1] == 'F') && (p[2] == 'F'))) { + p += 3; + result = 0; + } + + p = skip_white_spaces(p); + + if (p[0] != '\0') + return -EINVAL; + + return result; +} + +int +parser_read_uint64(uint64_t *value, const char *p) +{ + char *next; + uint64_t val; + + p = skip_white_spaces(p); + if (!isdigit(*p)) + return -EINVAL; + + val = strtoul(p, &next, 10); + if (p == next) + return -EINVAL; + + p = next; + switch (*p) { + case 'T': + val *= 1024ULL; + /* fall through */ + case 'G': + val *= 1024ULL; + /* fall through */ + case 'M': + val *= 1024ULL; + /* fall through */ + case 'k': + case 'K': + val *= 1024ULL; + p++; + break; + } + + p = skip_white_spaces(p); + if (*p != '\0') + return -EINVAL; + + *value = val; + return 0; +} + +int +parser_read_int32(int32_t *value, const char *p) +{ + char *next; + int32_t val; + + p = skip_white_spaces(p); + if (!isdigit(*p)) + return -EINVAL; + + val = strtol(p, &next, 10); + if (p == next) + return -EINVAL; + + *value = val; + return 0; +} + +int +parser_read_uint64_hex(uint64_t *value, const char *p) +{ + char *next; + uint64_t val; + + p = skip_white_spaces(p); + + val = strtoul(p, &next, 16); + if (p == next) + return -EINVAL; + + p = skip_white_spaces(next); + if (*p != '\0') + return -EINVAL; + + *value = val; + return 0; +} + +int +parser_read_uint32(uint32_t *value, const char *p) +{ + uint64_t val = 0; + int ret = parser_read_uint64(&val, p); + + if (ret < 0) + return ret; + + if (val > UINT32_MAX) + return -ERANGE; + + *value = val; + return 0; +} + +int +parser_read_uint32_hex(uint32_t *value, const char *p) +{ + uint64_t val = 0; + int ret = parser_read_uint64_hex(&val, p); + + if (ret < 0) + return ret; + + if (val > UINT32_MAX) + return -ERANGE; + + *value = val; + return 0; +} + +int +parser_read_uint16(uint16_t *value, const char *p) +{ + uint64_t val = 0; + int ret = parser_read_uint64(&val, p); + + if (ret < 0) + return ret; + + if (val > UINT16_MAX) + return -ERANGE; + + *value = val; + return 0; +} + +int +parser_read_uint16_hex(uint16_t *value, const char *p) +{ + uint64_t val = 0; + int ret = parser_read_uint64_hex(&val, p); + + if (ret < 0) + return ret; + + if (val > UINT16_MAX) + return -ERANGE; + + *value = val; + return 0; +} + +int +parser_read_uint8(uint8_t *value, const char *p) +{ + uint64_t val = 0; + int ret = parser_read_uint64(&val, p); + + if (ret < 0) + return ret; + + if (val > UINT8_MAX) + return -ERANGE; + + *value = val; + return 0; +} + +int +parser_read_uint8_hex(uint8_t *value, const char *p) +{ + uint64_t val = 0; + int ret = parser_read_uint64_hex(&val, p); + + if (ret < 0) + return ret; + + if (val > UINT8_MAX) + return -ERANGE; + + *value = val; + return 0; +} + +int +parse_tokenize_string(char *string, char *tokens[], uint32_t *n_tokens) +{ + uint32_t i; + + if ((string == NULL) || + (tokens == NULL) || + (*n_tokens < 1)) + return -EINVAL; + + for (i = 0; i < *n_tokens; i++) { + tokens[i] = strtok_r(string, PARSE_DELIMITER, &string); + if (tokens[i] == NULL) + break; + } + + if ((i == *n_tokens) && + (strtok_r(string, PARSE_DELIMITER, &string) != NULL)) + return -E2BIG; + + *n_tokens = i; + return 0; +} + +int +parse_hex_string(char *src, uint8_t *dst, uint32_t *size) +{ + char *c; + uint32_t len, i; + + /* Check input parameters */ + if ((src == NULL) || + (dst == NULL) || + (size == NULL) || + (*size == 0)) + return -1; + + len = strlen(src); + if (((len & 3) != 0) || + (len > (*size) * 2)) + return -1; + *size = len / 2; + + for (c = src; *c != 0; c++) { + if ((((*c) >= '0') && ((*c) <= '9')) || + (((*c) >= 'A') && ((*c) <= 'F')) || + (((*c) >= 'a') && ((*c) <= 'f'))) + continue; + + return -1; + } + + /* Convert chars to bytes */ + for (i = 0; i < *size; i++) + dst[i] = get_hex_val(src[2 * i]) * 16 + + get_hex_val(src[2 * i + 1]); + + return 0; +} + +int +parse_lcores_list(bool lcores[], const char *corelist) +{ + int i, idx = 0; + int min, max; + char *end = NULL; + + if (corelist == NULL) + return -1; + while (isblank(*corelist)) + corelist++; + i = strlen(corelist); + while ((i > 0) && isblank(corelist[i - 1])) + i--; + + /* Get list of lcores */ + min = RTE_MAX_LCORE; + do { + while (isblank(*corelist)) + corelist++; + if (*corelist == '\0') + return -1; + idx = strtoul(corelist, &end, 10); + + if (end == NULL) + return -1; + while (isblank(*end)) + end++; + if (*end == '-') { + min = idx; + } else if ((*end == ',') || (*end == '\0')) { + max = idx; + if (min == RTE_MAX_LCORE) + min = idx; + for (idx = min; idx <= max; idx++) { + if (lcores[idx] == 1) + return -E2BIG; + lcores[idx] = 1; + } + + min = RTE_MAX_LCORE; + } else + return -1; + corelist = end + 1; + } while (*end != '\0'); + + return 0; +} diff --git a/app/test-eventdev/parser.h b/app/test-eventdev/parser.h new file mode 100644 index 000000000..75a5a3b45 --- /dev/null +++ b/app/test-eventdev/parser.h @@ -0,0 +1,79 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2016 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __INCLUDE_PARSER_H__ +#define __INCLUDE_PARSER_H__ + +#include + +#define PARSE_DELIMITER " \f\n\r\t\v" + +#define skip_white_spaces(pos) \ +({ \ + __typeof__(pos) _p = (pos); \ + for ( ; isspace(*_p); _p++) \ + ; \ + _p; \ +}) + +static inline size_t +skip_digits(const char *src) +{ + size_t i; + + for (i = 0; isdigit(src[i]); i++) + ; + + return i; +} + +int parser_read_arg_bool(const char *p); + +int parser_read_uint64(uint64_t *value, const char *p); +int parser_read_uint32(uint32_t *value, const char *p); +int parser_read_uint16(uint16_t *value, const char *p); +int parser_read_uint8(uint8_t *value, const char *p); + +int parser_read_uint64_hex(uint64_t *value, const char *p); +int parser_read_uint32_hex(uint32_t *value, const char *p); +int parser_read_uint16_hex(uint16_t *value, const char *p); +int parser_read_uint8_hex(uint8_t *value, const char *p); + +int parser_read_int32(int32_t *value, const char *p); + +int parse_hex_string(char *src, uint8_t *dst, uint32_t *size); + +int parse_tokenize_string(char *string, char *tokens[], uint32_t *n_tokens); + +int parse_lcores_list(bool lcores[], const char *corelist); +#endif -- 2.13.2