DPDK patches and discussions
 help / color / mirror / Atom feed
From: sabu kurian <sabu2kurian@gmail.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Error : dereferencing pointer to incomplete type......
Date: Mon, 17 Mar 2014 13:57:52 +0530	[thread overview]
Message-ID: <CAJ2bnfAFuovG3MoAv4Eqy-jX+Gdqx9-20ZPFjj+b-t957=CnCg@mail.gmail.com> (raw)
In-Reply-To: <CAJ2bnfCD_FN6TOMr3+19NAPFjuty2h9rgHvJzxJDTCRqGSy+xQ@mail.gmail.com>

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 <sabu2kurian@gmail.com> 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....
>
>

  reply	other threads:[~2014-03-17  8:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17  8:21 sabu kurian
2014-03-17  8:27 ` sabu kurian [this message]
2014-03-17 19:42   ` Daniel Kaminsky
2014-03-18  9:55   ` Richardson, Bruce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ2bnfAFuovG3MoAv4Eqy-jX+Gdqx9-20ZPFjj+b-t957=CnCg@mail.gmail.com' \
    --to=sabu2kurian@gmail.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).