[dpdk-dev] [PATCH v2] drivers/net:new PMD using tun/tap host interface
Yuanhan Liu
yuanhan.liu at linux.intel.com
Tue Sep 20 05:54:36 CEST 2016
On Mon, Sep 19, 2016 at 03:56:03PM +0000, Wiles, Keith wrote:
> All of the below errors are from Linux header files and not the Tap
> driver.
>
>
> Yes, but you are referencing them, so ...
>
>
> Yes I am referencing them, but still they are not interacting with the tap
> driver.
Yes, they are not. But the tap driver code references them. I mean, you
might have done that wrongly. e.g., the build passes if I removed few
includes for linux header files:
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 4621c55..2a6bcd0 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -47,9 +47,7 @@
#include <arpa/inet.h>
#include <net/if.h>
#ifdef __linux__
-#include <linux/if.h>
#include <linux/if_tun.h>
-#include <linux/if_ether.h>
#else
#include <netinet/if_ether.h>
#endif
> It would seem like you could delete all of the code in the tap driver
> and still get these errors. Which you could try if you want, just ifdef the
> code and see if it still happens.
>
> On my ubuntu 16.04 machine I do not get these errors. I need to know how to
> reproduce the failure to fix it.
Interesting! I really did no magic to reproduce it. As said, I can
reproduce it pretty easily with ubuntu 16.04 and fedora 20, just with
default build:
$ make install T=$RTE_SDK
Anyway, the error is straightforward after all: both files (net/if.h and
linux/if.h) define same structures and macros. Including both of them
would result errors like I reported.
--yliu
More information about the dev
mailing list