From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qa0-x243.google.com (mail-qa0-x243.google.com [IPv6:2607:f8b0:400d:c00::243]) by dpdk.org (Postfix) with ESMTP id 1FB9B5938 for ; Mon, 17 Mar 2014 09:26:21 +0100 (CET) Received: by mail-qa0-f67.google.com with SMTP id w5so1798998qac.6 for ; Mon, 17 Mar 2014 01:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=KjKThiHmcA0YLg+zSjJzeCkcpzpYeFd3T2iR+K2aTMg=; b=m0FUzlwJz4A4wmmADsxv6jcgMKwGdhPmFBPryykrnc4C/RC/hQ/c3l6IjqkheR08yk SEYX/wx5BP/3iSCKXEV5VBfpi8jz2um+oGZ0pK0aOe4Cwm6aKD0mLXqIk+d7YG0qiTid 2nQKLpNK+4CGopMQQgb8iVKqadc6IprhV+ryaojFHabv9Cabjg8Vt02V4I7ERmb5onMM 1xsLJh8gw9t7D9BfCb+gC+01alYmcs7y1KSvoVwhOU/YrJj70g0/Q2WX0lp6Vjg0etT2 JVSNMD81INohm2J/IwmNSORGdjwnrfBggavD4NNajdRX0xT/21ZEwd++ItvPQcAjkhYd xsjA== MIME-Version: 1.0 X-Received: by 10.224.79.133 with SMTP id p5mr329072qak.98.1395044872083; Mon, 17 Mar 2014 01:27:52 -0700 (PDT) Received: by 10.96.69.97 with HTTP; Mon, 17 Mar 2014 01:27:52 -0700 (PDT) In-Reply-To: References: Date: Mon, 17 Mar 2014 13:57:52 +0530 Message-ID: From: sabu kurian To: "dev@dpdk.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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: Mon, 17 Mar 2014 08:26:21 -0000 A little bit of correction on the second format: iphdr->packet_id = rte_bswap16(0x0001); // This one gives error as well.... Any idea on what could be wrong ? Thanks On Mon, Mar 17, 2014 at 1:51 PM, sabu kurian wrote: > 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 = rte_pktmbuf_mtod(m_pool, struct ether_hdr *); > > struct ipv4_hdr *iphdr = (struct ipv4_hdr *)(&ehdr[1]); > > > iphdr->packet_id = (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.... > >