From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id BEEE61B534 for ; Tue, 9 Oct 2018 16:17:17 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4991521CFC; Tue, 9 Oct 2018 10:17:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 09 Oct 2018 10:17:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=vao+7HOD+ypFex6HGY7uHS3s+D8dD6QkrLLgxH5d370=; b=G3TAkL7TYUe4 bdi4qN7ne/k+zdNAi1BxElE7nHV7x+zDbmhZqe3exxznZIQ85bA+5Z2/Jn5iisfg D1M/sxFeACfy1VOrPyuRpuNdWvJYqB+M6jEutpxpmIs5oUTVBX5lrk0AJwAORZYz HEdIzXuYZRNhuupTOrbxb42qogvTha4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=vao+7HOD+ypFex6HGY7uHS3s+D8dD6QkrLLgxH5d3 70=; b=wME3Ro+Oo45rAqKIYB6MiLcQiMZUudf3ZoTJCre8Ae2RSPUpxcpQC6OQO Xi/iQb4mSZtmD4BxDWCx/uXrmvafUhvKbcSRg7ClCtcnKrChVLo1n7JrycsZ0oak QvNxDVRX14e6phCCXe4zu3/jIcIl0lDYJl9t8qF3+ZIuSfpnUzGWy8+CrXr9OByB VrY73raTlZJYZmFLEpZyCa13VnGs++FmvGuL8UfKXToJSnRdjaht2UOuyW6Cu0nq JYDAXLY/wOPCs3TPIfUiRUZ50syGuYfikifcr+DNGYU6QthMNXKdTJ0CzvJu7iBf 4QQPV14a6mftRANsYzuuO0aeIT0dg== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 8971E102EC; Tue, 9 Oct 2018 10:17:15 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: gaetan.rivet@6wind.com, ophirmu@mellanox.com, ferruh.yigit@intel.com, arybchenko@solarflare.com Date: Tue, 09 Oct 2018 16:17:14 +0200 Message-ID: <1710140.5mMnjyfntK@xps> In-Reply-To: <20181009133450.19112-3-thomas@monjalon.net> References: <20181007222554.4886-1-thomas@monjalon.net> <20181009133450.19112-1-thomas@monjalon.net> <20181009133450.19112-3-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 2/6] ethdev: add iterator to match devargs input 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, 09 Oct 2018 14:17:18 -0000 09/10/2018 15:34, Thomas Monjalon: > +int __rte_experimental > +rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str) > +{ > + int ret; > + struct rte_devargs devargs = {.args = NULL}; > + const char *bus_param_key; > + char *bus_str = NULL; > + char *cls_str = NULL; > + size_t str_size; Because of the new test below, the type must be fixed to int. [...] > + ret = snprintf(cls_str, str_size, "+%s", devargs.args); > + if (ret != str_size - 1) { > + ret = -EINVAL; > + goto error; > + }