From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id DAD4B4267A;
	Sat, 30 Sep 2023 01:08:39 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 64E8740268;
	Sat, 30 Sep 2023 01:08:39 +0200 (CEST)
Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com
 [209.85.214.177])
 by mails.dpdk.org (Postfix) with ESMTP id C8E7640156
 for <dev@dpdk.org>; Sat, 30 Sep 2023 01:08:38 +0200 (CEST)
Received: by mail-pl1-f177.google.com with SMTP id
 d9443c01a7336-1c1e3a4a06fso112114055ad.3
 for <dev@dpdk.org>; Fri, 29 Sep 2023 16:08:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1696028918;
 x=1696633718; 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=/wjTQEPUHGcQBOcjPnEfr3vJL6DMOC1bvD8DldBgK3o=;
 b=XVXw2cY8K/mI4ylqzV5zcuaKKxbIPQIAaknJPIjjEdOqqxGlZnTI9CQFy0P0MLYuzu
 slVPevlPPXcHm8OAvlM720/CT40xV0D/cPz4SIHrgqiDCcKQ7T119bYdkxILNkctjHeu
 CplilmPvWcpW4fombnrNgsGJea/tA8F21GRFlDE9V9A2yzCyXTBdd6uJkzu/FGLs9R8H
 V8brtzdsQWAqFSV+apf+2ku7UD20M75HSNpBvR4MxMSYQwU45LHXGvaQIyDV5U8kInGH
 Uj5m3t9RkDlwy6S+pcYujt33ozJ36YOlpBgPuS9DSxHCZ3Oj0UEcOAE5n9nzeHhhVB+a
 7zLQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1696028918; x=1696633718;
 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=/wjTQEPUHGcQBOcjPnEfr3vJL6DMOC1bvD8DldBgK3o=;
 b=xRChWL/WYVWCvt8FBhDRiOodfih+va1XWPn+hZhyN9huvZIao+6FfR7G9sXOoRaeZf
 z47WIOIpTtMRPGNGmUZBKYIhIgUPSJvwY+HCvg7scShmrW/R467FNWvzaKKpFlIDQ1es
 Ajy18aWVG0fCkaFqVsHoJamw85cZMAPZqvKnVyj+AG/G20Eqxb92ma1kU56UqMYCqUym
 mgaQSdJG+2eXE6S1aQiYVxOavL6b25C8487QBS0MUwobq6o3WejuoFrakXLqJZTPsM/1
 g8ylW17im+cDcLGYa+zGnohG03w7gjQZzO0wMtjxDFkPjZR7W+e1smMzlswiY3Ge3D6F
 OTvA==
X-Gm-Message-State: AOJu0YyuUkxOihcpcmDR14WeXzvRlFC4xIK5qlzfH3DWHMe6T83Jtxvy
 cQ9/RmEo3C2Iiuk5kBegpJJblC2znDHVTE3Fna0=
X-Google-Smtp-Source: AGHT+IGnj40SAV9HugsjOfjJBmdiaEiD0VaLC/5xaTWAYAapiCTXEMAozxYibNK/QFf8EieNkQnQCA==
X-Received: by 2002:a17:902:ce88:b0:1bf:78d:5cde with SMTP id
 f8-20020a170902ce8800b001bf078d5cdemr6742111plg.59.1696028917816; 
 Fri, 29 Sep 2023 16:08:37 -0700 (PDT)
Received: from hermes.local (204-195-126-68.wavecable.com. [204.195.126.68])
 by smtp.gmail.com with ESMTPSA id
 s4-20020a170902a50400b001b567bbe82dsm17352791plq.150.2023.09.29.16.08.37
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 29 Sep 2023 16:08:37 -0700 (PDT)
Date: Fri, 29 Sep 2023 16:08:35 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Morten =?UTF-8?B?QnLDuHJ1cA==?= <mb@smartsharesystems.com>
Cc: <dev@dpdk.org>, "Olivier Matz" <olivier.matz@6wind.com>
Subject: Re: [RFC] rte_ether_unformat: accept more inputs
Message-ID: <20230929160835.7df0329b@hermes.local>
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D87C25@smartserver.smartshare.dk>
References: <20230929163611.62691-1-stephen@networkplumber.org>
 <98CBD80474FA8B44BF855DF32C47DC35D87C25@smartserver.smartshare.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri, 29 Sep 2023 21:35:45 +0200
Morten Br=C3=B8rup <mb@smartsharesystems.com> wrote:

> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > Sent: Friday, 29 September 2023 18.36
> >=20
> > This updates rte_ether_addr_unformat() to accept more types
> > of input. There have been requests to handle Windows and other formats.=
 =20
>=20
> Seems very useful.
>=20
> [...]
>=20
> > +/*
> > + * Be libreal in accepting a wide variety of notational formats =20
>=20
> Typo: libreal -> liberal.
>=20
> > + * for MAC address including:
> > + *  - Linux format six groups of hexadecimal digits seperated by colon
> > + *  - Windows format six groups seperated by hyphen =20
>=20
> Typo (twice): seperated -> separated

Typos will be fixed in next version in addition to adding tests.

>=20
> > --- a/lib/net/rte_ether.h
> > +++ b/lib/net/rte_ether.h
> > @@ -254,8 +254,10 @@ rte_ether_format_addr(char *buf, uint16_t size,
> >   *
> >   * @param str
> >   *   A pointer to buffer contains the formatted MAC address.
> > - *   The supported formats are:
> > - *     XX:XX:XX:XX:XX:XX or XXXX:XXXX:XXXX
> > + *   The example formats are:
> > + *     XX:XX:XX:XX:XX:XX - Canonical form
> > + *     XX-XX-XX-XX-XX-XX - Windows and IEEE 802
> > + *     XXXX:XXXX:XXXX    - original DPDK
> >   *   where XX is a hex digit: 0-9, a-f, or A-F. =20
>=20
> Actually, XX is a hex number, not a hex digit.
>=20
> But I think the intention of this patch is also to allow a hex number of =
1 or 2 (or up to 4) hex digits for XX and XXXX?
>=20


Good point, the single hex digit format came as a later request.