From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 93D8558DA for ; Tue, 18 Mar 2014 10:55:37 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 18 Mar 2014 02:52:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,676,1389772800"; d="scan'208";a="502168764" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga002.jf.intel.com with ESMTP; 18 Mar 2014 02:57:03 -0700 Received: from irsmsx105.ger.corp.intel.com (163.33.3.28) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 18 Mar 2014 09:55:56 +0000 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.27]) by IRSMSX105.ger.corp.intel.com ([169.254.7.87]) with mapi id 14.03.0123.003; Tue, 18 Mar 2014 09:55:55 +0000 From: "Richardson, Bruce" To: sabu kurian , "dev@dpdk.org" Thread-Topic: [dpdk-dev] Error : dereferencing pointer to incomplete type...... Thread-Index: AQHPQbrnnTNVGmjMCU+xEzCGCjtmC5rmnOEQ Date: Tue, 18 Mar 2014 09:55:55 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B01A9D542B@IRSMSX103.ger.corp.intel.com> References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] Error : dereferencing pointer to incomplete type...... 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: , X-List-Received-Date: Tue, 18 Mar 2014 09:55:38 -0000 Maybe check that you have included the header files with the correct struct= ure definitions. > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of sabu kurian > Sent: Monday, March 17, 2014 8:28 AM > To: dev@dpdk.org > Subject: Re: [dpdk-dev] Error : dereferencing pointer to incomplete type.= ..... >=20 > A little bit of correction on the second format: >=20 > iphdr->packet_id =3D rte_bswap16(0x0001); // This one gives error as well= .... >=20 > Any idea on what could be wrong ? >=20 > Thanks >=20 >=20 >=20 >=20 >=20 >=20 > On Mon, Mar 17, 2014 at 1:51 PM, sabu kurian > wrote: >=20 > > Hello friends, > > > > I get a error like "dereferencing pointer to incomplete type", when I > > try to fill in the IPv4 headers. > > > > Below is the code snippet: > > > > struct ether_hdr *ehdr =3D rte_pktmbuf_mtod(m_pool, struct ether_hdr > *); > > > > struct ipv4_hdr *iphdr =3D (struct ipv4_hdr *)(&ehdr[1]); > > > > > > iphdr->packet_id =3D (uint16_t)0x0001; //This gives error. > > > > rte_bswap16(iphdr->packet_id,0x0001); //This format also gives the > > same error. > > > > And also what is the best way to copy an 8 bit (1 byte) value for > > fields like 'type_of_service' ? will rte_memcpy() work for it ? > > > > > > > > Thanks in advance.... > > > >