[dpdk-dev] Segmentation Fault on printf()

2014-03-17 Thread Daniel Kaminsky
Sabu, I think that in this case the packet length is zero which will result in nothing from mtod. Daniel On Sun, Mar 16, 2014 at 3:03 PM, sabu kurian wrote: > Hello chris, > > Thanks for your reply. I tried dumping the contents of mbuf as you have > suggested. > This is what I get: > > dump m

[dpdk-dev] Error : dereferencing pointer to incomplete type......

2014-03-17 Thread Daniel Kaminsky
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, sab

[dpdk-dev] Error : dereferencing pointer to incomplete type......

2014-03-17 Thread sabu kurian
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 inco

[dpdk-dev] Error : dereferencing pointer to incomplete type......

2014-03-17 Thread sabu kurian
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 = (u