diff mbox

[ovs-dev,2/4] acinclude.m4: Add check for struct net parameter

Message ID 1493323737-9621-3-git-send-email-gvrose8192@gmail.com
State Superseded
Headers show

Commit Message

Gregory Rose April 27, 2017, 8:08 p.m. UTC
The net parameter was added to nf_defrag_ipv6_enable in linux 4.10

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
---
 acinclude.m4 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Andy Zhou April 27, 2017, 9:05 p.m. UTC | #1
On Thu, Apr 27, 2017 at 1:08 PM, Greg Rose <gvrose8192@gmail.com> wrote:
> The net parameter was added to nf_defrag_ipv6_enable in linux 4.10
>
> Signed-off-by: Greg Rose <gvrose8192@gmail.com>

Thanks for working on this!

It seems odd that we only detect the signatures of a ipv6 function,
then apply it for ipv4l.
In practice, they are both introduced in 4.10, and will probably be
back ported together.
So it may be O.K.  On the other hand, the cost of adding another
#define seems small.

> ---
>  acinclude.m4 | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index 0d6647e..8653a30 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -703,7 +703,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
>    OVS_FIND_PARAM_IFELSE([$KSRC/include/net/protocol.h],
>                          [udp_add_offload], [net],
>                          [OVS_DEFINE([HAVE_UDP_ADD_OFFLOAD_TAKES_NET])])
> -
> +  OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/ipv6/nf_defrag_ipv6.h],
> +                        [nf_defrag_ipv6_enable], [net],
> +                        [OVS_DEFINE([HAVE_DEFRAG_ENABLE_TAKES_NET])])
>
>    if cmp -s datapath/linux/kcompat.h.new \
>              datapath/linux/kcompat.h >/dev/null 2>&1; then
> --
> 1.8.3.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Gregory Rose April 27, 2017, 9:11 p.m. UTC | #2
On Thu, 2017-04-27 at 14:05 -0700, Andy Zhou wrote:
> On Thu, Apr 27, 2017 at 1:08 PM, Greg Rose <gvrose8192@gmail.com> wrote:
> > The net parameter was added to nf_defrag_ipv6_enable in linux 4.10
> >
> > Signed-off-by: Greg Rose <gvrose8192@gmail.com>
> 
> Thanks for working on this!
> 
> It seems odd that we only detect the signatures of a ipv6 function,
> then apply it for ipv4l.

The common attribute between them is that they're both frag init
functions and would need to go together by my understanding.

> In practice, they are both introduced in 4.10, and will probably be
> back ported together.

I think so.

> So it may be O.K.  On the other hand, the cost of adding another
> #define seems small.

I'll go with consensus opinion... if others agree then I'll re-spin the
patches to do so.

Thanks for the review!

- Greg

> 
> > ---
> >  acinclude.m4 | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/acinclude.m4 b/acinclude.m4
> > index 0d6647e..8653a30 100644
> > --- a/acinclude.m4
> > +++ b/acinclude.m4
> > @@ -703,7 +703,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
> >    OVS_FIND_PARAM_IFELSE([$KSRC/include/net/protocol.h],
> >                          [udp_add_offload], [net],
> >                          [OVS_DEFINE([HAVE_UDP_ADD_OFFLOAD_TAKES_NET])])
> > -
> > +  OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/ipv6/nf_defrag_ipv6.h],
> > +                        [nf_defrag_ipv6_enable], [net],
> > +                        [OVS_DEFINE([HAVE_DEFRAG_ENABLE_TAKES_NET])])
> >
> >    if cmp -s datapath/linux/kcompat.h.new \
> >              datapath/linux/kcompat.h >/dev/null 2>&1; then
> > --
> > 1.8.3.1
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Joe Stringer April 28, 2017, 9:20 p.m. UTC | #3
On 27 April 2017 at 14:05, Andy Zhou <azhou@ovn.org> wrote:
> On Thu, Apr 27, 2017 at 1:08 PM, Greg Rose <gvrose8192@gmail.com> wrote:
>> The net parameter was added to nf_defrag_ipv6_enable in linux 4.10
>>
>> Signed-off-by: Greg Rose <gvrose8192@gmail.com>
>
> Thanks for working on this!
>
> It seems odd that we only detect the signatures of a ipv6 function,
> then apply it for ipv4l.
> In practice, they are both introduced in 4.10, and will probably be
> back ported together.
> So it may be O.K.  On the other hand, the cost of adding another
> #define seems small.

The patch that made this change upstream introduced the change to both
the v4 and v6 versions of this function, so this seems fine to me.
It's unlikely to end up being split.
diff mbox

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index 0d6647e..8653a30 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -703,7 +703,9 @@  AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_FIND_PARAM_IFELSE([$KSRC/include/net/protocol.h],
                         [udp_add_offload], [net],
                         [OVS_DEFINE([HAVE_UDP_ADD_OFFLOAD_TAKES_NET])])
-
+  OVS_FIND_PARAM_IFELSE([$KSRC/include/net/netfilter/ipv6/nf_defrag_ipv6.h],
+                        [nf_defrag_ipv6_enable], [net],
+                        [OVS_DEFINE([HAVE_DEFRAG_ENABLE_TAKES_NET])])
 
   if cmp -s datapath/linux/kcompat.h.new \
             datapath/linux/kcompat.h >/dev/null 2>&1; then