From patchwork Thu Feb 18 10:07:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonid Bloch X-Patchwork-Id: 8348261 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 A6A39C0553 for ; Thu, 18 Feb 2016 10:12:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C0D6201F4 for ; Thu, 18 Feb 2016 10:12:40 +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 678BC201C7 for ; Thu, 18 Feb 2016 10:12:39 +0000 (UTC) Received: from localhost ([::1]:39440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWLZe-0004nR-Fc for patchwork-qemu-devel@patchwork.kernel.org; Thu, 18 Feb 2016 05:12:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWLVN-0006fE-EX for qemu-devel@nongnu.org; Thu, 18 Feb 2016 05:08:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWLVI-0001SQ-TV for qemu-devel@nongnu.org; Thu, 18 Feb 2016 05:08:13 -0500 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:36513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWLVI-0001SG-NA for qemu-devel@nongnu.org; Thu, 18 Feb 2016 05:08:08 -0500 Received: by mail-wm0-x232.google.com with SMTP id g62so18765384wme.1 for ; Thu, 18 Feb 2016 02:08:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravellosystems-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ri5r72w79wGZ5kaRvnDa529GVULxaGWFExU5P5jdmZU=; b=JivebWw3pSF6XOpSmidtGo2IM/USc3MB/mZ1XzlcgsSUYHsc264LL/ZPUljhfXpmEE rNAGIU3ktfw+IKuVTqLFMoJVlCSHASQMz1+Ky03/o3HUUhfszRCd7Xs1VMFanbndzvSD rwrIO9Y2j8aAUZPHNlQG2uJq2NQe1ZNu+y16Vwjb1I7UPKsZawmF51LghY55VytOViJR /TyqXA8xiJWDx0EBWN2Q3F9moWSCjagRhFeqKmUmJ5AR7CjfCGdVOWDRzjaTsHeFI4U8 enAP2DgxWJmHZGUIn164gfIot8a17t6JEm2cAgVP2RuQCq+4MO43sd98IC1BH10Z1+kP Usiw== 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=bEkgG5SwUsR3xP8dfO0NKJSeTp00uV1jsBS5PrJ/RUTU9d3aFBsuUu4MShGCR4fAYZ 5xbv+dTOst8GuORLrv/D9riU5T3WvXUzD4ZWsDotUJQg2uns/FS7JkM7epIBcPznEBiW hcWHtt5ANalQXLKESfsmReJ3CeUUg4myyxkhDuZLNgMJvwk1/jHR7/qwiegm8wjCW9g0 vYjKI4l9dfSmOSCF2qHbHgMClB9mFGR8EwOng0gCRBZcg4Pj+urkIrkAjadxXXCAi3L6 9O5GOPtURwlLxxfRJZ8iaR70G7Q4IEczhTGCgjD9cflsT71B/nrd8jOG3e7FFH+twznR EBSw== X-Gm-Message-State: AG10YOTALh0eY+cyXlM7V3edPMvsKsVohRbSHcrM4bIChFElGUJ8zjl/CZTpbpM6GuDLmEzL X-Received: by 10.194.143.82 with SMTP id sc18mr6543665wjb.14.1455790088180; Thu, 18 Feb 2016 02:08:08 -0800 (PST) Received: from bark.daynix ([5.102.236.99]) by smtp.gmail.com with ESMTPSA id x65sm2214799wmg.4.2016.02.18.02.08.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Feb 2016 02:08:07 -0800 (PST) From: Leonid Bloch To: qemu-devel@nongnu.org Date: Thu, 18 Feb 2016 12:07:28 +0200 Message-Id: <1455790054-1952-8-git-send-email-leonid.bloch@ravellosystems.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1455790054-1952-1-git-send-email-leonid.bloch@ravellosystems.com> References: <1455790054-1952-1-git-send-email-leonid.bloch@ravellosystems.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::232 Cc: Dmitry Fleytman , Jason Wang , Leonid Bloch , Shmulik Ladkani , "Michael S. Tsirkin" Subject: [Qemu-devel] [PATCH 07/13] 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