From patchwork Thu Jun 30 08:40:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asias He X-Patchwork-Id: 932232 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 p5U8iWJ0031627 for ; Thu, 30 Jun 2011 08:44:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758758Ab1F3IoW (ORCPT ); Thu, 30 Jun 2011 04:44:22 -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 S1758212Ab1F3IoS (ORCPT ); Thu, 30 Jun 2011 04:44:18 -0400 Received: by mail-iw0-f174.google.com with SMTP id 6so1718423iwn.19 for ; Thu, 30 Jun 2011 01:44:17 -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=O2++EMaxpI5ewy3nh7nQ7DMGEar1JwIHlj0yZYRdJ4Y=; b=G90RWVwPIm5lHn3Uep7yNZZOjUso2UxsntipSLZ9HVwEt5Cfo6OcYQdtbSM1S84Unc lg6j2/+ASJ4JzJOWKapdis7utrlRRgjaZjLyzvOQCDawHY4T9BoHIpNlQKhoFs7DLXtG W+OcQAdoiwl2yVapuIXFBdvynS/aPmkPiyZbM= Received: by 10.43.48.129 with SMTP id uw1mr1847907icb.463.1309423457747; Thu, 30 Jun 2011 01:44:17 -0700 (PDT) Received: from localhost.localdomain ([219.224.169.130]) by mx.google.com with ESMTPS id d6sm1967338icx.1.2011.06.30.01.44.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Jun 2011 01:44:17 -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 07/31] kvm tools: Introduce struct uip_pseudo_hdr to present UDP pseudo header Date: Thu, 30 Jun 2011 16:40:55 +0800 Message-Id: <1309423279-3093-8-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:32 +0000 (UTC) This pseudo header is used for UDP checksum. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index e220403..35c7c23 100644 --- a/tools/kvm/include/kvm/uip.h +++ b/tools/kvm/include/kvm/uip.h @@ -75,6 +75,14 @@ struct uip_udp { u8 payload[0]; } __attribute__((packed)); +struct uip_pseudo_hdr { + u32 sip; + u32 dip; + u8 zero; + u8 proto; + u16 len; +} __attribute__((packed)); + struct uip_info { struct list_head udp_socket_head; struct list_head tcp_socket_head;