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 0A2AFA0C52; Wed, 24 Nov 2021 17:57:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBA5041C28; Wed, 24 Nov 2021 17:57:58 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id CCAD740DF5; Wed, 24 Nov 2021 17:57:56 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10178"; a="222195732" X-IronPort-AV: E=Sophos;i="5.87,260,1631602800"; d="scan'208";a="222195732" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2021 08:37:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,260,1631602800"; d="scan'208";a="457530442" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga006.jf.intel.com with ESMTP; 24 Nov 2021 08:37:13 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 24 Nov 2021 08:37:13 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 24 Nov 2021 08:37:13 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.170) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 24 Nov 2021 08:37:12 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XyfslKO79coe0m1r81cZ2SV1tFDNXQhWwIWtVugGIiW5cUNVLR2kNpa0NFOvJA7SaxkqWfWEERgSpA5Ohb23kbBuBBzFLrTTi2tb6bt6p2gVKRT/yI4LZciQGZbUF2oUz+c5SkKdAtW7msrBlBPFw5b8TV66ZXakvtgjuJpih1bMGMe/6As56M6zYQofFb3FkpMX5TAEEMIkUaHMFLTBWcu8CnjkUvtq8m+a3tM3/TXjtuNarCIAfFlPq7ecosyObWt4Re1tQZu8yOBL3aJkw88+hD7QG0hVftyTDvsMUpGTjk8WhovzxPZzw18YzVFBQ5HZGFlGxib7oMnAxtLhEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=w1n6N7Ae5l+FWC7Mr1pvis49yhMXOuY2F31UmBSn41M=; b=aPoTqZFjKZXBaHNsL4GjF43wfJo944KvDNDRmy65ib9n0WdL775C2MweV3jA7rlk9yRINbEql6xGiGpeMBmTo4tPv45KYMAAX51WVu2HoHnsYnYah/VeXY+DTQ9Ehsu1vXGPoL6fD+nAEtWs7VHdtSagbGX2Vk3M704iIQ0o1qBjbmGOl6t3zUMuqyY+L+VZcXkIe0vCKYUXRsUeSflE/Bm+L4pjPyq3bQgghW6ANlSfV+7HbeQz1eviczn7bD7dtlo/krGoIMDhkhcokEicDnfQLq9xwy0FEtpdJcQaFSnSfgZeZ+0HB8GILkb4cmIAVAc0jfFGNEosC3Uwxyf+UA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w1n6N7Ae5l+FWC7Mr1pvis49yhMXOuY2F31UmBSn41M=; b=lu819KRqW7y+bYppp0SUQMepCmViBOIfvBA54fRp+k6YGAFDl79CqWfmqBrLja8cDiLe60kVZp/DToH1G0v2pgEkraT6iy7gQJCYkAR1Sls/RFJevCGNgPNF3A8zOwEROGERZMhrhYexkbTL4w2KfQPASN4sa0xfppj4awfwCUA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5157.namprd11.prod.outlook.com (2603:10b6:510:3d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.26; Wed, 24 Nov 2021 16:37:11 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c%5]) with mapi id 15.20.4690.030; Wed, 24 Nov 2021 16:37:11 +0000 Message-ID: <3f94ea49-d41c-9cdb-fe46-5df81a054910@intel.com> Date: Wed, 24 Nov 2021 16:37:05 +0000 Subject: Re: [PATCH v3] app/testpmd: fix hex string parser input length Content-Language: en-US To: Gregory Etelson , CC: , Viacheslav Ovsiienko , Ori Kam , Xiaoyun Li , Wei Zhao References: <20211123090005.24707-1-getelson@nvidia.com> <20211124123354.6462-1-getelson@nvidia.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20211124123354.6462-1-getelson@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB6PR0802CA0033.eurprd08.prod.outlook.com (2603:10a6:4:a3::19) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB6PR0802CA0033.eurprd08.prod.outlook.com (2603:10a6:4:a3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.26 via Frontend Transport; Wed, 24 Nov 2021 16:37:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 646dd1e0-47bd-4b92-a3c1-08d9af68a9d8 X-MS-TrafficTypeDiagnostic: PH0PR11MB5157: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NP/iXnglacF+GWW6DucWNh/NfWnw/9r9Ou/Dvzc2SvCJp5NDTyVkm6ZmntqfW6T05G5TC5zxGAqUWxWRTkb8BIsz1uwE78/pbwg2Ew7n9UHTqbghu3BQS3FJrlkaQcJ6o9Wo2asn/mHx5fom0mPuf7tpK/+CV2ApfOyJ34kkLDO0rF2xOOqqaSx7dxZiYCvRmvsiNpvDHDmDfncSPzQwvRfZRev/5Rbx67XICxnuJWSxbXmaYEgs3GPK/GFCBe/7SkRrpBweOMedMFo6wLdVv7E1t+byouqrdxeFX2V0d9goSnXhHDD090878pLKLaPPAf5Tdh7AbAcwBUBm1G+bxsBAyCX2hSvn8IIYsrpvDaMUlwuraQtbR9dBSJ9YdipOa5fuKtpV+GUcL1LtB+BZOTZCW/JhShHHoXnh7mruhNLfZ/MOS8dwTuV7CULdubEBPv4SHT/TXj82MSaADNaG1XHby7Wzn6XEMzhIGijaGWmvDrz2l/L+HjONmTKDwvuZ6+azX5eVSUvctLKWvEYUm9bSPVviG7qxxQutcP3aQ5vD7VBHIw0ocb8TqtzFa+rMUDgLxh35bR/rWURDTtjAaEGQKfcXUAaj686SAZ4QQAK91DGn2UHxQdaGyt+SvkwqYN2V5vdqZdr8zN2eQAOW99GD+RY0zskNwR8le74Q/A30MTduTuB/coOeDpV2ygFvNUOeKD4Bg1DEdmDp0+TF/g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(31686004)(6666004)(53546011)(2616005)(38100700002)(44832011)(6486002)(5660300002)(16576012)(26005)(31696002)(107886003)(54906003)(36756003)(316002)(66556008)(4744005)(66946007)(82960400001)(508600001)(8936002)(956004)(4326008)(86362001)(2906002)(8676002)(186003)(66476007)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MGdDaS9OcmRVMThLQmF6RjNJSmZHQy91Yzl3Y1EzaVJvWVA0QmlrZFJ5dXEr?= =?utf-8?B?MHFucG9ueG1sb2xlVnMwQkY2VXRNYTJiOEpSU1NnZEFjT3o4aVp0cmFQL0do?= =?utf-8?B?cGt6Znhrdy9iZW15anJIWDB0dSszSWkrMzZtZ1ZjQitSZnZGYnM0eFNXSWYr?= =?utf-8?B?YTNOc3VPVjhYWXpCS1ViaEVKT0xjdFFPYndLaWg3Q1lISlVlL3RNdUZGV0Jl?= =?utf-8?B?SitpSXdOWkNWbUhRakdTazV3STMrOFE5WVpZc295cFh5UG1IQnJrSWRsbFk4?= =?utf-8?B?YnRhR0ZjbVk2UFFwZ0lmK3VxZFlIV09waTNKTXoyaURvOVVoSjNHQ0JpN2tS?= =?utf-8?B?UzBNK2dzQjZDRVN0S2pyclRBZndQdUJEQUpNeUptMk1nVEVJVE1GMVlXTCtq?= =?utf-8?B?bnpkVm0yeUYwMTVMWWUxM1RHSDRiOXhQQkhWN2RhdU1zU3pRSmZBenZva3l3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9d8 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Nov 2021 16:37:11.2842 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: p6vQPXZTFmZZmsx+u6Wy2LTYbhVaVPfQN9KBW0touA9uQm0nH5jxr3hwHj4E31yFX6MMQ8eDVk5xswVHiS5YAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5157 X-OriginatorOrg: intel.com 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 On 11/24/2021 12:33 PM, Gregory Etelson wrote: > Current hex string parser assumes input has even characters number. > The parser fails input string with odd length. > > The patch parses hex strings with even and odd length. > Parse result of an input with odd length will match result of > even length input, that has `0` as MSB, following by the original > sequence. > For example: > "0x1" results in *dst={0x01, 0x00}, *size=1 > "0xabc" results in *dst={0x0a, 0xbc, 0x00}, *size=2 > > Cc: stable@dpdk.org > > Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API") > Signed-off-by: Gregory Etelson > Reviewed-by: Viacheslav Ovsiienko Applied to dpdk-next-net/main, thanks.