From patchwork Mon Dec 21 05:21:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jijiang Liu X-Patchwork-Id: 9606 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 11A7F5A38; Mon, 21 Dec 2015 06:21:56 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 97FF7E72 for ; Mon, 21 Dec 2015 06:21:54 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 20 Dec 2015 21:21:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,458,1444719600"; d="scan'208";a="621427878" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 20 Dec 2015 21:21:34 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id tBL5LWwx025903; Mon, 21 Dec 2015 13:21:32 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id tBL5LSCZ012112; Mon, 21 Dec 2015 13:21:30 +0800 Received: (from jijiangl@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tBL5LSId012108; Mon, 21 Dec 2015 13:21:28 +0800 From: Jijiang Liu To: dev@dpdk.org Date: Mon, 21 Dec 2015 13:21:19 +0800 Message-Id: <1450675280-12056-4-git-send-email-jijiang.liu@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1450675280-12056-1-git-send-email-jijiang.liu@intel.com> References: <1450675280-12056-1-git-send-email-jijiang.liu@intel.com> Subject: [dpdk-dev] [PATCH v6 3/4] sample/vhost: remove the ipv4_hdr structure defination X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Remove the ipv4_hdr structure defination in vhost sample. The same structure has already defined in the rte_ip.h file, so we remove the defination from the sample, and include that header file. Signed-off-by: Jijiang Liu --- examples/vhost/main.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index c081b18..044c680 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -50,6 +50,7 @@ #include #include #include +#include #include "main.h" @@ -292,20 +293,6 @@ struct vlan_ethhdr { __be16 h_vlan_encapsulated_proto; }; -/* IPv4 Header */ -struct ipv4_hdr { - uint8_t version_ihl; /**< version and header length */ - uint8_t type_of_service; /**< type of service */ - uint16_t total_length; /**< length of packet */ - uint16_t packet_id; /**< packet ID */ - uint16_t fragment_offset; /**< fragmentation offset */ - uint8_t time_to_live; /**< time to live */ - uint8_t next_proto_id; /**< protocol ID */ - uint16_t hdr_checksum; /**< header checksum */ - uint32_t src_addr; /**< source address */ - uint32_t dst_addr; /**< destination address */ -} __attribute__((__packed__)); - /* Header lengths. */ #define VLAN_HLEN 4 #define VLAN_ETH_HLEN 18