Received: from eggs.gnu.org ([2001:4830:134:3::10]:45961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7JLZ-0004xH-5m for qemu-devel@nongnu.org; Mon, 30 May 2016 05:18:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7JLU-0008P8-Kk for qemu-devel@nongnu.org; Mon, 30 May 2016 05:18:53 -0400 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:37203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7JLU-0008Ot-Cy for qemu-devel@nongnu.org; Mon, 30 May 2016 05:18:48 -0400 Received: by mail-wm0-x230.google.com with SMTP id z87so63548531wmh.0 for ; Mon, 30 May 2016 02:18:48 -0700 (PDT) From: Leonid Bloch Date: Mon, 30 May 2016 12:14:33 +0300 Message-Id: <1464599682-14592-9-git-send-email-leonid.bloch@ravellosystems.com> In-Reply-To: <1464599682-14592-1-git-send-email-leonid.bloch@ravellosystems.com> References: <1464599682-14592-1-git-send-email-leonid.bloch@ravellosystems.com> Subject: [Qemu-devel] [PATCH v6 08/17] net: Add macros for MAC address tracing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jason Wang , "Michael S. Tsirkin" , Dmitry Fleytman , Leonid Bloch , Shmulik Ladkani From: Dmitry Fleytman These macros will be used by future commits introducing e1000e device emulation and by vmxnet3 tracing code. Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch --- include/net/net.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 73e4c46..129d46b 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -9,6 +9,11 @@ #include "migration/vmstate.h" #include "qapi-types.h" +#define MAC_FMT "%02X:%02X:%02X:%02X:%02X:%02X" +#define MAC_ARG(x) ((uint8_t *)(x))[0], ((uint8_t *)(x))[1], \ + ((uint8_t *)(x))[2], ((uint8_t *)(x))[3], \ + ((uint8_t *)(x))[4], ((uint8_t *)(x))[5] + #define MAX_QUEUE_NUM 1024 /* Maximum GSO packet size (64k) plus plenty of room for -- 2.5.5