[RFC] rte_ether_unformat: accept more inputs
Morten Brørup
mb at smartsharesystems.com
Fri Sep 29 21:35:45 CEST 2023
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Friday, 29 September 2023 18.36
>
> 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?
More information about the dev
mailing list