DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5
@ 2018-03-01 23:20 Lee Roberts
  2018-03-02  0:18 ` Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lee Roberts @ 2018-03-01 23:20 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Lee Roberts

Fix kni compilation under RHEL 7.5.

Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
---
 lib/librte_eal/linuxapp/kni/compat.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
index 3f8c0bc..6a6968d 100644
--- a/lib/librte_eal/linuxapp/kni/compat.h
+++ b/lib/librte_eal/linuxapp/kni/compat.h
@@ -101,6 +101,11 @@
 #undef NET_NAME_UNKNOWN
 #endif
 
+#if (defined(RHEL_RELEASE_CODE) && \
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
+#define ndo_change_mtu ndo_change_mtu_rh74
+#endif
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
 #define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
 #endif
-- 
1.9.1

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

* Re: [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5
  2018-03-01 23:20 [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5 Lee Roberts
@ 2018-03-02  0:18 ` Stephen Hemminger
  2018-03-02  3:18   ` Roberts, Lee A.
  2018-03-22 18:07 ` Ferruh Yigit
  2018-04-19 13:09 ` Maxime Coquelin
  2 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2018-03-02  0:18 UTC (permalink / raw)
  To: Lee Roberts; +Cc: ferruh.yigit, dev

On Thu,  1 Mar 2018 16:20:35 -0700
Lee Roberts <lee.roberts@hpe.com> wrote:

> Fix kni compilation under RHEL 7.5.
> 
> Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
> ---
>  lib/librte_eal/linuxapp/kni/compat.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
> index 3f8c0bc..6a6968d 100644
> --- a/lib/librte_eal/linuxapp/kni/compat.h
> +++ b/lib/librte_eal/linuxapp/kni/compat.h
> @@ -101,6 +101,11 @@
>  #undef NET_NAME_UNKNOWN
>  #endif
>  
> +#if (defined(RHEL_RELEASE_CODE) && \
> +	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
> +#define ndo_change_mtu ndo_change_mtu_rh74
> +#endif
> +
>  #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
>  #define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
>  #endif

Do we really want upstream DPDK trying to track every vendor kernel compatibility wart?
Should Redhat be owning this in their own DPDK package?

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

* Re: [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5
  2018-03-02  0:18 ` Stephen Hemminger
@ 2018-03-02  3:18   ` Roberts, Lee A.
  0 siblings, 0 replies; 7+ messages in thread
From: Roberts, Lee A. @ 2018-03-02  3:18 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: ferruh.yigit, dev

> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Thursday, March 01, 2018 5:18 PM
> To: Roberts, Lee A. <lee.roberts@hpe.com>
> Cc: ferruh.yigit@intel.com; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5
> 
> On Thu,  1 Mar 2018 16:20:35 -0700
> Lee Roberts <lee.roberts@hpe.com> wrote:
> 
> > Fix kni compilation under RHEL 7.5.
> >
> > Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
> > ---
> >  lib/librte_eal/linuxapp/kni/compat.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
> > index 3f8c0bc..6a6968d 100644
> > --- a/lib/librte_eal/linuxapp/kni/compat.h
> > +++ b/lib/librte_eal/linuxapp/kni/compat.h
> > @@ -101,6 +101,11 @@
> >  #undef NET_NAME_UNKNOWN
> >  #endif
> >
> > +#if (defined(RHEL_RELEASE_CODE) && \
> > +	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
> > +#define ndo_change_mtu ndo_change_mtu_rh74
> > +#endif
> > +
> >  #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
> >  #define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
> >  #endif
> 
> Do we really want upstream DPDK trying to track every vendor kernel compatibility wart?
> Should Redhat be owning this in their own DPDK package?

If I look at the first few lines of ../lib/librte_eal/linuxapp/kni/compat.h,
it appears that tracking changes in RHEL and SLES is certainly part of the
purpose of this file:

      1 /*
      2  * Minimal wrappers to allow compiling kni on older kernels.
      3  */
      4 
      5 #include <linux/version.h>
      6 
      7 #ifndef RHEL_RELEASE_VERSION
      8 #define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b))
      9 #endif
     10 
     11 /* SuSE version macro is the same as Linux kernel version */
     12 #ifndef SLE_VERSION
     13 #define SLE_VERSION(a, b, c) KERNEL_VERSION(a, b, c)
     14 #endif
     15 #ifdef CONFIG_SUSE_KERNEL

If you want to remove the vendor dependency, I'd suggest the following actions:

1) Submit a patch to remove the RHEL- and SLES-specific code.
2) Disable KNI by default in the build system.

                                              - Lee

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

* Re: [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5
  2018-03-01 23:20 [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5 Lee Roberts
  2018-03-02  0:18 ` Stephen Hemminger
@ 2018-03-22 18:07 ` Ferruh Yigit
  2018-03-27 22:15   ` Thomas Monjalon
  2018-04-19 13:09 ` Maxime Coquelin
  2 siblings, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2018-03-22 18:07 UTC (permalink / raw)
  To: Lee Roberts; +Cc: dev

On 3/1/2018 11:20 PM, Lee Roberts wrote:
> Fix kni compilation under RHEL 7.5.
> 
> Signed-off-by: Lee Roberts <lee.roberts@hpe.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>


(Not tested on RHEL 7.5 but code looks good)

Following patch title can be used for compatibility with old commits:
"kni: fix build on RHEL 7.5"

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

* Re: [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5
  2018-03-22 18:07 ` Ferruh Yigit
@ 2018-03-27 22:15   ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2018-03-27 22:15 UTC (permalink / raw)
  To: Lee Roberts; +Cc: dev, Ferruh Yigit

22/03/2018 19:07, Ferruh Yigit:
> On 3/1/2018 11:20 PM, Lee Roberts wrote:
> > Fix kni compilation under RHEL 7.5.
> > 
> > Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> 
> (Not tested on RHEL 7.5 but code looks good)
> 
> Following patch title can be used for compatibility with old commits:
> "kni: fix build on RHEL 7.5"

Applied, thanks

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

* Re: [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5
  2018-03-01 23:20 [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5 Lee Roberts
  2018-03-02  0:18 ` Stephen Hemminger
  2018-03-22 18:07 ` Ferruh Yigit
@ 2018-04-19 13:09 ` Maxime Coquelin
  2018-04-19 21:49   ` Luca Boccassi
  2 siblings, 1 reply; 7+ messages in thread
From: Maxime Coquelin @ 2018-04-19 13:09 UTC (permalink / raw)
  To: Lee Roberts, ferruh.yigit, Thomas Monjalon, Luca Boccassi, Yuanhan Liu
  Cc: dev

Hi Luca, Yuanhan,

On 03/02/2018 12:20 AM, Lee Roberts wrote:
> Fix kni compilation under RHEL 7.5.
> 
> Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
> ---
>   lib/librte_eal/linuxapp/kni/compat.h | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/lib/librte_eal/linuxapp/kni/compat.h b/lib/librte_eal/linuxapp/kni/compat.h
> index 3f8c0bc..6a6968d 100644
> --- a/lib/librte_eal/linuxapp/kni/compat.h
> +++ b/lib/librte_eal/linuxapp/kni/compat.h
> @@ -101,6 +101,11 @@
>   #undef NET_NAME_UNKNOWN
>   #endif
>   
> +#if (defined(RHEL_RELEASE_CODE) && \
> +	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
> +#define ndo_change_mtu ndo_change_mtu_rh74
> +#endif
> +
>   #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
>   #define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
>   #endif
> 

Any chance we pick these patches in stable branches so that
we can build them with RHEL 7.5 without disabling KNI?

I think it should apply cleanly on all of them, but I can send the
backport patches for each of them if necessary.

Thanks,
Maxime

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

* Re: [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5
  2018-04-19 13:09 ` Maxime Coquelin
@ 2018-04-19 21:49   ` Luca Boccassi
  0 siblings, 0 replies; 7+ messages in thread
From: Luca Boccassi @ 2018-04-19 21:49 UTC (permalink / raw)
  To: Maxime Coquelin, Lee Roberts, ferruh.yigit, Thomas Monjalon, Yuanhan Liu
  Cc: dev

On Thu, 2018-04-19 at 15:09 +0200, Maxime Coquelin wrote:
> Hi Luca, Yuanhan,
> 
> On 03/02/2018 12:20 AM, Lee Roberts wrote:
> > Fix kni compilation under RHEL 7.5.
> > 
> > Signed-off-by: Lee Roberts <lee.roberts@hpe.com>
> > ---
> >   lib/librte_eal/linuxapp/kni/compat.h | 5 +++++
> >   1 file changed, 5 insertions(+)
> > 
> > diff --git a/lib/librte_eal/linuxapp/kni/compat.h
> > b/lib/librte_eal/linuxapp/kni/compat.h
> > index 3f8c0bc..6a6968d 100644
> > --- a/lib/librte_eal/linuxapp/kni/compat.h
> > +++ b/lib/librte_eal/linuxapp/kni/compat.h
> > @@ -101,6 +101,11 @@
> >   #undef NET_NAME_UNKNOWN
> >   #endif
> >   
> > +#if (defined(RHEL_RELEASE_CODE) && \
> > +	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
> > +#define ndo_change_mtu ndo_change_mtu_rh74
> > +#endif
> > +
> >   #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
> >   #define HAVE_SIGNAL_FUNCTIONS_OWN_HEADER
> >   #endif
> > 
> 
> Any chance we pick these patches in stable branches so that
> we can build them with RHEL 7.5 without disabling KNI?
> 
> I think it should apply cleanly on all of them, but I can send the
> backport patches for each of them if necessary.
> 
> Thanks,
> Maxime

Sure, I can have a look early next week for 16.11.

-- 
Kind regards,
Luca Boccassi

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

end of thread, other threads:[~2018-04-19 21:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 23:20 [dpdk-dev] [PATCH] kni: fix compilation under RHEL 7.5 Lee Roberts
2018-03-02  0:18 ` Stephen Hemminger
2018-03-02  3:18   ` Roberts, Lee A.
2018-03-22 18:07 ` Ferruh Yigit
2018-03-27 22:15   ` Thomas Monjalon
2018-04-19 13:09 ` Maxime Coquelin
2018-04-19 21:49   ` Luca Boccassi

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