DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: bugzilla@dpdk.org
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [Bug 754] quick question about including netinet/ip.h in rte_ethdev.h
Date: Tue, 13 Jul 2021 09:22:52 -0700	[thread overview]
Message-ID: <20210713092252.05b4c30a@hermes.local> (raw)
In-Reply-To: <bug-754-3@http.bugs.dpdk.org/>

On Tue, 13 Jul 2021 10:14:20 +0000
bugzilla@dpdk.org wrote:

> https://bugs.dpdk.org/show_bug.cgi?id=754
> 
>             Bug ID: 754
>            Summary: quick question about including netinet/ip.h in
>                     rte_ethdev.h
>            Product: DPDK
>            Version: 19.11
>           Hardware: All
>                 OS: All
>             Status: UNCONFIRMED
>           Severity: normal
>           Priority: Normal
>          Component: ethdev
>           Assignee: dev@dpdk.org
>           Reporter: jy7805.heo@samsung.com
>   Target Milestone: ---
> 
> Hello all, 
> 
> I'm making some application using DPDK. Once I want to include <linux/ip.h> and
> <rte_ethdev.h> together, below redefinition error is being show. 
> 
> 
> /usr/include/linux/ip.h:86:8: error: redefinition of ‘struct iphdr’
>  struct iphdr {
>         ^~~~~
> In file included from /usr/local/include/rte_ip.h:21:0,
>                  from /usr/local/include/rte_flow.h:24,
>                  from /usr/local/include/rte_eth_ctrl.h:11,
>                  from /usr/local/include/rte_ethdev.h:978,
>                  from
> /home/jy7805.heo/git/srsLTE/lib/include/srslte/dpdk/dpdk_utils.h:18,
>                  from
> /home/jy7805.heo/git/srsLTE/lib/include/srslte/dpdk/dpdk_threads.h:9,
>                  from
> /home/jy7805.heo/git/srsLTE/lib/include/srslte/ph_thread/ph_tx.h:4,
>                  from /home/jy7805.heo/git/srsLTE/lib/src/ph_thread/ph_tx.cc:1:
> 
> I found that rte_ip.h is including netinet/ip.h which is making collision with
> linux/ip.h
> 
> Does anyone who ever seen this kind of error before ? Should I change
> linux/ip.h to netinet/ip.h ? 

What distribution? 
In the general the simple solution is not include linux/ip.h




      reply	other threads:[~2021-07-13 16:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13 10:14 bugzilla
2021-07-13 16:22 ` Stephen Hemminger [this message]

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=20210713092252.05b4c30a@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=bugzilla@dpdk.org \
    --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).