DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] kni: fix build with kernel 4.11
@ 2017-03-20 11:22 Ferruh Yigit
  2017-03-20 11:34 ` Jerin Jacob
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ferruh Yigit @ 2017-03-20 11:22 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dev, Ferruh Yigit

compile error:
.../build/build/lib/librte_eal/linuxapp/kni/kni_net.c:124:6:
error: implicit declaration of function ‘signal_pending’
[-Werror=implicit-function-declaration]
  if (signal_pending(current) || ret_val <= 0) {
      ^~~~~~~~~~~~~~

Linux 4.11 moves signal function declarations to its own header file:
Linux: 174cd4b1e5fb ("sched/headers: Prepare to move signal wakeup &
sigpending methods from <linux/sched.h> into <linux/sched/signal.h>")

User new header file "linux/sched/signal.h" to fix build error.

Reported-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/compat.h  | 6 ++++++
 lib/librte_eal/linuxapp/kni/kni_dev.h | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
index 78da08e..d96275a 100644
--- a/lib/librte_eal/linuxapp/kni/compat.h
+++ b/lib/librte_eal/linuxapp/kni/compat.h
@@ -2,6 +2,8 @@
  * Minimal wrappers to allow compiling kni on older kernels.
  */
 
+#include <linux/version.h>
+
 #ifndef RHEL_RELEASE_VERSION
 #define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b))
 #endif
@@ -67,3 +69,7 @@
 	(LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)))
 #undef NET_NAME_UNKNOWN
 #endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
+#endif
diff --git a/lib/librte_eal/linuxapp/kni/kni_dev.h b/lib/librte_eal/linuxapp/kni/kni_dev.h
index 002e5fa..72385ab 100644
--- a/lib/librte_eal/linuxapp/kni/kni_dev.h
+++ b/lib/librte_eal/linuxapp/kni/kni_dev.h
@@ -30,9 +30,15 @@
 #endif
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include "compat.h"
+
 #include <linux/if.h>
 #include <linux/wait.h>
+#ifdef HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
+#include <linux/sched/signal.h>
+#else
 #include <linux/sched.h>
+#endif
 #include <linux/netdevice.h>
 #include <linux/spinlock.h>
 #include <linux/list.h>
-- 
2.9.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] kni: fix build with kernel 4.11
  2017-03-20 11:22 [dpdk-dev] [PATCH] kni: fix build with kernel 4.11 Ferruh Yigit
@ 2017-03-20 11:34 ` Jerin Jacob
  2017-03-21  7:12 ` Pankaj Gupta
  2017-03-21  9:54 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
  2 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2017-03-20 11:34 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Mon, Mar 20, 2017 at 11:22:08AM +0000, Ferruh Yigit wrote:
> compile error:
> .../build/build/lib/librte_eal/linuxapp/kni/kni_net.c:124:6:
> error: implicit declaration of function ‘signal_pending’
> [-Werror=implicit-function-declaration]
>   if (signal_pending(current) || ret_val <= 0) {
>       ^~~~~~~~~~~~~~
> 
> Linux 4.11 moves signal function declarations to its own header file:
> Linux: 174cd4b1e5fb ("sched/headers: Prepare to move signal wakeup &
> sigpending methods from <linux/sched.h> into <linux/sched/signal.h>")
> 
> User new header file "linux/sched/signal.h" to fix build error.
> 
> Reported-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Kernel version: 4.11-rc3

> ---
>  lib/librte_eal/linuxapp/kni/compat.h  | 6 ++++++
>  lib/librte_eal/linuxapp/kni/kni_dev.h | 6 ++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
> index 78da08e..d96275a 100644
> --- a/lib/librte_eal/linuxapp/kni/compat.h
> +++ b/lib/librte_eal/linuxapp/kni/compat.h
> @@ -2,6 +2,8 @@
>   * Minimal wrappers to allow compiling kni on older kernels.
>   */
>  
> +#include <linux/version.h>
> +
>  #ifndef RHEL_RELEASE_VERSION
>  #define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b))
>  #endif
> @@ -67,3 +69,7 @@
>  	(LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)))
>  #undef NET_NAME_UNKNOWN
>  #endif
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
> +#define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
> +#endif
> diff --git a/lib/librte_eal/linuxapp/kni/kni_dev.h b/lib/librte_eal/linuxapp/kni/kni_dev.h
> index 002e5fa..72385ab 100644
> --- a/lib/librte_eal/linuxapp/kni/kni_dev.h
> +++ b/lib/librte_eal/linuxapp/kni/kni_dev.h
> @@ -30,9 +30,15 @@
>  #endif
>  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>  
> +#include "compat.h"
> +
>  #include <linux/if.h>
>  #include <linux/wait.h>
> +#ifdef HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
> +#include <linux/sched/signal.h>
> +#else
>  #include <linux/sched.h>
> +#endif
>  #include <linux/netdevice.h>
>  #include <linux/spinlock.h>
>  #include <linux/list.h>
> -- 
> 2.9.3
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] kni: fix build with kernel 4.11
  2017-03-20 11:22 [dpdk-dev] [PATCH] kni: fix build with kernel 4.11 Ferruh Yigit
  2017-03-20 11:34 ` Jerin Jacob
@ 2017-03-21  7:12 ` Pankaj Gupta
  2017-03-21  9:54 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
  2 siblings, 0 replies; 5+ messages in thread
From: Pankaj Gupta @ 2017-03-21  7:12 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Jerin Jacob, dev


Hello,

> 
> compile error:
> .../build/build/lib/librte_eal/linuxapp/kni/kni_net.c:124:6:
> error: implicit declaration of function ‘signal_pending’
> [-Werror=implicit-function-declaration]
>   if (signal_pending(current) || ret_val <= 0) {
>       ^~~~~~~~~~~~~~
> 
> Linux 4.11 moves signal function declarations to its own header file:
> Linux: 174cd4b1e5fb ("sched/headers: Prepare to move signal wakeup &
> sigpending methods from <linux/sched.h> into <linux/sched/signal.h>")
> 
> User new header file "linux/sched/signal.h" to fix build error.
> 
> Reported-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  lib/librte_eal/linuxapp/kni/compat.h  | 6 ++++++
>  lib/librte_eal/linuxapp/kni/kni_dev.h | 6 ++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/lib/librte_eal/linuxapp/kni/compat.h
> b/lib/librte_eal/linuxapp/kni/compat.h
> index 78da08e..d96275a 100644
> --- a/lib/librte_eal/linuxapp/kni/compat.h
> +++ b/lib/librte_eal/linuxapp/kni/compat.h
> @@ -2,6 +2,8 @@
>   * Minimal wrappers to allow compiling kni on older kernels.
>   */
>  
> +#include <linux/version.h>
> +
>  #ifndef RHEL_RELEASE_VERSION
>  #define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b))
>  #endif
> @@ -67,3 +69,7 @@
>  	(LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)))
>  #undef NET_NAME_UNKNOWN
>  #endif
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
> +#define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
> +#endif
> diff --git a/lib/librte_eal/linuxapp/kni/kni_dev.h
> b/lib/librte_eal/linuxapp/kni/kni_dev.h
> index 002e5fa..72385ab 100644
> --- a/lib/librte_eal/linuxapp/kni/kni_dev.h
> +++ b/lib/librte_eal/linuxapp/kni/kni_dev.h
> @@ -30,9 +30,15 @@
>  #endif
>  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>  
> +#include "compat.h"
> +
>  #include <linux/if.h>
>  #include <linux/wait.h>
> +#ifdef HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
> +#include <linux/sched/signal.h>
> +#else
>  #include <linux/sched.h>
> +#endif
>  #include <linux/netdevice.h>
>  #include <linux/spinlock.h>
>  #include <linux/list.h>
> --
> 2.9.3

This patch fixes build error of DPDK with linux kernel version 4.11.0-rc2 for me.

Tested-by:pagupta@redhat.com

> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH v2] kni: fix build with kernel 4.11
  2017-03-20 11:22 [dpdk-dev] [PATCH] kni: fix build with kernel 4.11 Ferruh Yigit
  2017-03-20 11:34 ` Jerin Jacob
  2017-03-21  7:12 ` Pankaj Gupta
@ 2017-03-21  9:54 ` Ferruh Yigit
  2017-03-30 14:44   ` Thomas Monjalon
  2 siblings, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2017-03-21  9:54 UTC (permalink / raw)
  To: Jerin Jacob, Thomas Monjalon; +Cc: dev, stable, Ferruh Yigit

compile error:
.../build/build/lib/librte_eal/linuxapp/kni/kni_net.c:124:6:
error: implicit declaration of function ‘signal_pending’
[-Werror=implicit-function-declaration]
  if (signal_pending(current) || ret_val <= 0) {
      ^~~~~~~~~~~~~~

Linux 4.11 moves signal function declarations to its own header file:
Linux: 174cd4b1e5fb ("sched/headers: Prepare to move signal wakeup &
sigpending methods from <linux/sched.h> into <linux/sched/signal.h>")

Use new header file "linux/sched/signal.h" to fix the build error.

Cc: stable@dpdk.org

Reported-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Tested-by: Pankaj Gupta <pagupta@redhat.com>
---
v2:
* update commit log User -> Use
* CC: stable and Thomas
---
 lib/librte_eal/linuxapp/kni/compat.h  | 6 ++++++
 lib/librte_eal/linuxapp/kni/kni_dev.h | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
index 78da08e..d96275a 100644
--- a/lib/librte_eal/linuxapp/kni/compat.h
+++ b/lib/librte_eal/linuxapp/kni/compat.h
@@ -2,6 +2,8 @@
  * Minimal wrappers to allow compiling kni on older kernels.
  */
 
+#include <linux/version.h>
+
 #ifndef RHEL_RELEASE_VERSION
 #define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b))
 #endif
@@ -67,3 +69,7 @@
 	(LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)))
 #undef NET_NAME_UNKNOWN
 #endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
+#endif
diff --git a/lib/librte_eal/linuxapp/kni/kni_dev.h b/lib/librte_eal/linuxapp/kni/kni_dev.h
index 002e5fa..72385ab 100644
--- a/lib/librte_eal/linuxapp/kni/kni_dev.h
+++ b/lib/librte_eal/linuxapp/kni/kni_dev.h
@@ -30,9 +30,15 @@
 #endif
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include "compat.h"
+
 #include <linux/if.h>
 #include <linux/wait.h>
+#ifdef HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
+#include <linux/sched/signal.h>
+#else
 #include <linux/sched.h>
+#endif
 #include <linux/netdevice.h>
 #include <linux/spinlock.h>
 #include <linux/list.h>
-- 
2.9.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH v2] kni: fix build with kernel 4.11
  2017-03-21  9:54 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
@ 2017-03-30 14:44   ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-03-30 14:44 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Jerin Jacob, dev, stable

2017-03-21 09:54, Ferruh Yigit:
> compile error:
> .../build/build/lib/librte_eal/linuxapp/kni/kni_net.c:124:6:
> error: implicit declaration of function ‘signal_pending’
> [-Werror=implicit-function-declaration]
>   if (signal_pending(current) || ret_val <= 0) {
>       ^~~~~~~~~~~~~~
> 
> Linux 4.11 moves signal function declarations to its own header file:
> Linux: 174cd4b1e5fb ("sched/headers: Prepare to move signal wakeup &
> sigpending methods from <linux/sched.h> into <linux/sched/signal.h>")
> 
> Use new header file "linux/sched/signal.h" to fix the build error.
> 
> Cc: stable@dpdk.org
> 
> Reported-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Tested-by: Pankaj Gupta <pagupta@redhat.com>
> ---
> v2:
> * update commit log User -> Use
> * CC: stable and Thomas

Applied, thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-30 14:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20 11:22 [dpdk-dev] [PATCH] kni: fix build with kernel 4.11 Ferruh Yigit
2017-03-20 11:34 ` Jerin Jacob
2017-03-21  7:12 ` Pankaj Gupta
2017-03-21  9:54 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2017-03-30 14:44   ` Thomas Monjalon

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).