[dpdk-dev] [PATCH v4 0/7] Add instalation rules for dpdk files.

2015-10-14 Thread Miguel Bernal Marin
Hi guys,

Have you had any time to check this patchset version?


On 10/5/2015 3:19 PM, Mario Carrillo wrote:
> DPDK package lacks of a mechanism to install libraries, headers
> applications, kernel modules and sdk files to a file system tree.
>
> This patch set allows to install files according to the next
> proposal:
> http://www.freedesktop.org/software/systemd/man/file-hierarchy.html
> however this patch set does not affect the current dpdk behavior.
>
> Using rules support is possible to do the next steps:
> make config T=TARGET
> make
> make INSTALL-TARGET
>
> v4:
>
> Modify the makefile target to specify the files
> that will be installed using a rule:
>
> * make install-bin (install app files)(dafault path BIN_DIR=/usr/bin).
>
> * make install-headers (install headers)(dafault path 
> INCLUDE_DIR=/usr/include/dpdk).
>
> * make install-lib (install libraries)(dafault path if the architecture is 64 
> bits
>   is LIB_DIR=/usr/lib64 else LIB_DIR=/usr/lib).
>
> * make install-doc (install documentation)(dafault path 
> DOC_DIR=/usr/share/doc/dpdk).
>
> * make install-mod (install modules)(dafault path if RTE_EXEC_ENV=linuxapp 
> then
>   KERNEL_DIR=/lib/modules/$(uname -r)/extra/drivers/dpdk else 
> KERNEL_DIR=/boot/modules).
>
> * make install-sdk (install headers, makefiles, scripts,examples, tools and
>   config files) (default path DATA_DIR=/usr/share/dpdk).
>
> * make install-fhs (install  libraries, modules, app files,
>   nic bind files and documentation).
>
> Also you can use the DESTDIR variable.
>
> All directory variables mentioned above can be overridden:
> (BIN_DIR, LIB_DIR, INCLUDE_DIR, DOC_DIR, KERNEL_DIR and DATA_DIR).
>
>
> v3:
>
> Modify the makefile target to specify the files
> that will be installed using a rule:
>
> make install-bin (install app files)(dafault path BIN_DIR=/usr/bin).
> make install-headers (install headers)(dafault path 
> INCLUDE_DIR=/usr/include/dpdk).
> make install-lib (install libraries)(dafault path if the architecture is 64 
> bits
>   is LIB_DIR=/usr/lib64 else LIB_DIR=/usr/lib).
> make install-sbin (install nic bind files)(dafault path SBIN_DIR=/usr/sbin).
> make install-doc (install documentation)(dafault path 
> DOC_DIR=/usr/share/doc/dpdk).
> make install-mod (install modules)(dafault path if RTE_EXEC_ENV=linuxapp then
>   KERNEL_DIR=/lib/modules/$(uname -r)/build else 
> KERNEL_DIR=/boot/modules).
> make install-sdk (install headers, makefiles, scripts,examples, tools and
>   config files) (default path DATA_DIR=/usr/share/dpdk).
> make install-fhs (install  libraries, modules, app files,
>   nic bind files and documentation).
>
> Also you can use the DESTDIR variable.
> All directory variables mentioned above can be overridden
> (BIN_DIR, LIB_DIR, INCLUDE_DIR, SBIN_DIR, DOC_DIR, KERNEL_DIR and DATA_DIR).
>
>
> v2:
>
> Modify the makefile target to specify the files
> that will be installed using a rule:
>
> make install-bin (install app files).
> make install-headers (install headers).
> make install-lib (install libraries).
> make install-sbin (install nic bind files).
> make install-doc (install documentation).
> make install-mod (install modules).
> make install-sdk (install headers, makefiles, scripts,
>   examples, tools and config files).
> make install-fhs (install  libraries, modules, app files,
>   nic bind files and documentation).
>
> Also you can use the DESTDIR variable.
>
>
> v1:
>
> By adding a parameter H=1 (hierarchy-file) to makefile system, it is
> possible to do the next steps
>
> make config T=TARGET
> make
> make install H=1
>
> and files will be installed on the proper directory. Also you can use
> the DESTDIR variable.
>
> Mario Carrillo (7):
>mk: Add rule for installing headers
>mk: Add rule for installing app files
>mk: Add rule for installing libraries
>mk: Add rule for installing modules
>mk: Add rule for installing documentation
>mk: Add rule for installing sdk files
>mk: Add rule for installing runtime files
>
>   mk/rte.sdkinstall.mk | 115 
> ++-
>   mk/rte.sdkroot.mk|   6 ++-
>   2 files changed, 118 insertions(+), 3 deletions(-)
>

-- 
Regards,

Miguel Bernal MarinOpen Source Technology Center
https://clearlinux.org Intel Corporation


[dpdk-dev] [PATCH v2 4/4] kni: fix missing validation when vhost HDR is enabled

2015-06-26 Thread Miguel Bernal Marin
A missing port from memcpy_toiovecend to copy_to_iter
is showed when vHost HDR is enabled. DPDK would not build.

This patch add this validation to build with kernel > 3.19.

Fixes: 45e63ba8db31 ("kni: fix vhost build with kernels 3.19 and 4.0")
Fixes: ba7438aed924 ("vhost: don't bother copying iovecs in handle_rx(), kill 
memcpy_toiovecend()")

Signed-off-by: Miguel Bernal Marin 
---
 lib/librte_eal/linuxapp/kni/kni_vhost.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/kni/kni_vhost.c 
b/lib/librte_eal/linuxapp/kni/kni_vhost.c
index f21b47e..013a677 100644
--- a/lib/librte_eal/linuxapp/kni/kni_vhost.c
+++ b/lib/librte_eal/linuxapp/kni/kni_vhost.c
@@ -427,10 +427,15 @@ kni_sock_rcvmsg(struct socket *sock,

 #ifdef RTE_KNI_VHOST_VNET_HDR_EN
/* no need to copy hdr when no pkt received */
+#ifdef HAVE_IOV_ITER_MSGHDR
+   if (unlikely(copy_to_iter((void *)&vnet_hdr, vnet_hdr_len,
+   &m->msg_iter)))
+#else
if (unlikely(memcpy_toiovecend(m->msg_iov,
(void *)&vnet_hdr, 0, vnet_hdr_len)))
+#endif /* HAVE_IOV_ITER_MSGHDR */
return -EFAULT;
-#endif
+#endif /* RTE_KNI_VHOST_VNET_HDR_EN */
KNI_DBG_RX("kni_rcvmsg expect_len %ld, flags 0x%08x, pkt_len %d\n",
   (unsigned long)len, q->flags, pkt_len);

-- 
2.4.4



[dpdk-dev] [PATCH v2 3/4] kni: fix function parameter from proto_ops pointers

2015-06-26 Thread Miguel Bernal Marin
Parameters from sendmsg and recvmsg has been changed in 4.1 kernel.
The function pointers belong to proto_ops structure were updated removing 
the struct kiocb parameter.

Fixes: 1b784140474e ("net: Remove iocb argument from sendmsg and recvmsg")

Signed-off-by: Miguel Bernal Marin 
---
 lib/librte_eal/linuxapp/kni/compat.h|  4 
 lib/librte_eal/linuxapp/kni/kni_vhost.c | 10 ++
 2 files changed, 14 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/compat.h 
b/lib/librte_eal/linuxapp/kni/compat.h
index 1ad22ba..cf100b6 100644
--- a/lib/librte_eal/linuxapp/kni/compat.h
+++ b/lib/librte_eal/linuxapp/kni/compat.h
@@ -23,3 +23,7 @@
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
 #define HAVE_IOV_ITER_MSGHDR
 #endif
+
+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
+#define HAVE_KIOCB_MSG_PARAM
+#endif /* < 4.1.0 */
diff --git a/lib/librte_eal/linuxapp/kni/kni_vhost.c 
b/lib/librte_eal/linuxapp/kni/kni_vhost.c
index e01420a..f21b47e 100644
--- a/lib/librte_eal/linuxapp/kni/kni_vhost.c
+++ b/lib/librte_eal/linuxapp/kni/kni_vhost.c
@@ -353,8 +353,13 @@ except:
 }

 static int
+#ifdef HAVE_KIOCB_MSG_PARAM
 kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock,
   struct msghdr *m, size_t total_len)
+#else
+kni_sock_sndmsg(struct socket *sock,
+  struct msghdr *m, size_t total_len)
+#endif /* HAVE_KIOCB_MSG_PARAM */
 {
struct kni_vhost_queue *q =
container_of(sock->sk, struct kni_vhost_queue, sk);
@@ -387,8 +392,13 @@ kni_sock_sndmsg(struct kiocb *iocb, struct socket *sock,
 }

 static int
+#ifdef HAVE_KIOCB_MSG_PARAM
 kni_sock_rcvmsg(struct kiocb *iocb, struct socket *sock,
   struct msghdr *m, size_t len, int flags)
+#else
+kni_sock_rcvmsg(struct socket *sock,
+  struct msghdr *m, size_t len, int flags)
+#endif /* HAVE_KIOCB_MSG_PARAM */
 {
int vnet_hdr_len = 0;
int pkt_len = 0;
-- 
2.4.4



[dpdk-dev] [PATCH v2 2/4] kni: fix header_ops to build with 4.1

2015-06-26 Thread Miguel Bernal Marin
rebuild member was removed from headers_ops in kernel release
4.1. Therefore kni module compilation breaks.

This patch add the properly checks to fix it.

Fixes: d476059e77d1 ("net: Kill dev_rebuild_header")

Signed-off-by: Miguel Bernal Marin 
---
 lib/librte_eal/linuxapp/kni/kni_net.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c 
b/lib/librte_eal/linuxapp/kni/kni_net.c
index e34a0fd..ab5add4 100644
--- a/lib/librte_eal/linuxapp/kni/kni_net.c
+++ b/lib/librte_eal/linuxapp/kni/kni_net.c
@@ -605,6 +605,7 @@ kni_net_header(struct sk_buff *skb, struct net_device *dev,
 /*
  * Re-fill the eth header
  */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
 static int
 kni_net_rebuild_header(struct sk_buff *skb)
 {
@@ -616,6 +617,7 @@ kni_net_rebuild_header(struct sk_buff *skb)

return 0;
 }
+#endif /* < 4.1.0  */

 /**
  * kni_net_set_mac - Change the Ethernet Address of the KNI NIC
@@ -646,7 +648,9 @@ static int kni_net_change_carrier(struct net_device *dev, 
bool new_carrier)

 static const struct header_ops kni_net_header_ops = {
.create  = kni_net_header,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
.rebuild = kni_net_rebuild_header,
+#endif /* < 4.1.0  */
.cache   = NULL,  /* disable caching */
 };

-- 
2.4.4



[dpdk-dev] [PATCH v2 1/4] kni: fix igb_ndo_bridge_getlink to build with 4.1

2015-06-26 Thread Miguel Bernal Marin
ndo_bridge_getlink has changed in kernel release 4.1. It
adds new parameter which brakes compilation.

This patch add the properly checks to fix it.

Fixes: 46c264d5 ("bridge/nl: remove wrong use of NLM_F_MULTI")

Signed-off-by: Miguel Bernal Marin 
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 10 ++
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h  |  5 +
 2 files changed, 15 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c 
b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
index fa24d16..47198bb 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -2250,8 +2250,14 @@ static int igb_ndo_bridge_setlink(struct net_device *dev,
 }

 #ifdef HAVE_BRIDGE_FILTER
+#ifdef HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
+static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
+ struct net_device *dev, u32 filter_mask,
+ int nlflags)
+#else
 static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
  struct net_device *dev, u32 filter_mask)
+#endif /* HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK */
 #else
 static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
  struct net_device *dev)
@@ -2269,7 +2275,11 @@ static int igb_ndo_bridge_getlink(struct sk_buff *skb, 
u32 pid, u32 seq,
mode = BRIDGE_MODE_VEPA;

 #ifdef HAVE_NDO_FDB_ADD_VID
+#ifdef HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
+   return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0, nlflags);
+#else
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0);
+#endif /* HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK */
 #else
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
 #endif /* HAVE_NDO_FDB_ADD_VID */
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h 
b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index 44b9ebf..96d68a2 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3891,4 +3891,9 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, 
__always_unused int type)
 #define vlan_tx_tag_present skb_vlan_tag_present
 #define HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
 #endif /* 4.0.0 */
+
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) )
+/* ndo_bridge_getlink adds new nlflags parameter */
+#define HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
+#endif /* >= 4.1.0 */
 #endif /* _KCOMPAT_H_ */
-- 
2.4.4



[dpdk-dev] [PATCH v2 0/4] kni: fix build with kernel 4.1

2015-06-26 Thread Miguel Bernal Marin
Due to API changes in netdevice.h in 4.1 kernel release, KNI modules
would not build.  This patch set adds the properly checks to fix
compilation.

Changes in v2:

 - Fixed vHost module build errors.

Miguel Bernal Marin (4):
  kni: fix igb_ndo_bridge_getlink to buid with 4.1
  kni: fix header_ops to build with 4.1
  kni: fix function parameter from proto_ops pointers
  kni: fix missing validation when vhost HDR is enabled

 lib/librte_eal/linuxapp/kni/compat.h   |  4 
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 10 ++
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h  |  5 +
 lib/librte_eal/linuxapp/kni/kni_net.c  |  4 
 lib/librte_eal/linuxapp/kni/kni_vhost.c| 17 -
 5 files changed, 39 insertions(+), 1 deletion(-)

-- 
2.4.4



[dpdk-dev] [PATCH 0/2] kni: fix build with kernel 4.1

2015-06-26 Thread Miguel Bernal Marin


On 06/25/2015 04:56 PM, De Lara Guarch, Pablo wrote:
> Hi Miguel,
>
>> -Original Message-
>> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Miguel Bernal
>> Marin
>> Sent: Thursday, June 25, 2015 8:10 PM
>> To: dev at dpdk.org
>> Subject: [dpdk-dev] [PATCH 0/2] kni: fix build with kernel 4.1
>>
>> Due to API changes in netdevice.h in 4.1 kernel release, KNI modules
>> would not build.  This patch set adds the properly checks to fix
>> compilation.
>>
>> Miguel Bernal Marin (2):
>>kni: fix igb_ndo_bridge_getlink in 4.1
>>kni: fix header_ops in 4.1
>>
>>   lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 10 ++
>>   lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h  |  5 +
>>   lib/librte_eal/linuxapp/kni/kni_net.c  |  4 
>>   3 files changed, 19 insertions(+)
>>
>> --
>> 2.3.3
>
> I have tested your fix and it works for kernel 4.1, but I get and error if 
> CONFIG_RTE_KNI_VHOST=y:
>
>CC [M]  
> /root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.o
> /root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.c:593:2:
>  error: initialization from incompatible pointer type [-Werror]
>.sendmsg = kni_sock_sndmsg,
>^
> /root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.c:593:2:
>  error: (near initialization for 'kni_socket_ops.sendmsg') [-Werror]
> /root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.c:594:2:
>  error: initialization from incompatible pointer type [-Werror]
>.recvmsg = kni_sock_rcvmsg,
>^
> /root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.c:594:2:
>  error: (near initialization for 'kni_socket_ops.recvmsg') [-Werror]
> cc1: all warnings being treated as errors
> /home/kernel_test/kernels_rc/linux-4.1/scripts/Makefile.build:258: recipe for 
> target 
> '/root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.o'
>  failed
> make[10]: *** 
> [/root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/kni_vhost.o]
>  Error 1
> /home/kernel_test/kernels_rc/linux-4.1/Makefile:1383: recipe for target 
> '_module_/root/dpdk-latest/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni'
>  failed
>
> The fix for this is to remove struct socket *sock from  kni_sock_sndmsg and 
> kni_sock_rcvmsg in kni_vhost.c.
>
> Could you send a v2 with this fix as well?


Sure, I forgot to enable KNI_VHOST with 4.1.
Doing V2 and sending


>
> Thanks for this,
> Pablo
>
>


[dpdk-dev] [PATCH 2/2] kni: fix header_ops to build with 4.1

2015-06-25 Thread Miguel Bernal Marin
rebuild member was removed from headers_ops in kernel release
4.1. Therefore kni module compilation breaks.

This patch add the properly checks to fix it.

Fixes: d476059e77d1 ("net: Kill dev_rebuild_header")

Signed-off-by: Miguel Bernal Marin 
---
 lib/librte_eal/linuxapp/kni/kni_net.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c 
b/lib/librte_eal/linuxapp/kni/kni_net.c
index e34a0fd..ab5add4 100644
--- a/lib/librte_eal/linuxapp/kni/kni_net.c
+++ b/lib/librte_eal/linuxapp/kni/kni_net.c
@@ -605,6 +605,7 @@ kni_net_header(struct sk_buff *skb, struct net_device *dev,
 /*
  * Re-fill the eth header
  */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
 static int
 kni_net_rebuild_header(struct sk_buff *skb)
 {
@@ -616,6 +617,7 @@ kni_net_rebuild_header(struct sk_buff *skb)

return 0;
 }
+#endif /* < 4.1.0  */

 /**
  * kni_net_set_mac - Change the Ethernet Address of the KNI NIC
@@ -646,7 +648,9 @@ static int kni_net_change_carrier(struct net_device *dev, 
bool new_carrier)

 static const struct header_ops kni_net_header_ops = {
.create  = kni_net_header,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
.rebuild = kni_net_rebuild_header,
+#endif /* < 4.1.0  */
.cache   = NULL,  /* disable caching */
 };

-- 
2.3.3



[dpdk-dev] [PATCH 1/2] kni: fix igb_ndo_bridge_getlink to build with 4.1

2015-06-25 Thread Miguel Bernal Marin
ndo_bridge_getlink has changed in kernel release 4.1. It
adds new parameter which brakes compilation.

This patch add the properly checks to fix it.

Fixes: 46c264d5 ("bridge/nl: remove wrong use of NLM_F_MULTI")

Signed-off-by: Miguel Bernal Marin 
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 10 ++
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h  |  5 +
 2 files changed, 15 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c 
b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
index fa24d16..47198bb 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -2250,8 +2250,14 @@ static int igb_ndo_bridge_setlink(struct net_device *dev,
 }

 #ifdef HAVE_BRIDGE_FILTER
+#ifdef HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
+static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
+ struct net_device *dev, u32 filter_mask,
+ int nlflags)
+#else
 static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
  struct net_device *dev, u32 filter_mask)
+#endif /* HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK */
 #else
 static int igb_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
  struct net_device *dev)
@@ -2269,7 +2275,11 @@ static int igb_ndo_bridge_getlink(struct sk_buff *skb, 
u32 pid, u32 seq,
mode = BRIDGE_MODE_VEPA;

 #ifdef HAVE_NDO_FDB_ADD_VID
+#ifdef HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
+   return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0, nlflags);
+#else
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0);
+#endif /* HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK */
 #else
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
 #endif /* HAVE_NDO_FDB_ADD_VID */
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h 
b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index 44b9ebf..96d68a2 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3891,4 +3891,9 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, 
__always_unused int type)
 #define vlan_tx_tag_present skb_vlan_tag_present
 #define HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS
 #endif /* 4.0.0 */
+
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0) )
+/* ndo_bridge_getlink adds new nlflags parameter */
+#define HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK
+#endif /* >= 4.1.0 */
 #endif /* _KCOMPAT_H_ */
-- 
2.3.3



[dpdk-dev] [PATCH 0/2] kni: fix build with kernel 4.1

2015-06-25 Thread Miguel Bernal Marin
Due to API changes in netdevice.h in 4.1 kernel release, KNI modules
would not build.  This patch set adds the properly checks to fix
compilation.

Miguel Bernal Marin (2):
  kni: fix igb_ndo_bridge_getlink in 4.1
  kni: fix header_ops in 4.1

 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 10 ++
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h  |  5 +
 lib/librte_eal/linuxapp/kni/kni_net.c  |  4 
 3 files changed, 19 insertions(+)

-- 
2.3.3



[dpdk-dev] Headers files with BSD license in kernel

2015-06-09 Thread Miguel Bernal Marin
Including maintainers in CC

On Tue, Jun 09, 2015 at 12:40:57PM -0500, Miguel Bernal Marin wrote:
> Hi,
> 
> I'm working on Clear Linux project, and when I was integrating DPDK
> kernel modules to our kernel I found there are two headers with 
> BSD License
> 
> rte_pci_dev_feature_defs.h
> rte_pci_dev_features.h
> 
> those are included in igb_uio module.
> 
> Are those licenses correct?
> 
> Thanks,
> Miguel
> 


[dpdk-dev] Headers files with BSD license in kernel

2015-06-09 Thread Miguel Bernal Marin
Hi,

I'm working on Clear Linux project, and when I was integrating DPDK
kernel modules to our kernel I found there are two headers with 
BSD License

rte_pci_dev_feature_defs.h
rte_pci_dev_features.h

those are included in igb_uio module.

Are those licenses correct?

Thanks,
Miguel