From patchwork Thu Apr 27 01:12:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Stringer X-Patchwork-Id: 755713 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wCzTJ1c8Hz9s4s for ; Thu, 27 Apr 2017 11:12:52 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 434D2978; Thu, 27 Apr 2017 01:12:50 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 44F8B94B for ; Thu, 27 Apr 2017 01:12:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7C1C81B3 for ; Thu, 27 Apr 2017 01:12:47 +0000 (UTC) Received: from mfilter10-d.gandi.net (mfilter10-d.gandi.net [217.70.178.139]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id EBDB91720B3 for ; Thu, 27 Apr 2017 03:12:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter10-d.gandi.net Received: from relay4-d.mail.gandi.net ([IPv6:::ffff:217.70.183.196]) by mfilter10-d.gandi.net (mfilter10-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id on3p8tQQNJ-e for ; Thu, 27 Apr 2017 03:12:44 +0200 (CEST) X-Originating-IP: 209.85.220.170 Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) (Authenticated sender: joe@ovn.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 6BC801720A1 for ; Thu, 27 Apr 2017 03:12:44 +0200 (CEST) Received: by mail-qk0-f170.google.com with SMTP id h123so15910841qke.0 for ; Wed, 26 Apr 2017 18:12:44 -0700 (PDT) X-Gm-Message-State: AN3rC/7wuygeJ2qwZaqUUJUHwxxHZK2iIxUYIa625otgTIR/lkN1ETGQ npmYtyWlptwu8D2YbTm6OB+hZ+oqsA== X-Received: by 10.55.161.68 with SMTP id k65mr2462440qke.148.1493255563318; Wed, 26 Apr 2017 18:12:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.169.155 with HTTP; Wed, 26 Apr 2017 18:12:22 -0700 (PDT) In-Reply-To: <1493139640.17866.26.camel@gmail.com> References: <20170425152656.15328-1-ligs@dtdream.com> <1493139640.17866.26.camel@gmail.com> From: Joe Stringer Date: Wed, 26 Apr 2017 18:12:22 -0700 X-Gmail-Original-Message-ID: Message-ID: To: Greg Rose , Guoshuai Li , ray@oneunified.net X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: ovs-dev Subject: Re: [ovs-dev] [PATCH] compat: Fix build error in kernel 4.10.0 X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org On 25 April 2017 at 10:00, Greg Rose wrote: > On Tue, 2017-04-25 at 23:26 +0800, Guoshuai Li wrote: >> In kernel 4.10.0, the function "nf_defrag_ipv6_enable" need >> parameters "struct net *", so we need call it for each namespace init >> to load netfilter fragment kmod. >> >> Reported-by: Raymond Burkholder >> Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/331411.html >> Signed-off-by: Guoshuai Li > > Compile tested and looks OK to me. > > Reviewed-by: Greg Rose Thanks all, I'm considering rolling the following incremental into this patch, does this make sense? dev mailing list dev@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev diff --git a/datapath/linux/compat/ip_fragment.c b/datapath/linux/compat/ip_fragment.c index efa86fcfae1b..de08f6c6744e 100644 --- a/datapath/linux/compat/ip_fragment.c +++ b/datapath/linux/compat/ip_fragment.c @@ -732,9 +732,7 @@ int rpl_ip_defrag(struct net *net, struct sk_buff *skb, u32 user) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0) static int __net_init ipv4_frags_init_net(struct net *net) { - nf_defrag_ipv4_enable(net); - - return 0; + return nf_defrag_ipv4_enable(net); } #endif diff --git a/datapath/linux/compat/nf_conntrack_reasm.c b/datapath/linux/compat/nf_conntrack_reasm.c index cb6da6c64e05..5832fead800e 100644 --- a/datapath/linux/compat/nf_conntrack_reasm.c +++ b/datapath/linux/compat/nf_conntrack_reasm.c @@ -561,9 +561,7 @@ out_unlock: #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0) static int nf_ct_net_init(struct net *net) { - nf_defrag_ipv6_enable(net); - - return 0; + return nf_defrag_ipv6_enable(net); } #endif _______________________________________________