From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A011DA09E4; Tue, 23 Mar 2021 12:27:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2E0F140DD7; Tue, 23 Mar 2021 12:27:22 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id F2EA640689 for ; Tue, 23 Mar 2021 12:27:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616498840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Gu1xiXUpVQlZ+FWVoWIuFbbe01Zh+GgidoDguG+erPA=; b=RD6b6Wyi/Sixg4x8wsGGWwrqMib82n7Qu15N+uvr4G7oifwiVesZ/ZNLNxO6hAR6hFYvfy E2uWJV4ulNhAGhJ2uFRMBXcdiiBma/pWkucziOwcd8ogXJb53Cr2w41e7+HaB2CxYRSoVJ Wnf0TFqHyDPrf6r823jJwBHE1tk6WOE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-387-HGPApNU4PoyaK8ArAvEVyw-1; Tue, 23 Mar 2021 07:27:15 -0400 X-MC-Unique: HGPApNU4PoyaK8ArAvEVyw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A13B2612A9; Tue, 23 Mar 2021 11:27:13 +0000 (UTC) Received: from [10.36.110.41] (unknown [10.36.110.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4932F5D9C0; Tue, 23 Mar 2021 11:27:11 +0000 (UTC) To: Ibtisam Tariq , chenbo.xia@intel.com, cristian.dumitrescu@intel.com, jasvinder.singh@intel.com, john.mcnamara@intel.com, reshma.pattan@intel.com, konstantin.ananyev@intel.com, marko.kovacevic@intel.com Cc: dev@dpdk.org, roy.fan.zhang@intel.com References: <20210204073420.2421-1-ibtisam.tariq@emumba.com> <20210204073420.2421-7-ibtisam.tariq@emumba.com> From: Maxime Coquelin Message-ID: <981675b3-49f8-2284-03d0-b8b86c9e145f@redhat.com> Date: Tue, 23 Mar 2021 12:27:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210204073420.2421-7-ibtisam.tariq@emumba.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 7/7] examples/vhost_crypto: enhance getopt_long usage X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2/4/21 8:34 AM, Ibtisam Tariq wrote: > Instead of using getopt_long return value, strcmp was used to > compare the input parameters with the struct option array. This > patch get rid of all those strcmp by directly binding each longopt > with an int enum. This is to improve readability and consistency in > all examples. > > Bugzilla ID: 238 > Cc: roy.fan.zhang@intel.com > > Reported-by: David Marchand > Signed-off-by: Ibtisam Tariq > --- > v4: > * Set indentation of preprocessor directives. > > v3: > * None. > > v2: > * Remove extra indentations. > * Remove extra block brackets in switch statement. > * Change enum names to start with OPT_ and remove KEYWORD from enum names. > * Remove unused short options. > > v1: > * enhance getopt_long usage. > --- > examples/vhost_crypto/main.c | 86 +++++++++++++++++++++--------------- > 1 file changed, 50 insertions(+), 36 deletions(-) Reviewed-by: Maxime Coquelin Thanks, Maxime