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 135F5426AE; Tue, 3 Oct 2023 19:18:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2D9B40A6B; Tue, 3 Oct 2023 19:18:08 +0200 (CEST) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id 17ED740262 for ; Tue, 3 Oct 2023 19:18:07 +0200 (CEST) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-69101022969so906273b3a.3 for ; Tue, 03 Oct 2023 10:18:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1696353486; x=1696958286; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=MTgIbKKAUCUIiZs3X1IgOowvkSGhaXK075qUHRrBZrM=; b=PWCBqFBVKPH36eDdaUC85VADDkt9b74IIYyPtg+TjXGSXLRrnLcIuwNzQuNhfPfyS9 K+cnBJBhMlFMcPVG1s6cswuGGwWWc9VWIieZFCTjcNtsjUBpqffqTeZ3Wev9DpGDJSKk pi5vBRze0GuxbFdlKsv1oVqzbnuZDOdKgtZ4RcNFYYa3qiz73Cw7HA1VtE3kOMZFZtO7 +Sb2K/RQztCWQCtncRJ2UDTMnCWDFwdL8EQVBO9FEBG6cF0aHy22qZN0mZOJkYAPd95r 7ILNJuLpKNws+DfTujrzNIlXmE6Z9QjRyy2In5jTADuB6rMV4aBQilWJ+aG85Gfmi/Ud IOpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696353486; x=1696958286; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MTgIbKKAUCUIiZs3X1IgOowvkSGhaXK075qUHRrBZrM=; b=BBg935j0GBoPrymrd//U8yqhVMfRvAkgd4E2aZR+546NxzockwqlbyDMDU0uKuzD5a G7TlpD+fxtib6XTxcjmogaoBbCCvxXjZvkOixCptx9DpLg0h5sbYIqSrV8hoXMYEFxcV ElZ1ZMH3Ul8YGq+WS3d7ZOZ4B+e9twPwF9li1i/3AnkvAQdwUNbc04eoBU85LHzsvrWS ysgbyrEPeGPYETVAUf+EkM9BQt2m/+KzQOJPBCAenVNVDjt7SpqlvjjC1qs1UhoPj/Jb xoa4gp4/dTjHZw52p5tDmNvkIB1a5WgOQUzJQL7Hg69X8NoJOJvJxiBFKSDuouoMuWfH Ggww== X-Gm-Message-State: AOJu0YyTSClRDd3smbj7v8ICg1TCAWZ4+SRqnDV2isGwBB+sSpZuNvZ5 rpleRFBy4X1pv1qVvYDS1M6TmltKt9ylBbKUKSc= X-Google-Smtp-Source: AGHT+IHEpegu8O7vh7gWDN7Yme6SCxetDxoThHsAakWJxvGTJYIUZQ07+MeyR+bo1RGX6Qu9fQ3/YA== X-Received: by 2002:a05:6a00:1302:b0:692:b8b9:f728 with SMTP id j2-20020a056a00130200b00692b8b9f728mr200095pfu.30.1696353486340; Tue, 03 Oct 2023 10:18:06 -0700 (PDT) Received: from hermes.local (204-195-126-68.wavecable.com. [204.195.126.68]) by smtp.gmail.com with ESMTPSA id it18-20020a056a00459200b00672ea40b8a9sm1677999pfb.170.2023.10.03.10.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 10:18:06 -0700 (PDT) Date: Tue, 3 Oct 2023 10:18:04 -0700 From: Stephen Hemminger To: Ferruh Yigit Cc: dev@dpdk.org Subject: Re: [PATCH v2 1/3] test: remove some strings from cmdline_etheraddr tests Message-ID: <20231003101804.34f1d73f@hermes.local> In-Reply-To: References: <20230929163611.62691-1-stephen@networkplumber.org> <20231002183730.301163-1-stephen@networkplumber.org> <20231002183730.301163-2-stephen@networkplumber.org> <20231003093625.0e833f9f@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Tue, 3 Oct 2023 17:50:13 +0100 Ferruh Yigit wrote: > On 10/3/2023 5:36 PM, Stephen Hemminger wrote: > > On Tue, 3 Oct 2023 11:47:51 +0100 > > Ferruh Yigit wrote: > > > >> On 10/2/2023 7:37 PM, Stephen Hemminger wrote: > >>> Some of the ethernet address formats which were invalid will > >>> now become valid inputs when rte_ether_unformat_addr is modified > >>> to allow leading zeros. > >>> > >>> Also, make local variables static. > >>> > >>> Signed-off-by: Stephen Hemminger > >>> > >> > >> <...> > >> > >>> @@ -61,10 +60,8 @@ const char * ether_addr_invalid_strs[] = { > >>> "INVA:LIDC:HARS", > >>> /* misc */ > >>> "01 23 45 67 89 AB", > >>> - "01.23.45.67.89.AB", > >>> "01,23,45,67,89,AB", > >>> - "01:23:45\0:67:89:AB", > >>> - "01:23:45#:67:89:AB", > >>> > >> > >> Why these two are valid now? > >> > >> And I guess second one is still not valid, but first one is parsed as > >> [1], is this expected? > >> > >> [1] 00:01:00:23:00:45 > > > > The code in cmdline converts the comment character # to a null byte. > > So both test are the same. > > > > With new unformat, it allows a 3 part mac address with leading > > zeros. > > 01:23:45 is equivalent to 0001:0023:0045 > > > > With 3 part MAC, omitting leading zeros looks confusing to me, because > that omitted part becomes an octet in MAC. Like: > 01:23:45 being equivalent to 00:01:00:23:00:45 > > As 3 part MAC, and 6 part MAC has separate functions, does it makes > sense to require leading zeros in the 3 part MAC, what do you think? > Right, 3 part MAC is only a legacy Cisco format, not used anywhere else.