diff mbox series

[ovs-dev,6/7] netfilter: Remove useless param helper of nf_ct_helper_ext_add

Message ID 1557179808-27283-7-git-send-email-pkusunyifeng@gmail.com
State Superseded
Headers show
Series datapath: Support 4.19.x and 4.20.x kernel | expand

Commit Message

Yifeng Sun May 6, 2019, 9:56 p.m. UTC
From: Gao Feng <gfree.wind@vip.163.com>

Upstream commit:
    commit 440534d3c56be04abfb26850ee882d19d223557a
    Author: Gao Feng <gfree.wind@vip.163.com>
    Date:   Mon Jul 9 18:06:33 2018 +0800

    netfilter: Remove useless param helper of nf_ct_helper_ext_add
    
    The param helper of nf_ct_helper_ext_add is useless now, then remove
    it now.
    
    Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

This patch backports the above upstream patch to OVS.

Cc: Gao Feng <gfree.wind@vip.163.com>
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
---
 acinclude.m4                                                 |  3 +++
 .../linux/compat/include/net/netfilter/nf_conntrack_helper.h | 12 ++++++++++++
 2 files changed, 15 insertions(+)

Comments

Gao Feng May 8, 2019, 1:33 a.m. UTC | #1
At 2019-05-07 05:56:47, "Yifeng Sun" <pkusunyifeng@gmail.com> wrote:
>From: Gao Feng <gfree.wind@vip.163.com>
>
>Upstream commit:
>    commit 440534d3c56be04abfb26850ee882d19d223557a
>    Author: Gao Feng <gfree.wind@vip.163.com>
>    Date:   Mon Jul 9 18:06:33 2018 +0800
>
>    netfilter: Remove useless param helper of nf_ct_helper_ext_add
>    
>    The param helper of nf_ct_helper_ext_add is useless now, then remove
>    it now.
>    
>    Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
>    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
>
>This patch backports the above upstream patch to OVS.
>
>Cc: Gao Feng <gfree.wind@vip.163.com>
>Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
>---
> acinclude.m4                                                 |  3 +++
> .../linux/compat/include/net/netfilter/nf_conntrack_helper.h | 12 ++++++++++++
> 2 files changed, 15 insertions(+)
>
>diff --git a/acinclude.m4 b/acinclude.m4
>index 4c533bb98949..91e07d871f58 100644
>--- a/acinclude.m4
>+++ b/acinclude.m4
>@@ -938,6 +938,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
>                   [OVS_DEFINE([HAVE_IPV6_FRAG_H])])
>   OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack.h],
>                   [nf_ct_invert_tuplepr])
>+  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])])
> 
>   if cmp -s datapath/linux/kcompat.h.new \
>             datapath/linux/kcompat.h >/dev/null 2>&1; then
>diff --git a/datapath/linux/compat/include/net/netfilter/nf_conntrack_helper.h b/datapath/linux/compat/include/net/netfilter/nf_conntrack_helper.h
>index 19c35cd95f6f..0b685cc1a05a 100644
>--- a/datapath/linux/compat/include/net/netfilter/nf_conntrack_helper.h
>+++ b/datapath/linux/compat/include/net/netfilter/nf_conntrack_helper.h
>@@ -9,4 +9,16 @@ static inline void nf_conntrack_helper_put(struct nf_conntrack_helper *helper) {
> }
> #endif
> 
>+static inline struct nf_conn_help *
>+rpl_nf_ct_helper_ext_add(struct nf_conn *ct,
>+			 struct nf_conntrack_helper *helper, gfp_t gfp)
>+{
>+#ifdef HAVE_NF_CT_HELPER_EXT_ADD_TAKES_HELPER
>+	return nf_ct_helper_ext_add(ct, helper, gfp);
>+#else
>+	return nf_ct_helper_ext_add(ct, gfp);
>+#endif
>+}
>+#define nf_ct_helper_ext_add rpl_nf_ct_helper_ext_add
>+
> #endif /* _NF_CONNTRACK_HELPER_WRAPPER_H */
>-- 
>2.7.4
>

Good for me.

Best Regards
Feng
Yi-Hung Wei May 8, 2019, 9:25 p.m. UTC | #2
On Tue, May 7, 2019 at 6:39 PM Gao Feng <gfree.wind@vip.163.com> wrote:
>
>
> At 2019-05-07 05:56:47, "Yifeng Sun" <pkusunyifeng@gmail.com> wrote:
> >From: Gao Feng <gfree.wind@vip.163.com>
> >
> >Upstream commit:
> >    commit 440534d3c56be04abfb26850ee882d19d223557a
> >    Author: Gao Feng <gfree.wind@vip.163.com>
> >    Date:   Mon Jul 9 18:06:33 2018 +0800
> >
> >    netfilter: Remove useless param helper of nf_ct_helper_ext_add
> >
> >    The param helper of nf_ct_helper_ext_add is useless now, then remove
> >    it now.
> >
> >    Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
> >    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> >
> >This patch backports the above upstream patch to OVS.
> >
> >Cc: Gao Feng <gfree.wind@vip.163.com>
> >Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
> >---
> >
>
> Good for me.
>
> Best Regards
> Feng

Thanks for the patch.

Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
diff mbox series

Patch

diff --git a/acinclude.m4 b/acinclude.m4
index 4c533bb98949..91e07d871f58 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -938,6 +938,9 @@  AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
                   [OVS_DEFINE([HAVE_IPV6_FRAG_H])])
   OVS_GREP_IFELSE([$KSRC/include/net/netfilter/nf_conntrack.h],
                   [nf_ct_invert_tuplepr])
+  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])])
 
   if cmp -s datapath/linux/kcompat.h.new \
             datapath/linux/kcompat.h >/dev/null 2>&1; then
diff --git a/datapath/linux/compat/include/net/netfilter/nf_conntrack_helper.h b/datapath/linux/compat/include/net/netfilter/nf_conntrack_helper.h
index 19c35cd95f6f..0b685cc1a05a 100644
--- a/datapath/linux/compat/include/net/netfilter/nf_conntrack_helper.h
+++ b/datapath/linux/compat/include/net/netfilter/nf_conntrack_helper.h
@@ -9,4 +9,16 @@  static inline void nf_conntrack_helper_put(struct nf_conntrack_helper *helper) {
 }
 #endif
 
+static inline struct nf_conn_help *
+rpl_nf_ct_helper_ext_add(struct nf_conn *ct,
+			 struct nf_conntrack_helper *helper, gfp_t gfp)
+{
+#ifdef HAVE_NF_CT_HELPER_EXT_ADD_TAKES_HELPER
+	return nf_ct_helper_ext_add(ct, helper, gfp);
+#else
+	return nf_ct_helper_ext_add(ct, gfp);
+#endif
+}
+#define nf_ct_helper_ext_add rpl_nf_ct_helper_ext_add
+
 #endif /* _NF_CONNTRACK_HELPER_WRAPPER_H */