From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5] ip_pipeline: configuration file parser cleanup Date: Wed, 08 Jun 2016 20:05:27 +0200 Message-ID: <2425429.KNKilsUfuN@xps13> References: <1464618804-78135-1-git-send-email-jasvinder.singh@intel.com> <1465403456-137137-1-git-send-email-jasvinder.singh@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, cristian.dumitrescu@intel.com To: Jasvinder Singh Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id AB3E7C13E for ; Wed, 8 Jun 2016 20:05:29 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id v199so75123880wmv.0 for ; Wed, 08 Jun 2016 11:05:29 -0700 (PDT) In-Reply-To: <1465403456-137137-1-git-send-email-jasvinder.singh@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-06-08 17:30, Jasvinder Singh: > This commit adds following changes to configuration file parsing of > the ip pipeline application; > > 1. Parsing routines related to packet queues (pktq_in/out fields in the > PIPELINE section) and message queues (msgq_in/out fields of in the MSGQ > Section) are updated. > > In the parsing routines, function "strtok_r()" is used for parsing the > string instead of manually checking the string termination, white > spaces, tabs etc., between the string tokens. Each call to strtok_r() > returns a pointer to a null-terminated string containing the next token. > If no more tokens are found, strtok_r() returns NULL. As a result of > using strtok_r(), the code size of the parsing routines is reduced > significantly. > > 2. Replace PARSER_PARAM_ADD_CHECK macro by more specific macros such as > PARSE_CHECK_DUPLICATE_SECTION, PARSE_CHECK_DUPLICATE_SECTION_EAL to detect > duplicate entries in the various sections of the configuration file > > 3. Add new macros PARSER_ERROR_NO_ELEMENTS and PARSE_ERROR_TOO_MANY_ELEMENTS > for detecting no element and more elements than allowed situations > respectively, in the section entry. > > 4. Add new macros APP_PARAM_ADD_LINK_FOR_RXQ, APP_PARAM_ADD_LINK_FOR_TXQ > and APP_PARAM_ADD_LINK_FOR_TM which add corresponding nic ports entry to > the application param structure while parsing rx/tx queues, TM (Traffic > Manager) port sections and pktq_in/out entries of pipeline sections > > Signed-off-by: Jasvinder Singh > Acked-by: Cristian Dumitrescu Applied, thanks