From patchwork Thu Jun 30 08:40:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asias He X-Patchwork-Id: 932262 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5U8ibN5000756 for ; Thu, 30 Jun 2011 08:44:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758804Ab1F3Iod (ORCPT ); Thu, 30 Jun 2011 04:44:33 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:43568 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758793Ab1F3Iob (ORCPT ); Thu, 30 Jun 2011 04:44:31 -0400 Received: by mail-iw0-f174.google.com with SMTP id 6so1718423iwn.19 for ; Thu, 30 Jun 2011 01:44:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=W9wS/M/uWRVwLEbhrNcIia+n93UEcbMOB0Lzc8CirnI=; b=Zz1uHVFxtDE073/EyG1NH95i8vN3x11zbYEWW5tLUrvpQAA/0QxXLA26AvXgkRoKTL ip88/5nYF9rL/vwdN9V3chdLfzFjvKR/dvgY2vv1u+6whQ6ErkRI68vNyvfl4IsTyEy1 yWgg5s2PdmZGTTx3mR3P3s9xtrHsL9i5t4q2g= Received: by 10.42.97.136 with SMTP id o8mr1419809icn.222.1309423470951; Thu, 30 Jun 2011 01:44:30 -0700 (PDT) Received: from localhost.localdomain ([219.224.169.130]) by mx.google.com with ESMTPS id d6sm1967338icx.1.2011.06.30.01.44.26 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Jun 2011 01:44:30 -0700 (PDT) From: Asias He To: Pekka Enberg Cc: Cyrill Gorcunov , Ingo Molnar , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org, Asias He Subject: [PATCH v2 10/31] kvm tools: Add helper to return ethernet header length Date: Thu, 30 Jun 2011 16:40:58 +0800 Message-Id: <1309423279-3093-11-git-send-email-asias.hejun@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1309423279-3093-1-git-send-email-asias.hejun@gmail.com> References: <1309423279-3093-1-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Jun 2011 08:44:37 +0000 (UTC) Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index e79cc4b..979e2b0 100644 --- a/tools/kvm/include/kvm/uip.h +++ b/tools/kvm/include/kvm/uip.h @@ -151,6 +151,11 @@ static inline u16 uip_udp_len(struct uip_udp *udp) return ntohs(udp->len); } +static inline u16 uip_eth_hdrlen(struct uip_eth *eth) +{ + return sizeof(*eth); +} + int uip_tx_do_ipv4_icmp(struct uip_tx_arg *arg); int uip_tx_do_ipv4(struct uip_tx_arg *arg); int uip_tx_do_arp(struct uip_tx_arg *arg);