From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0044.outbound.protection.outlook.com [104.47.38.44]) by dpdk.org (Postfix) with ESMTP id 697B85A3E for ; Mon, 3 Jul 2017 21:14:55 +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=5UYZyt0jdPVT9nuo8Iq9rGoc1T5ROLeF+OJYOp3r6z8=; b=HkKl18rRnYiT1NAlq/4+fpjPKbgzdNeOEunF3uicC/GHceH8mrWRxE7YqHLfzIxc6Y2Z1MKG5yzqHY4G/1KH7fsPos3KGPQsjV15Xid+X5Dspzqkn1+e+bDLL50AVmkKT34rwHHMWY0BO4KOxF9/6pLd5lOzSTCsQfvFpEu34MU= 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 (111.93.218.67) by BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Mon, 3 Jul 2017 19:14:51 +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 00:43:32 +0530 Message-Id: <20170703191402.3638-5-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170703191402.3638-1-jerin.jacob@caviumnetworks.com> References: <20170528195854.6064-1-jerin.jacob@caviumnetworks.com> <20170703191402.3638-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0103.INDPRD01.PROD.OUTLOOK.COM (10.174.144.19) To BLUPR0701MB1716.namprd07.prod.outlook.com (10.163.85.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3196270c-0796-43d5-1040-08d4c247c965 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:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 3:ReTaL4O3zakqnJg0TgmW5sx3kMrOjgnHDQeizZwsHDO4zieUXBWxIVby2K1Ht3xVvmBewYc0epubXATU3zFylZIPo/BJj6wFdnhjVbZs6HSKL1bg0OJBArI+jQGeJyDMBnNDvV4PJRshXYu9K8QvC20lTKzbdmfUwJPXH+3gq16ymjFcZQcwUN6GFitJuI4OG/osVEH06u3Z0OOGP6CacT5vgUCnBJRLdiQ1sZMwP6KsgMRlVch3ShoVwD4sozqbbqcxcJ0meYJ+8PdgrhVuv2I7rtOmnuBOLyj9WQDo0cm+wqnqadL0sFEYT8rUcGqEJPCznVAWN482jtg+AhECRRCjjDcN5ecFkoe5hChzIv04KB54R+Ca0KN6MpNsWbsPgWsildpEhrY7o0aSNJW06pZuQAHmG5eURreT1YucH7QCTCPcyGL9EzanBe4W2EDH56qTNNnD8i0HCQKTPfnoz2Rm1buqoPqBbbBHJvVOW7u/buJJ7RQcqP/9eyx5Gb1klJVoZa30asxPl9UwDtpWMBtxt6Fcmw/TcXKvegDzPKEAmNY9pLRxiMcDMrlg7HK7e9l0b8YAPD0aqG93M3xfdTNSxf06KgRPgt6+R+ftZivKIeacDFFlQDXuj5n0BMPyyAm6i4VcfdzJezOJoP1up2o64AM0BwReqr+3bw3IuKmSOeJbDtjywcdLK3q71XpGq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GDtAkXtQ+SgFkbMCwT3FAtOb3nzsmsecgSN25Jil+y1VfPKe6JJ746Q4YNpXYlsIWh0xDxhuOrgXSGVLtjNKWNRIfPYJOu0azhxL/fKwS25PkkNz6ioZQ9LNarKOjlvf8R0MLwciZDWpUm9ztMiRk3vVa0oK0aBGm860G8iEbLlt36ThoFi2rV1EJGFI0y7JwBEDZbqVDegxwdI4+UuyOG3PlaOyNnBH0KP0FYJmAimUoNy/iC9GAzORiC+1B1OrNs2kmDlEdrIVO+xFkcoGxXpp+E9lfSvjlsCUqBQs= 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)(93006095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1716; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1716; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1716; 4:7bdKxa/36C4CaAzxO8fBKRRvgaUzzXzTAP9/rZXx?= =?us-ascii?Q?eol11Y/NdAlIajbGfJOYsIvW3CaHOlfBRAXtVVcAcpKDSa6ZIaEiQYvWbu2e?= =?us-ascii?Q?FCw5Qdbs2kw3GYDZA8rTaE/EfIDGWp6TKjDO4bUrcKiG25xpEnunsW8hduOR?= =?us-ascii?Q?MuQe3rlI+pOkc9KT+XF8wvdYGI5a/hrAI2gCvfQxOZG8sETEhK17qd13Uvpv?= =?us-ascii?Q?BRrNAQ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ovaz?= =?us-ascii?Q?D1BOdu/4jJdruKsuphQRWdNvFJs/P4LzoKgxDPyLBurnClgGZ2rnKrkDT9oH?= =?us-ascii?Q?q2K+k3ExSIZSChQeBeNQKrmTQPFPUyf/Tba+xQdDRIA1SkxmmFRr8BGb4gDi?= =?us-ascii?Q?31HoWaevkJNhGoVQB5cd9Vgbmy86nXnm5KnzXjaF?= X-Forefront-PRVS: 035748864E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39840400002)(39400400002)(39410400002)(39450400003)(7736002)(478600001)(53416004)(72206003)(38730400002)(110136004)(107886003)(42186005)(8656002)(50986999)(76176999)(36756003)(6512007)(53936002)(4326008)(25786009)(5003940100001)(6916009)(42882006)(2950100002)(66066001)(5009440100003)(6666003)(2351001)(2361001)(6486002)(6116002)(189998001)(305945005)(33646002)(5660300001)(81166006)(8676002)(3846002)(47776003)(1076002)(2906002)(50466002)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1716; H:jerin.domain.name; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1716; 23:z0LspZKClHjg5sKg2vSk8Nk1RiYvMJdRw0u/buI?= =?us-ascii?Q?JRp4mMXQzIH/WYBM12E6d9SeejC1JNOCdvm0OASKKH+ctfW35XyidX/fcuyb?= =?us-ascii?Q?sHJG9+q47I2PV3VDEbwzuRMwbToiiBejfcqXmWGnPOJwlhcbEcq/OzVH46OH?= =?us-ascii?Q?Qavw3hImWvpP3VZZoNLGzp6dS1Koy9x7UYBuRs1VetPcigWUa9uHFDjEG00t?= =?us-ascii?Q?z0IZzfzeCtE0T/gMhNZDYogWIWfNImNrgwTmghfPQPvVZQdRdnYDu+qdTnJ3?= =?us-ascii?Q?l6H5dLgxU7oQRQrMfX0Yr/iaHdEBBtKDv8AQEPcD9e7PaTrvizfoBkSrBLJ4?= =?us-ascii?Q?0c6o5QeAt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-ascii?Q?DmofqWcUDx6dvfxDg6pvlcxV8chbxQwXdBifVyET8oBHJf24RZsWL/d6gobR?= =?us-ascii?Q?s0shTxyaScCCKLvieCZRGfKscPQFHAc2aQhiwX6GVlnc6V921zdSrJG6cbdf?= =?us-ascii?Q?tf0=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 5:OkM5Xeyoc9U5yg+eLREKEfAvabrAygsyIomo9tx1JFfLHTb0VbPe60UXFlWtM79cy3wLwJ4Wjz1AEvnn1X0gSZjwXcnoRgwwILd9uZj7jVEAGbpezhJrS4kpeWzyET6HGGd8fgzU8sjjGM90AEvn2QmLnmpnpTVFBGUj+yCErI2Q4o7xEH6PMG1dvrRVVW03f62kdplvLSbeEOvUVGWAb+k8ScQwN27gF7q8/jmiTS97K3evddril9bKjIomXI+AP7/EMuVSgCCR9/gQFZ+t25MM5xDA1nT8dJrZzpuXa6YeXZBfxX0BCLm+G+cNf34GabiAvbMY6WrcCa4Zu/4+nvfRA90sb6kyJueUuAURInj+dyUHSkSNTEE67WS1VFBqQ8N2nNsRNGF6OIManxXkuL/hhJlynooHw0fRIEgW4XX5s0MwD2iMQ3cQURb7KwaPRTl/dSRlWoCYVGL8B99qetC4431/O6LVUJE6OkfF8NQcv6pwP7ZWGu1GltJIwsCj; 24:izayGUY1eS0kmn29HEm6p8y4umr0QIaLU1uD0b2+6No8ao1eQUR/Z6ANfMJkcs+lDQcHjSoVMIrqY4y6cU6nws6/tL9BhyMNsiXDMybmUDI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1716; 7:HlbbMKFOlqh/4J6JnRrOE/EJU65xbTQEm4/7m/yy7wcRhk6n8rJSLant0eAmk0coMd0f2wrwikM+ehBiauJazv2C10qE6RUjq2RLQ1vk++xDYfGwPKE7Su+PpyIHCdEhCK4QcxBTobum8Abc7O17xmXRQFQdJ6ezD2W6Bvg1WqvIvhs+jHNs3jC0DFPvVIlrr349UuiMQj4RZO+XIzoj96vcWh2gQRJleOra3oI1zurfS+NRbhyuuEYtOwIbo0hRRlnlHmsCtm42hDhYQ6FGkYXH7f7q8je83+6OsN9AzQLekpdm2xaSD6zefnkeuR6fprIU+lhXBCLmRD8Qj8+fkCci0jZ8FN51vkjy481G6fo8eyewc0FVF0M6dg9PLFnndlk9DQhAoWnaVVf22HrzmRhI8oXHnfeeBnkXFSJIS/cPUh9/L97Xr2UHy3T8t3uieu60lPXRLWJt6GmeNVPQwa3dQX7m5+JDqDWM+5QqiE4XsiVREx/qtxcXkFY1uwlOvHvs/EhchpTNV9pXZfxZb6asihz2G4L28ZCLW0lZG1lXyNPcdBjAe5iyaCSSQ2f9gnu83e/foHJDG07dSwe3sSRVK2ke4QHlEylbzJBEuRY1A+i4Ay5lLxIQyln4T89qsiCfYP3hQZxvUObTlW75I799EmajBRf1/9G9NGP67PNdRyB20ea1XsCH1AGtxxoJqCU6l4qgXTEju5sc5N6cuSUKb6p3gA5fdbF9NHBXhcgeqyowaBDIoplWeEk+yauwDMeTxMtJvDxJa/EYOwlIdvsy4t3xOzeK6sDSFdhepDc= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2017 19:14:51.2297 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1716 Subject: [dpdk-dev] [PATCH v2 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: Mon, 03 Jul 2017 19:14:55 -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 | 435 +++++++++++++++++++++++++++++++++++++++++++++ app/test-eventdev/parser.h | 79 ++++++++ 3 files changed, 515 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..a361b821b --- /dev/null +++ b/app/test-eventdev/parser.c @@ -0,0 +1,435 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 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. + */ + +/* + * For my_ether_aton() function: + * + * Copyright (c) 2009, Olivier MATZ + * 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 the University of California, Berkeley 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 REGENTS 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 REGENTS AND 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. + */ + +/* + * For inet_pton4() and inet_pton6() functions: + * + * Copyright (c) 1996 by Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#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