From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 0DD401B1F7 for ; Thu, 12 Oct 2017 10:22:00 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id i124so10779474wmf.3 for ; Thu, 12 Oct 2017 01:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=ReRXYnX+Wquy8yrf8JtxNihogXxy3q3TMY7Rg2UWLXg=; b=UFHJEAgyUobUGXEWrqV8a/mOTmH/K58O2ls4TeXBPGVMBR5UYI60heEJ+kYtuuwU9P SDyqYZNY79/pCj3RA0pGujtqWsY4i9ZzFUSTzRpw1mxeskRPVc4EcFRJRX3qXROxcQpn 6z6yEyhmGhhyd24azTN1aWa0V+j98DEGDAh4HlT1e20oeY2ZXs8HF/37mxkm2uLXxNpq sTQsEyrr4Web9oRyRtKg3gPQB5oHFnMnnNhsxHwQWHDhOqm38Q+omcTmQaCI7Hl0tuVt youS3t68NsOEvr1pvap1BST3ZjZK+rU+g0XNZHiipmxhF4GEe3pXAXDWF7/9+UWEUgfr sozw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=ReRXYnX+Wquy8yrf8JtxNihogXxy3q3TMY7Rg2UWLXg=; b=t8EETxgVx1SfZuRcsgT1ppAf6O0Yue4q634LqxdJCXx8q0yf5w4oOivpIMwgAuPKC/ qhYq6HF6WgzfOxg1gtTUG+muYodUQE+ZPblbYonufMGAcIvQqluTW92pmm/OPkC48DW7 UyHr56qMxYWpH0A5lDYfPWdTbJQHLTHPdhn3Q9AK/phxCpxCmxADE+YScaFsDnSnqLuw VXZIVV3rX5vQA1uiX9DiB13TkatDJqP/HGxj7DBsRHstOiNgwTpnRz0geRdpwxfB6Kjn afEZTOCZpGFttaH8edxmw2+vcUDF/59z09Zr38y2SGYRk46x+L3xkIa3lyNQZuLNqT3X Caug== X-Gm-Message-State: AMCzsaU/KGA/frm1g9oIYSXYxZxcyBV7SNJl45A4sB/QfNaXWKNzGEZs WFbA7AOWrA4d1V06k0W+rJLp0vrC X-Google-Smtp-Source: AOwi7QABN0YlCTzVDX08sj9E7x+kVZx6qHzv/H0jzIhH/yjv69K4rdSyEewRyYfwd5p0gYA4sEB7+w== X-Received: by 10.223.178.83 with SMTP id y19mr1508983wra.255.1507796520192; Thu, 12 Oct 2017 01:22:00 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 200sm19424728wmu.44.2017.10.12.01.21.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Oct 2017 01:21:59 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 12 Oct 2017 10:21:23 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 16/18] devargs: remove old devargs parsing function 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: Thu, 12 Oct 2017 08:22:01 -0000 This functionality is already covered by rte_eal_devargs_parse. Signed-off-by: Gaetan Rivet --- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - lib/librte_eal/common/eal_common_devargs.c | 30 ------------------------- lib/librte_eal/common/include/rte_devargs.h | 28 ----------------------- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 - 4 files changed, 60 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map index 13c8450..aae8d32 100644 --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map @@ -32,7 +32,6 @@ DPDK_2.0 { rte_eal_lcore_role; rte_eal_mp_remote_launch; rte_eal_mp_wait_lcore; - rte_eal_parse_devargs_str; rte_eal_process_type; rte_eal_remote_launch; rte_eal_tailq_lookup; diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c index 1d87cd9..82c8573 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c @@ -53,36 +53,6 @@ TAILQ_HEAD(rte_devargs_list, rte_devargs); struct rte_devargs_list devargs_list = TAILQ_HEAD_INITIALIZER(devargs_list); -int -rte_eal_parse_devargs_str(const char *devargs_str, - char **drvname, char **drvargs) -{ - char *sep; - - if ((devargs_str) == NULL || (drvname) == NULL || (drvargs == NULL)) - return -1; - - *drvname = strdup(devargs_str); - if (*drvname == NULL) - return -1; - - /* set the first ',' to '\0' to split name and arguments */ - sep = strchr(*drvname, ','); - if (sep != NULL) { - sep[0] = '\0'; - *drvargs = strdup(sep + 1); - } else { - *drvargs = strdup(""); - } - - if (*drvargs == NULL) { - free(*drvname); - *drvname = NULL; - return -1; - } - return 0; -} - static int bus_name_cmp(const struct rte_bus *bus, const void *name) { diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h index 1fe03d6..499f7e3 100644 --- a/lib/librte_eal/common/include/rte_devargs.h +++ b/lib/librte_eal/common/include/rte_devargs.h @@ -74,34 +74,6 @@ struct rte_devargs { }; /** - * Parse a devargs string. - * - * For PCI devices, the format of arguments string is "PCI_ADDR" or - * "PCI_ADDR,key=val,key2=val2,...". Examples: "08:00.1", "0000:5:00.0", - * "04:00.0,arg=val". - * - * For virtual devices, the format of arguments string is "DRIVER_NAME*" - * or "DRIVER_NAME*,key=val,key2=val2,...". Examples: "net_ring", - * "net_ring0", "net_pmdAnything,arg=0:arg2=1". - * - * The function parses the arguments string to get driver name and driver - * arguments. - * - * @param devargs_str - * The arguments as given by the user. - * @param drvname - * The pointer to the string to store parsed driver name. - * @param drvargs - * The pointer to the string to store parsed driver arguments. - * - * @return - * - 0 on success - * - A negative value on error - */ -int rte_eal_parse_devargs_str(const char *devargs_str, - char **drvname, char **drvargs); - -/** * Parse a device string. * * Verify that a bus is capable of handling the device passed diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map index a6fe25c..323f799 100644 --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map @@ -32,7 +32,6 @@ DPDK_2.0 { rte_eal_lcore_role; rte_eal_mp_remote_launch; rte_eal_mp_wait_lcore; - rte_eal_parse_devargs_str; rte_eal_process_type; rte_eal_remote_launch; rte_eal_tailq_lookup; -- 2.1.4