From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qc0-f180.google.com (mail-qc0-f180.google.com [209.85.216.180]) by dpdk.org (Postfix) with ESMTP id 4B1CE4C6E for ; Mon, 17 Mar 2014 20:41:24 +0100 (CET) Received: by mail-qc0-f180.google.com with SMTP id w7so117204qcr.11 for ; Mon, 17 Mar 2014 12:42:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=iVQgKGXaeKNRu0wrn9+o6Gqs80M3K8ny0R4MrJQrOJw=; b=FS55wsigNWoqc0VHPzs3lB08K80KzIgGGL8FzJyQm5ruzDAt7wzklq3UGXlt9KjUOx 4bewAN98Zn+QgaxluFEjx/iAP7TSb4MXAxpwTgrVBllinED74wbj8uZmBRL+vWJO3Pbx PxnrmWU/Eo/M2Qy1vYIJDqiJ/Cv9sjrcYz80gXRIfc9FduVTd9NjpSqtjNaGHo9D0PMu qSXKgpt6OBz7a/7U/Yvw7ts4pQSK9mOCh6l6qpy2Z9JgEM5C8m5zCLC2nLupmguyR66F PCY/hW6GS18XqOBBHT01trM9ridapc2RT+tBXIdeathz0GVS5K7lk09DGajLrsyowNOK 1v3A== X-Gm-Message-State: ALoCoQmzL+DmMVBqp1xN+ZumYfrlNNidfhVIPbEmsD3iWbjOEKUpXzO9Uarhg0kcikssk5eXuj+Z MIME-Version: 1.0 X-Received: by 10.224.5.136 with SMTP id 8mr31358314qav.42.1395085374378; Mon, 17 Mar 2014 12:42:54 -0700 (PDT) Received: by 10.140.36.163 with HTTP; Mon, 17 Mar 2014 12:42:54 -0700 (PDT) X-Originating-IP: [84.109.83.45] In-Reply-To: References: Date: Mon, 17 Mar 2014 21:42:54 +0200 Message-ID: From: Daniel Kaminsky To: sabu kurian Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" 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 19:41:24 -0000 Hi, Are you sure that this is the line that gives the error? How did you define m_pool? Regarding coping one byte, copy using simple assignment should be the most efficient way. If you want to make sure it is just 8 bits, do a bit wise and (& 0xff). Daniel On Mon, Mar 17, 2014 at 10:27 AM, sabu kurian wrote: > 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.... > > > > >