From patchwork Wed Apr 6 08:37:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Fleytman X-Patchwork-Id: 8759271 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C37A4C0553 for ; Wed, 6 Apr 2016 08:40:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 023F42017E for ; Wed, 6 Apr 2016 08:40:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5C1752017D for ; Wed, 6 Apr 2016 08:40:11 +0000 (UTC) Received: from localhost ([::1]:41681 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anj0U-000176-PX for patchwork-qemu-devel@patchwork.kernel.org; Wed, 06 Apr 2016 04:40:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aniyb-0005rj-UH for qemu-devel@nongnu.org; Wed, 06 Apr 2016 04:38:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aniyX-0000Kt-71 for qemu-devel@nongnu.org; Wed, 06 Apr 2016 04:38:13 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aniyW-0000Kp-Vo for qemu-devel@nongnu.org; Wed, 06 Apr 2016 04:38:09 -0400 Received: by mail-wm0-x243.google.com with SMTP id i204so11082095wmd.0 for ; Wed, 06 Apr 2016 01:38:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ri5r72w79wGZ5kaRvnDa529GVULxaGWFExU5P5jdmZU=; b=wvzNeau0dAfaagrCHkEIZERjHhInVprePEzN0/WUVaQ0MERrx3XuEQg15fxhKi24dC mfv3t6vzKltLl4cup1m/hOSH/g/nLpVLdtjYbYMCdHcYWjoApgXU/hlrMb9lPtI2tlpU lho7JG6OypslCMX4laHUJVtThwhGPq79BBHvOExzL2LoujrOLYg6JoPIb2H59VsSwo3o nQpzlcbUpWSpQDQUgkDdbay4mRcbsx1ELHogzhUWxpmuvmOXPLEJQR6RtjIELx7LH4UR iy9pfVgBHJTA+kc3HEEnPCE0f5GPjruspv7DUWYLtil5KcWji6s2u5polsEu0XaVhR/P vaTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ri5r72w79wGZ5kaRvnDa529GVULxaGWFExU5P5jdmZU=; b=eEh7Xnd3xtnQGAEl3X5XWoEURMTOW6APONlCbYByW8cSoQJsQsDEtqSam2comk+S7W 1wIAsSvjSCCT/f9vhO/WdH/NTcfhaOqLSJwSm9ZQtZWt7NM9K/8JJTYYcCyKW9oUv+Yl unEi+re3f8810jCWRouQc/Hd7hcEIemzhq5SIEtNH+jgsxzGjZLez2A94TwKOY9GQXeB RCDh8iwDbTlh9IxlFuAmIrJKghmxKThzayzxxlicLKgt9yJ//v3d5W5bGuy+rRy+G/aq P8GWsO+lwWiDreCWqTNR5f2xfjBOmTE0+E7XF1hpm9AVJS1HEF8gA8m54KAAl1OBywE6 kNHg== X-Gm-Message-State: AD7BkJKYoSJh1LVFY1Sd1SqxRN1YTC/2RlrR1BSJyqp363tr3ywRen7Spjr8vqvUCD+R1g== X-Received: by 10.28.188.7 with SMTP id m7mr22495859wmf.83.1459931888424; Wed, 06 Apr 2016 01:38:08 -0700 (PDT) Received: from bark.daynix ([5.102.236.99]) by smtp.gmail.com with ESMTPSA id w186sm2436154wmd.20.2016.04.06.01.38.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Apr 2016 01:38:07 -0700 (PDT) From: Dmitry Fleytman To: qemu-devel@nongnu.org Date: Wed, 6 Apr 2016 11:37:20 +0300 Message-Id: <1459931849-29336-8-git-send-email-dmitry@daynix.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459931849-29336-1-git-send-email-dmitry@daynix.com> References: <1459931849-29336-1-git-send-email-dmitry@daynix.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::243 Cc: Yan Vugenfirer , Jason Wang , Leonid Bloch , Shmulik Ladkani , "Michael S. Tsirkin" Subject: [Qemu-devel] [PATCH v3 07/16] net: Add macros for MAC address tracing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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