From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f175.google.com (mail-qk0-f175.google.com [209.85.220.175]) by dpdk.org (Postfix) with ESMTP id 53D415A8B for ; Thu, 4 Jun 2015 02:12:54 +0200 (CEST) Received: by qkoo18 with SMTP id o18so15702061qko.1 for ; Wed, 03 Jun 2015 17:12:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=nX0oGtBBIujFXF5vnydONqNb+p9XdAjgdpCCmAnT0Dk=; b=b+csHFxTl+Xzs/uN3q4x2phi8bYLH0QZEjA1ko536J8WW+RXFb7E7SZy5eK5Li124Y 0Lg6GWImc8jyzsXjpKCHjHDa3T9YAPe0GQoL086maVO0OU4rNnPpdD9eD8UdPPbzjNgb fei9DLK5Eq7BjDAlzeFPxjhflFgKHqWfN6JZ6GDb2qT7VHFmGkaIrZHCuFVrmAVxCcSC 7Axb+xpe3LXedfV0mWMRPNF9QJkN4bbWGSO+QrJgp6wdR0Iw06/8uR+WGWeJGM8E19OB jpfK0oXk0w5i/YDo904T08vJfyVSOLhcfL6XcQbm2NYGLZGmMFnPseNfNIgxL81kUtXL DfCg== X-Gm-Message-State: ALoCoQm88vO6z9vh+2bKsCgO4z4pIEUCAa3v+BfEUZ9wpQGp0n89M93PvCU4r9A45rrcmOQXoDx6 X-Received: by 10.55.18.144 with SMTP id 16mr63265685qks.17.1433376773886; Wed, 03 Jun 2015 17:12:53 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id d197sm455804qka.21.2015.06.03.17.12.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jun 2015 17:12:53 -0700 (PDT) Date: Wed, 3 Jun 2015 17:12:55 -0700 From: Stephen Hemminger To: Keith Wiles Message-ID: <20150603171255.545e0df8@urahara> In-Reply-To: <1433357393-54434-1-git-send-email-keith.wiles@intel.com> References: <1433357393-54434-1-git-send-email-keith.wiles@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [RFC PATCH] eal:Add new API for parsing args at rte_eal_init time X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2015 00:12:55 -0000 On Wed, 3 Jun 2015 13:49:53 -0500 Keith Wiles wrote: > +/* Launch threads, called at application init() and parse app args. */ > +int > +rte_eal_init_parse(int argc, char **argv, > + int (*parse)(int, char **)) > +{ > + int ret; > + > + ret = rte_eal_init(argc, argv); > + if ((ret >= 0) && (parse != NULL)) { > + argc -= ret; > + argv += ret; This won't work C is call by value.