[dpdk-dev] [PATCH v6 1/2] net: added macro for MAC address print

Stephen Hemminger stephen at networkplumber.org
Tue Aug 24 17:05:35 CEST 2021


On Tue, 24 Aug 2021 16:33:25 +0530
Aman Singh <aman.deep.singh at intel.com> wrote:

> diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h
> index 7ee5e9a292..8d126d4c81 100644
> --- a/lib/net/rte_ether.h
> +++ b/lib/net/rte_ether.h
> @@ -221,6 +221,11 @@ rte_ether_addr_copy(const struct rte_ether_addr *__restrict ea_from,
>  	*ea_to = *ea_from;
>  }
>  
> +/**
> + * Macro to print six-bytes of MAC address in hex format
> + */
> +#define RTE_ETHER_ADDR_PRT_FMT     "%02X:%02X:%02X:%02X:%02X:%02X"
> +
>  #define RTE_ETHER_ADDR_FMT_SIZE         18
>  /**
>   * Format 48bits Ethernet address in pattern xx:xx:xx:xx:xx:xx.

Please uses same macro in rte_ether_format_addr


More information about the dev mailing list