From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CDBD468C8 for ; Wed, 29 Jan 2014 18:17:07 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 29 Jan 2014 09:18:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,743,1384329600"; d="scan'208";a="474564245" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga002.jf.intel.com with ESMTP; 29 Jan 2014 09:18:01 -0800 Received: from irsmsx106.ger.corp.intel.com (163.33.3.31) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 29 Jan 2014 17:18:00 +0000 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.84]) by IRSMSX106.ger.corp.intel.com ([169.254.8.96]) with mapi id 14.03.0123.003; Wed, 29 Jan 2014 17:18:00 +0000 From: "Richardson, Bruce" To: Olivier Matz , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 06/11] kvargs: simpler parsing and allow duplicated keys Thread-Index: AQHPHEM40U6gYcymNUO2xaRfkcYyi5qb8wyw Date: Wed, 29 Jan 2014 17:17:59 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B01A995C12@IRSMSX103.ger.corp.intel.com> References: <1390925204-10800-1-git-send-email-olivier.matz@6wind.com> <1390925204-10800-7-git-send-email-olivier.matz@6wind.com> In-Reply-To: <1390925204-10800-7-git-send-email-olivier.matz@6wind.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 06/11] kvargs: simpler parsing and allow duplicated keys 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: Wed, 29 Jan 2014 17:17:08 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Olivier Matz > Sent: Tuesday, January 28, 2014 4:07 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 06/11] kvargs: simpler parsing and allow > duplicated keys >=20 > Remove the rte_kvargs_add_pair() function whose only role was to check if > a key is duplicated. Having duplicated keys is now allowed by kvargs API. >=20 > Also replace rte_strsplit() by more a standard function strtok_r() that i= s > easier to understand for people already knowing the libc. It also avoids > useless calls to strnlen(). The delimiters macros become strings instead = of > chars due to the strtok_r() API. >=20 As a general rule, we try to use only string functions which track the buff= er length they are working with, which is why the function rte_strsplit() i= s used. While strtok_r() is indeed a standard C function, why not use the c= ode as originally written?