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 E1B2A42676; Fri, 29 Sep 2023 21:36:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7802F4026E; Fri, 29 Sep 2023 21:36:02 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 91AB64025C for ; Fri, 29 Sep 2023 21:36:00 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 6898E20602; Fri, 29 Sep 2023 21:36:00 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [RFC] rte_ether_unformat: accept more inputs Date: Fri, 29 Sep 2023 21:35:45 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87C25@smartserver.smartshare.dk> In-Reply-To: <20230929163611.62691-1-stephen@networkplumber.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [RFC] rte_ether_unformat: accept more inputs Thread-Index: Adny8xlaQoDbEU8fRlCao3l5xkYi2QAF6HAQ References: <20230929163611.62691-1-stephen@networkplumber.org> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Stephen Hemminger" , Cc: "Olivier Matz" 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 > 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. Seems very useful. [...] > +/* > + * Be libreal in accepting a wide variety of notational formats Typo: libreal -> liberal. > + * for MAC address including: > + * - Linux format six groups of hexadecimal digits seperated by = colon > + * - Windows format six groups seperated by hyphen Typo (twice): seperated -> separated [...] > --- 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. Actually, XX is a hex number, not a hex digit. 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?