Re: [ovs-dev] [PATCH 2/2] datapath: Add support for kernel 4.19.x and 4.20.x

2019-04-01 Thread Yifeng Sun
Thanks, I'll take a look.

On Mon, Apr 1, 2019 at 11:23 AM Gregory Rose  wrote:
>
>
>
> On 3/29/2019 4:01 PM, Yifeng Sun wrote:
> > Hi Greg,
> >
> > I tried 4.20.17 on 16.04 and it is still working.
> > Do you mind sharing your .config file? Maybe there is some config
> > differences between our test machines?
>
> Hmm... well, I poked around a bit but I'm still getting the issue with
> no obvious solution.  I've attached my
> config file.
>
> Thanks,
>
> - Greg
>
> > Thanks,
> > Yifeng
> >
> > On Fri, Mar 29, 2019 at 3:28 PM Gregory Rose  wrote:
> >>
> >>
> >> On 3/29/2019 3:16 PM, Yifeng Sun wrote:
> >>> Hi Greg, I tried new kernel 4.20.17 on ubuntu 8.10 but everything works 
> >>> fine.
> >>> Do you mind telling me what Linux were you using?
> >>>
> >>> Thanks,
> >>> Yifeng
> >> It was a  Ubuntu Xenial 16.04 with the custom built 4.20.17 kernel from
> >> kernel.org.  I'm not sure what difference
> >> that should make though.
> >>
> >> - Greg
> >>
> >>> On Fri, Mar 29, 2019 at 9:21 AM Yifeng Sun  wrote:
>  Hi Greg, thanks for the review. I will check on it.
>  Yifeng
> 
>  On Fri, Mar 29, 2019 at 8:19 AM Gregory Rose  
>  wrote:
> > On 3/15/2019 7:20 PM, Yifeng Sun wrote:
> >> This patch introduces changes needed by OVS to support latest
> >> Linux kernels (4.19.x and 4.20.x). Recent kernels changed many
> >> APIs used by OVS. One major change is that struct nf_conntrack_l3proto
> >> became unvisible outside of kernel, so the needed get_l4proto
> >> function is added in file compact/nf_conntrack_core.c to
> >> accommodate this issue.
> >>
> >> This patch doesn't introduce new failed tests when running
> >> 'make check-kmod' for kernels listed below:
> >>3.10.0-957.5.1.el7.x86_64
> >>4.4.0-142-generic
> >>4.17.14
> >>4.18.0-16-generic
> >>4.19.26
> >>4.20.13
> >>
> >> Travis passed at
> >> https://travis-ci.org/yifsun/ovs-travis/builds/507034016
> > Hi Yifeng,
> >
> > thanks for doing this work!  However, I am seeing an issue when
> > compiling on 4.20.17 and then installing
> > the kernel modules:
> >
> > make -C /lib/modules/4.20.17/build
> > M=/home/gvrose/prj/ovs-experimental/_build/datapath/linux 
> > modules_install
> > make[2]: Entering directory '/home/gvrose/prj/linux-4.20.17'
> >  INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/openvswitch.ko
> >  INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-geneve.ko
> >  INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-gre.ko
> >  INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-lisp.ko
> >  INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-stt.ko
> >  INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-vxlan.ko
> >  DEPMOD  4.20.17
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
> > symbol rpl_rtnl_delete_link
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
> > symbol rpl_lisp_xmit
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
> > symbol rpl_lisp_dev_create_fb
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
> > symbol rpl_rtnl_delete_link
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
> > symbol ovs_stt_dev_create_fb
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
> > symbol ovs_stt_xmit
> > make[2]: Leaving directory '/home/gvrose/prj/linux-4.20.17'
> >
> > Could you check that?  Maybe there were changes from 4.20.13 to 4.20.17?
> >
> > Thanks,
> >
> > - Greg
> >
> >> Signed-off-by: Yifeng Sun 
> >> ---
> >> .travis.yml   |  2 +
> >> NEWS  |  2 +
> >> acinclude.m4  | 20 -
> >> datapath/conntrack.c  | 72 
> >> -
> >> .../include/net/netfilter/nf_conntrack_core.h |  6 ++
> >> .../net/netfilter/nf_conntrack_count.h|  2 +
> >> datapath/linux/compat/nf_conncount.c  |  6 +-
> >> datapath/linux/compat/nf_conntrack_core.c | 80 
> >> +++
> >> datapath/linux/compat/nf_conntrack_proto.c|  3 +
> >> 9 files changed, 186 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/.travis.yml b/.travis.yml
> >> index 32d5f1918..dc7a20b6e 100644
> >> --- a/.travis.yml
> >> +++ b/.travis.yml
> >> @@ -35,6 +35,8 @@ env:
> >>   - KERNEL=3.16.54 TESTSUITE=1 DPDK=1
> >>   - KERNEL=3.16.54 DPDK_SHARED=1
> >>   - 

Re: [ovs-dev] [PATCH 2/2] datapath: Add support for kernel 4.19.x and 4.20.x

2019-03-29 Thread Gregory Rose



On 3/29/2019 4:01 PM, Yifeng Sun wrote:

Hi Greg,

I tried 4.20.17 on 16.04 and it is still working.
Do you mind sharing your .config file? Maybe there is some config
differences between our test machines?


Really?  Huh, well now I suspect I did something wrong.  Let me recheck 
and get back.


Thanks,

- Greg



Thanks,
Yifeng

On Fri, Mar 29, 2019 at 3:28 PM Gregory Rose  wrote:



On 3/29/2019 3:16 PM, Yifeng Sun wrote:

Hi Greg, I tried new kernel 4.20.17 on ubuntu 8.10 but everything works fine.
Do you mind telling me what Linux were you using?

Thanks,
Yifeng

It was a  Ubuntu Xenial 16.04 with the custom built 4.20.17 kernel from
kernel.org.  I'm not sure what difference
that should make though.

- Greg


On Fri, Mar 29, 2019 at 9:21 AM Yifeng Sun  wrote:

Hi Greg, thanks for the review. I will check on it.
Yifeng

On Fri, Mar 29, 2019 at 8:19 AM Gregory Rose  wrote:

On 3/15/2019 7:20 PM, Yifeng Sun wrote:

This patch introduces changes needed by OVS to support latest
Linux kernels (4.19.x and 4.20.x). Recent kernels changed many
APIs used by OVS. One major change is that struct nf_conntrack_l3proto
became unvisible outside of kernel, so the needed get_l4proto
function is added in file compact/nf_conntrack_core.c to
accommodate this issue.

This patch doesn't introduce new failed tests when running
'make check-kmod' for kernels listed below:
   3.10.0-957.5.1.el7.x86_64
   4.4.0-142-generic
   4.17.14
   4.18.0-16-generic
   4.19.26
   4.20.13

Travis passed at
https://travis-ci.org/yifsun/ovs-travis/builds/507034016

Hi Yifeng,

thanks for doing this work!  However, I am seeing an issue when
compiling on 4.20.17 and then installing
the kernel modules:

make -C /lib/modules/4.20.17/build
M=/home/gvrose/prj/ovs-experimental/_build/datapath/linux modules_install
make[2]: Entering directory '/home/gvrose/prj/linux-4.20.17'
 INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/openvswitch.ko
 INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-geneve.ko
 INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-gre.ko
 INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-lisp.ko
 INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-stt.ko
 INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-vxlan.ko
 DEPMOD  4.20.17
depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
symbol rpl_rtnl_delete_link
depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
symbol rpl_lisp_xmit
depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
symbol rpl_lisp_dev_create_fb
depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
symbol rpl_rtnl_delete_link
depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
symbol ovs_stt_dev_create_fb
depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
symbol ovs_stt_xmit
make[2]: Leaving directory '/home/gvrose/prj/linux-4.20.17'

Could you check that?  Maybe there were changes from 4.20.13 to 4.20.17?

Thanks,

- Greg


Signed-off-by: Yifeng Sun 
---
.travis.yml   |  2 +
NEWS  |  2 +
acinclude.m4  | 20 -
datapath/conntrack.c  | 72 -
.../include/net/netfilter/nf_conntrack_core.h |  6 ++
.../net/netfilter/nf_conntrack_count.h|  2 +
datapath/linux/compat/nf_conncount.c  |  6 +-
datapath/linux/compat/nf_conntrack_core.c | 80 +++
datapath/linux/compat/nf_conntrack_proto.c|  3 +
9 files changed, 186 insertions(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 32d5f1918..dc7a20b6e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,6 +35,8 @@ env:
  - KERNEL=3.16.54 TESTSUITE=1 DPDK=1
  - KERNEL=3.16.54 DPDK_SHARED=1
  - KERNEL=3.16.54 DPDK_SHARED=1 OPTS="--enable-shared"
+  - KERNEL=4.20.16
+  - KERNEL=4.19.29
  - KERNEL=4.18.20
  - KERNEL=4.17.19
  - KERNEL=4.16.18
diff --git a/NEWS b/NEWS
index 1e4744dbd..af5b5222f 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,8 @@ Post-v2.11.0
   - OVN:
 * Select IPAM mac_prefix in a random manner if not provided by the user
   - New QoS type "linux-netem" on Linux.
+   - Linux datapath:
+ * Support for the kernel versions 4.19.x, 4.20.x.

v2.11.0 - 19 Feb 2019
-
diff --git a/acinclude.m4 b/acinclude.m4
index 3cd6ea730..7b11b7740 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -151,10 +151,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
AC_MSG_RESULT([$kversion])

if test "$version" -ge 4; then
-   if test "$version" = 4 && test "$patchlevel" -le 18; then
+   if test "$version" = 4 && test "$patchlevel" -le 20; then
  : # Linux 4.x
   else
-  AC_ERROR([Linux 

Re: [ovs-dev] [PATCH 2/2] datapath: Add support for kernel 4.19.x and 4.20.x

2019-03-29 Thread Yifeng Sun
Hi Greg,

I tried 4.20.17 on 16.04 and it is still working.
Do you mind sharing your .config file? Maybe there is some config
differences between our test machines?

Thanks,
Yifeng

On Fri, Mar 29, 2019 at 3:28 PM Gregory Rose  wrote:
>
>
>
> On 3/29/2019 3:16 PM, Yifeng Sun wrote:
> > Hi Greg, I tried new kernel 4.20.17 on ubuntu 8.10 but everything works 
> > fine.
> > Do you mind telling me what Linux were you using?
> >
> > Thanks,
> > Yifeng
>
> It was a  Ubuntu Xenial 16.04 with the custom built 4.20.17 kernel from
> kernel.org.  I'm not sure what difference
> that should make though.
>
> - Greg
>
> >
> > On Fri, Mar 29, 2019 at 9:21 AM Yifeng Sun  wrote:
> >> Hi Greg, thanks for the review. I will check on it.
> >> Yifeng
> >>
> >> On Fri, Mar 29, 2019 at 8:19 AM Gregory Rose  wrote:
> >>>
> >>> On 3/15/2019 7:20 PM, Yifeng Sun wrote:
>  This patch introduces changes needed by OVS to support latest
>  Linux kernels (4.19.x and 4.20.x). Recent kernels changed many
>  APIs used by OVS. One major change is that struct nf_conntrack_l3proto
>  became unvisible outside of kernel, so the needed get_l4proto
>  function is added in file compact/nf_conntrack_core.c to
>  accommodate this issue.
> 
>  This patch doesn't introduce new failed tests when running
>  'make check-kmod' for kernels listed below:
>    3.10.0-957.5.1.el7.x86_64
>    4.4.0-142-generic
>    4.17.14
>    4.18.0-16-generic
>    4.19.26
>    4.20.13
> 
>  Travis passed at
>  https://travis-ci.org/yifsun/ovs-travis/builds/507034016
> >>> Hi Yifeng,
> >>>
> >>> thanks for doing this work!  However, I am seeing an issue when
> >>> compiling on 4.20.17 and then installing
> >>> the kernel modules:
> >>>
> >>> make -C /lib/modules/4.20.17/build
> >>> M=/home/gvrose/prj/ovs-experimental/_build/datapath/linux modules_install
> >>> make[2]: Entering directory '/home/gvrose/prj/linux-4.20.17'
> >>> INSTALL
> >>> /home/gvrose/prj/ovs-experimental/_build/datapath/linux/openvswitch.ko
> >>> INSTALL
> >>> /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-geneve.ko
> >>> INSTALL
> >>> /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-gre.ko
> >>> INSTALL
> >>> /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-lisp.ko
> >>> INSTALL
> >>> /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-stt.ko
> >>> INSTALL
> >>> /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-vxlan.ko
> >>> DEPMOD  4.20.17
> >>> depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
> >>> symbol rpl_rtnl_delete_link
> >>> depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
> >>> symbol rpl_lisp_xmit
> >>> depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
> >>> symbol rpl_lisp_dev_create_fb
> >>> depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
> >>> symbol rpl_rtnl_delete_link
> >>> depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
> >>> symbol ovs_stt_dev_create_fb
> >>> depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
> >>> symbol ovs_stt_xmit
> >>> make[2]: Leaving directory '/home/gvrose/prj/linux-4.20.17'
> >>>
> >>> Could you check that?  Maybe there were changes from 4.20.13 to 4.20.17?
> >>>
> >>> Thanks,
> >>>
> >>> - Greg
> >>>
>  Signed-off-by: Yifeng Sun 
>  ---
> .travis.yml   |  2 +
> NEWS  |  2 +
> acinclude.m4  | 20 -
> datapath/conntrack.c  | 72 -
> .../include/net/netfilter/nf_conntrack_core.h |  6 ++
> .../net/netfilter/nf_conntrack_count.h|  2 +
> datapath/linux/compat/nf_conncount.c  |  6 +-
> datapath/linux/compat/nf_conntrack_core.c | 80 +++
> datapath/linux/compat/nf_conntrack_proto.c|  3 +
> 9 files changed, 186 insertions(+), 7 deletions(-)
> 
>  diff --git a/.travis.yml b/.travis.yml
>  index 32d5f1918..dc7a20b6e 100644
>  --- a/.travis.yml
>  +++ b/.travis.yml
>  @@ -35,6 +35,8 @@ env:
>   - KERNEL=3.16.54 TESTSUITE=1 DPDK=1
>   - KERNEL=3.16.54 DPDK_SHARED=1
>   - KERNEL=3.16.54 DPDK_SHARED=1 OPTS="--enable-shared"
>  +  - KERNEL=4.20.16
>  +  - KERNEL=4.19.29
>   - KERNEL=4.18.20
>   - KERNEL=4.17.19
>   - KERNEL=4.16.18
>  diff --git a/NEWS b/NEWS
>  index 1e4744dbd..af5b5222f 100644
>  --- a/NEWS
>  +++ b/NEWS
>  @@ -25,6 +25,8 @@ Post-v2.11.0
>    - OVN:
>  * Select IPAM mac_prefix in a random manner if not provided by 
>  the user
>    - New QoS type "linux-netem" on Linux.
>  +   - Linux datapath:
>  + * Support for the kernel versions 

Re: [ovs-dev] [PATCH 2/2] datapath: Add support for kernel 4.19.x and 4.20.x

2019-03-29 Thread Gregory Rose



On 3/29/2019 3:16 PM, Yifeng Sun wrote:

Hi Greg, I tried new kernel 4.20.17 on ubuntu 8.10 but everything works fine.
Do you mind telling me what Linux were you using?

Thanks,
Yifeng


It was a  Ubuntu Xenial 16.04 with the custom built 4.20.17 kernel from 
kernel.org.  I'm not sure what difference

that should make though.

- Greg



On Fri, Mar 29, 2019 at 9:21 AM Yifeng Sun  wrote:

Hi Greg, thanks for the review. I will check on it.
Yifeng

On Fri, Mar 29, 2019 at 8:19 AM Gregory Rose  wrote:


On 3/15/2019 7:20 PM, Yifeng Sun wrote:

This patch introduces changes needed by OVS to support latest
Linux kernels (4.19.x and 4.20.x). Recent kernels changed many
APIs used by OVS. One major change is that struct nf_conntrack_l3proto
became unvisible outside of kernel, so the needed get_l4proto
function is added in file compact/nf_conntrack_core.c to
accommodate this issue.

This patch doesn't introduce new failed tests when running
'make check-kmod' for kernels listed below:
  3.10.0-957.5.1.el7.x86_64
  4.4.0-142-generic
  4.17.14
  4.18.0-16-generic
  4.19.26
  4.20.13

Travis passed at
https://travis-ci.org/yifsun/ovs-travis/builds/507034016

Hi Yifeng,

thanks for doing this work!  However, I am seeing an issue when
compiling on 4.20.17 and then installing
the kernel modules:

make -C /lib/modules/4.20.17/build
M=/home/gvrose/prj/ovs-experimental/_build/datapath/linux modules_install
make[2]: Entering directory '/home/gvrose/prj/linux-4.20.17'
INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/openvswitch.ko
INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-geneve.ko
INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-gre.ko
INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-lisp.ko
INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-stt.ko
INSTALL
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-vxlan.ko
DEPMOD  4.20.17
depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
symbol rpl_rtnl_delete_link
depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
symbol rpl_lisp_xmit
depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
symbol rpl_lisp_dev_create_fb
depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
symbol rpl_rtnl_delete_link
depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
symbol ovs_stt_dev_create_fb
depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
symbol ovs_stt_xmit
make[2]: Leaving directory '/home/gvrose/prj/linux-4.20.17'

Could you check that?  Maybe there were changes from 4.20.13 to 4.20.17?

Thanks,

- Greg


Signed-off-by: Yifeng Sun 
---
   .travis.yml   |  2 +
   NEWS  |  2 +
   acinclude.m4  | 20 -
   datapath/conntrack.c  | 72 -
   .../include/net/netfilter/nf_conntrack_core.h |  6 ++
   .../net/netfilter/nf_conntrack_count.h|  2 +
   datapath/linux/compat/nf_conncount.c  |  6 +-
   datapath/linux/compat/nf_conntrack_core.c | 80 +++
   datapath/linux/compat/nf_conntrack_proto.c|  3 +
   9 files changed, 186 insertions(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 32d5f1918..dc7a20b6e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,6 +35,8 @@ env:
 - KERNEL=3.16.54 TESTSUITE=1 DPDK=1
 - KERNEL=3.16.54 DPDK_SHARED=1
 - KERNEL=3.16.54 DPDK_SHARED=1 OPTS="--enable-shared"
+  - KERNEL=4.20.16
+  - KERNEL=4.19.29
 - KERNEL=4.18.20
 - KERNEL=4.17.19
 - KERNEL=4.16.18
diff --git a/NEWS b/NEWS
index 1e4744dbd..af5b5222f 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,8 @@ Post-v2.11.0
  - OVN:
* Select IPAM mac_prefix in a random manner if not provided by the user
  - New QoS type "linux-netem" on Linux.
+   - Linux datapath:
+ * Support for the kernel versions 4.19.x, 4.20.x.

   v2.11.0 - 19 Feb 2019
   -
diff --git a/acinclude.m4 b/acinclude.m4
index 3cd6ea730..7b11b7740 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -151,10 +151,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
   AC_MSG_RESULT([$kversion])

   if test "$version" -ge 4; then
-   if test "$version" = 4 && test "$patchlevel" -le 18; then
+   if test "$version" = 4 && test "$patchlevel" -le 20; then
 : # Linux 4.x
  else
-  AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version 
newer than 4.18.x is not supported (please refer to the FAQ for advice)])
+  AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version 
newer than 4.20.x is not supported (please refer to the FAQ for advice)])
  fi
   elif test "$version" = 3 && test "$patchlevel" -ge 10; then
  : # Linux 3.x
@@ -583,6 +583,22 @@ 

Re: [ovs-dev] [PATCH 2/2] datapath: Add support for kernel 4.19.x and 4.20.x

2019-03-29 Thread Yifeng Sun
Hi Greg, I tried new kernel 4.20.17 on ubuntu 8.10 but everything works fine.
Do you mind telling me what Linux were you using?

Thanks,
Yifeng

On Fri, Mar 29, 2019 at 9:21 AM Yifeng Sun  wrote:
>
> Hi Greg, thanks for the review. I will check on it.
> Yifeng
>
> On Fri, Mar 29, 2019 at 8:19 AM Gregory Rose  wrote:
> >
> >
> > On 3/15/2019 7:20 PM, Yifeng Sun wrote:
> > > This patch introduces changes needed by OVS to support latest
> > > Linux kernels (4.19.x and 4.20.x). Recent kernels changed many
> > > APIs used by OVS. One major change is that struct nf_conntrack_l3proto
> > > became unvisible outside of kernel, so the needed get_l4proto
> > > function is added in file compact/nf_conntrack_core.c to
> > > accommodate this issue.
> > >
> > > This patch doesn't introduce new failed tests when running
> > > 'make check-kmod' for kernels listed below:
> > >  3.10.0-957.5.1.el7.x86_64
> > >  4.4.0-142-generic
> > >  4.17.14
> > >  4.18.0-16-generic
> > >  4.19.26
> > >  4.20.13
> > >
> > > Travis passed at
> > > https://travis-ci.org/yifsun/ovs-travis/builds/507034016
> >
> > Hi Yifeng,
> >
> > thanks for doing this work!  However, I am seeing an issue when
> > compiling on 4.20.17 and then installing
> > the kernel modules:
> >
> > make -C /lib/modules/4.20.17/build
> > M=/home/gvrose/prj/ovs-experimental/_build/datapath/linux modules_install
> > make[2]: Entering directory '/home/gvrose/prj/linux-4.20.17'
> >INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/openvswitch.ko
> >INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-geneve.ko
> >INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-gre.ko
> >INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-lisp.ko
> >INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-stt.ko
> >INSTALL
> > /home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-vxlan.ko
> >DEPMOD  4.20.17
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
> > symbol rpl_rtnl_delete_link
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
> > symbol rpl_lisp_xmit
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown
> > symbol rpl_lisp_dev_create_fb
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
> > symbol rpl_rtnl_delete_link
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
> > symbol ovs_stt_dev_create_fb
> > depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown
> > symbol ovs_stt_xmit
> > make[2]: Leaving directory '/home/gvrose/prj/linux-4.20.17'
> >
> > Could you check that?  Maybe there were changes from 4.20.13 to 4.20.17?
> >
> > Thanks,
> >
> > - Greg
> >
> > >
> > > Signed-off-by: Yifeng Sun 
> > > ---
> > >   .travis.yml   |  2 +
> > >   NEWS  |  2 +
> > >   acinclude.m4  | 20 -
> > >   datapath/conntrack.c  | 72 -
> > >   .../include/net/netfilter/nf_conntrack_core.h |  6 ++
> > >   .../net/netfilter/nf_conntrack_count.h|  2 +
> > >   datapath/linux/compat/nf_conncount.c  |  6 +-
> > >   datapath/linux/compat/nf_conntrack_core.c | 80 +++
> > >   datapath/linux/compat/nf_conntrack_proto.c|  3 +
> > >   9 files changed, 186 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/.travis.yml b/.travis.yml
> > > index 32d5f1918..dc7a20b6e 100644
> > > --- a/.travis.yml
> > > +++ b/.travis.yml
> > > @@ -35,6 +35,8 @@ env:
> > > - KERNEL=3.16.54 TESTSUITE=1 DPDK=1
> > > - KERNEL=3.16.54 DPDK_SHARED=1
> > > - KERNEL=3.16.54 DPDK_SHARED=1 OPTS="--enable-shared"
> > > +  - KERNEL=4.20.16
> > > +  - KERNEL=4.19.29
> > > - KERNEL=4.18.20
> > > - KERNEL=4.17.19
> > > - KERNEL=4.16.18
> > > diff --git a/NEWS b/NEWS
> > > index 1e4744dbd..af5b5222f 100644
> > > --- a/NEWS
> > > +++ b/NEWS
> > > @@ -25,6 +25,8 @@ Post-v2.11.0
> > >  - OVN:
> > >* Select IPAM mac_prefix in a random manner if not provided by the 
> > > user
> > >  - New QoS type "linux-netem" on Linux.
> > > +   - Linux datapath:
> > > + * Support for the kernel versions 4.19.x, 4.20.x.
> > >
> > >   v2.11.0 - 19 Feb 2019
> > >   -
> > > diff --git a/acinclude.m4 b/acinclude.m4
> > > index 3cd6ea730..7b11b7740 100644
> > > --- a/acinclude.m4
> > > +++ b/acinclude.m4
> > > @@ -151,10 +151,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
> > >   AC_MSG_RESULT([$kversion])
> > >
> > >   if test "$version" -ge 4; then
> > > -   if test "$version" = 4 && test "$patchlevel" -le 18; then
> > > +   if test "$version" = 4 && test "$patchlevel" -le 20; then
> > > : # Linux 4.x
> > >  else
> > > -  AC_ERROR([Linux kernel in $KBUILD is version $kversion, but 
> > > 

Re: [ovs-dev] [PATCH 2/2] datapath: Add support for kernel 4.19.x and 4.20.x

2019-03-29 Thread Gregory Rose


On 3/15/2019 7:20 PM, Yifeng Sun wrote:

This patch introduces changes needed by OVS to support latest
Linux kernels (4.19.x and 4.20.x). Recent kernels changed many
APIs used by OVS. One major change is that struct nf_conntrack_l3proto
became unvisible outside of kernel, so the needed get_l4proto
function is added in file compact/nf_conntrack_core.c to
accommodate this issue.

This patch doesn't introduce new failed tests when running
'make check-kmod' for kernels listed below:
 3.10.0-957.5.1.el7.x86_64
 4.4.0-142-generic
 4.17.14
 4.18.0-16-generic
 4.19.26
 4.20.13

Travis passed at
https://travis-ci.org/yifsun/ovs-travis/builds/507034016


Hi Yifeng,

thanks for doing this work!  However, I am seeing an issue when 
compiling on 4.20.17 and then installing

the kernel modules:

make -C /lib/modules/4.20.17/build 
M=/home/gvrose/prj/ovs-experimental/_build/datapath/linux modules_install

make[2]: Entering directory '/home/gvrose/prj/linux-4.20.17'
  INSTALL 
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/openvswitch.ko
  INSTALL 
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-geneve.ko
  INSTALL 
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-gre.ko
  INSTALL 
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-lisp.ko
  INSTALL 
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-stt.ko
  INSTALL 
/home/gvrose/prj/ovs-experimental/_build/datapath/linux/vport-vxlan.ko

  DEPMOD  4.20.17
depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown 
symbol rpl_rtnl_delete_link
depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown 
symbol rpl_lisp_xmit
depmod: WARNING: /lib/modules/4.20.17/extra/vport-lisp.ko needs unknown 
symbol rpl_lisp_dev_create_fb
depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown 
symbol rpl_rtnl_delete_link
depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown 
symbol ovs_stt_dev_create_fb
depmod: WARNING: /lib/modules/4.20.17/extra/vport-stt.ko needs unknown 
symbol ovs_stt_xmit

make[2]: Leaving directory '/home/gvrose/prj/linux-4.20.17'

Could you check that?  Maybe there were changes from 4.20.13 to 4.20.17?

Thanks,

- Greg



Signed-off-by: Yifeng Sun 
---
  .travis.yml   |  2 +
  NEWS  |  2 +
  acinclude.m4  | 20 -
  datapath/conntrack.c  | 72 -
  .../include/net/netfilter/nf_conntrack_core.h |  6 ++
  .../net/netfilter/nf_conntrack_count.h|  2 +
  datapath/linux/compat/nf_conncount.c  |  6 +-
  datapath/linux/compat/nf_conntrack_core.c | 80 +++
  datapath/linux/compat/nf_conntrack_proto.c|  3 +
  9 files changed, 186 insertions(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 32d5f1918..dc7a20b6e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,6 +35,8 @@ env:
- KERNEL=3.16.54 TESTSUITE=1 DPDK=1
- KERNEL=3.16.54 DPDK_SHARED=1
- KERNEL=3.16.54 DPDK_SHARED=1 OPTS="--enable-shared"
+  - KERNEL=4.20.16
+  - KERNEL=4.19.29
- KERNEL=4.18.20
- KERNEL=4.17.19
- KERNEL=4.16.18
diff --git a/NEWS b/NEWS
index 1e4744dbd..af5b5222f 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,8 @@ Post-v2.11.0
 - OVN:
   * Select IPAM mac_prefix in a random manner if not provided by the user
 - New QoS type "linux-netem" on Linux.
+   - Linux datapath:
+ * Support for the kernel versions 4.19.x, 4.20.x.
  
  v2.11.0 - 19 Feb 2019

  -
diff --git a/acinclude.m4 b/acinclude.m4
index 3cd6ea730..7b11b7740 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -151,10 +151,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
  AC_MSG_RESULT([$kversion])
  
  if test "$version" -ge 4; then

-   if test "$version" = 4 && test "$patchlevel" -le 18; then
+   if test "$version" = 4 && test "$patchlevel" -le 20; then
: # Linux 4.x
 else
-  AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version 
newer than 4.18.x is not supported (please refer to the FAQ for advice)])
+  AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version 
newer than 4.20.x is not supported (please refer to the FAQ for advice)])
 fi
  elif test "$version" = 3 && test "$patchlevel" -ge 10; then
 : # Linux 3.x
@@ -583,6 +583,22 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
[OVS_DEFINE([HAVE_VOID_INET_FRAGS_INIT])])
OVS_GREP_IFELSE([$KSRC/include/net/inetpeer.h], [vif],
[OVS_DEFINE([HAVE_INETPEER_VIF_SUPPORT])])
+  OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_helper.h],
+[nf_ct_helper_ext_add], [nf_conntrack_helper],
+[OVS_DEFINE([HAVE_NF_CT_HELPER_EXT_ADD_TAKES_HELPER])])
+  OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_core.h],
+   

[ovs-dev] [PATCH 2/2] datapath: Add support for kernel 4.19.x and 4.20.x

2019-03-15 Thread Yifeng Sun
This patch introduces changes needed by OVS to support latest
Linux kernels (4.19.x and 4.20.x). Recent kernels changed many
APIs used by OVS. One major change is that struct nf_conntrack_l3proto
became unvisible outside of kernel, so the needed get_l4proto
function is added in file compact/nf_conntrack_core.c to
accommodate this issue.

This patch doesn't introduce new failed tests when running
'make check-kmod' for kernels listed below:
3.10.0-957.5.1.el7.x86_64
4.4.0-142-generic
4.17.14
4.18.0-16-generic
4.19.26
4.20.13

Travis passed at
https://travis-ci.org/yifsun/ovs-travis/builds/507034016

Signed-off-by: Yifeng Sun 
---
 .travis.yml   |  2 +
 NEWS  |  2 +
 acinclude.m4  | 20 -
 datapath/conntrack.c  | 72 -
 .../include/net/netfilter/nf_conntrack_core.h |  6 ++
 .../net/netfilter/nf_conntrack_count.h|  2 +
 datapath/linux/compat/nf_conncount.c  |  6 +-
 datapath/linux/compat/nf_conntrack_core.c | 80 +++
 datapath/linux/compat/nf_conntrack_proto.c|  3 +
 9 files changed, 186 insertions(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 32d5f1918..dc7a20b6e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,6 +35,8 @@ env:
   - KERNEL=3.16.54 TESTSUITE=1 DPDK=1
   - KERNEL=3.16.54 DPDK_SHARED=1
   - KERNEL=3.16.54 DPDK_SHARED=1 OPTS="--enable-shared"
+  - KERNEL=4.20.16
+  - KERNEL=4.19.29
   - KERNEL=4.18.20
   - KERNEL=4.17.19
   - KERNEL=4.16.18
diff --git a/NEWS b/NEWS
index 1e4744dbd..af5b5222f 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,8 @@ Post-v2.11.0
- OVN:
  * Select IPAM mac_prefix in a random manner if not provided by the user
- New QoS type "linux-netem" on Linux.
+   - Linux datapath:
+ * Support for the kernel versions 4.19.x, 4.20.x.
 
 v2.11.0 - 19 Feb 2019
 -
diff --git a/acinclude.m4 b/acinclude.m4
index 3cd6ea730..7b11b7740 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -151,10 +151,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
 AC_MSG_RESULT([$kversion])
 
 if test "$version" -ge 4; then
-   if test "$version" = 4 && test "$patchlevel" -le 18; then
+   if test "$version" = 4 && test "$patchlevel" -le 20; then
   : # Linux 4.x
else
-  AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version 
newer than 4.18.x is not supported (please refer to the FAQ for advice)])
+  AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version 
newer than 4.20.x is not supported (please refer to the FAQ for advice)])
fi
 elif test "$version" = 3 && test "$patchlevel" -ge 10; then
: # Linux 3.x
@@ -583,6 +583,22 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   [OVS_DEFINE([HAVE_VOID_INET_FRAGS_INIT])])
   OVS_GREP_IFELSE([$KSRC/include/net/inetpeer.h], [vif],
   [OVS_DEFINE([HAVE_INETPEER_VIF_SUPPORT])])
+  OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_helper.h],
+[nf_ct_helper_ext_add], [nf_conntrack_helper],
+[OVS_DEFINE([HAVE_NF_CT_HELPER_EXT_ADD_TAKES_HELPER])])
+  OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_core.h],
+[nf_ct_invert_tuple], [l3proto],
+[OVS_DEFINE([HAVE_NF_CT_INVERT_TUPLE_TAKES_L3PROTO])])
+  OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_core.h], 
[nf_ct_get_tuple],
+  [OVS_DEFINE([HAVE_NF_CT_GET_TUPLE])])
+  OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_core.h],
+[nf_conntrack_in], [net],
+[OVS_DEFINE([HAVE_NF_CONNTRACK_IN_TAKES_NET])])
+  OVS_GREP_IFELSE([$KSRC/include/net/ipv6_frag.h], [IP6_DEFRAG_CONNTRACK_IN],
+  [OVS_DEFINE([HAVE_IPV6_FRAG_H])])
+  OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/nf_conntrack_l4proto.h],
+[__nf_ct_l4proto_find], [l3proto],
+[OVS_DEFINE([HAVE_NF_CT_L4PROTO_FIND_TAKES_L3PROTO])])
 
   dnl Check for dst_cache and ipv6 lable to use backported tunnel 
infrastructure.
   dnl OVS does not really need ipv6 label field, but its presence signifies 
that
diff --git a/datapath/conntrack.c b/datapath/conntrack.c
index a7dc9e0c3..b9b79e2cc 100644
--- a/datapath/conntrack.c
+++ b/datapath/conntrack.c
@@ -38,6 +38,10 @@
 #include 
 #endif
 
+#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) && defined(HAVE_IPV6_FRAG_H)
+#include 
+#endif
+
 #include "datapath.h"
 #include "conntrack.h"
 #include "flow.h"
@@ -645,32 +649,62 @@ static struct nf_conn *
 ovs_ct_find_existing(struct net *net, const struct nf_conntrack_zone *zone,
 u8 l3num, struct sk_buff *skb, bool natted)
 {
-   const struct nf_conntrack_l3proto *l3proto;
const struct nf_conntrack_l4proto *l4proto;
struct