From patchwork Fri May 10 19:22:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yifeng Sun X-Patchwork-Id: 1098292 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gtOrDeuq"; dkim-atps=neutral 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 4510W54HJ2z9s3Z for ; Sat, 11 May 2019 05:23:45 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id D7120DD6; Fri, 10 May 2019 19:22:26 +0000 (UTC) X-Original-To: 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 59943DC8 for ; Fri, 10 May 2019 19:22:24 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 05D031FB for ; Fri, 10 May 2019 19:22:23 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id bi2so3247066plb.13 for ; Fri, 10 May 2019 12:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gRA1IupYih5I6Iy98YhOJ7t0fZxf4Ce8Dv1dRD1RCnA=; b=gtOrDeuqzEngK7Kt6YDwj+G7U3LWQBFCJrEhGhfS9wBidt66G/I4miQe9KcJH6H5g7 y8nQNhSCLu4j8TIe0fw8t1d1D5RqtY578KOYJG41uCy9CYIgWne7+WVaNgKwAJH+T+I8 c+JGMtjAlOKt9kb/izFVQqPU3p9CxmnaBSfmwSXXqDxWwAGcZzdYStcoKkNBClpY41UO eXSUX8uUJPJMFEKmGCelBUQlnsY4s845qfMIzCBEVDUNgO5fKsp1LRsj+lrTFRbdkxZx IYY2eIr+n5o6KMHOFaOg5lqPVX7+OnaH+wuJV41xbjZG7tuxZ6N8FlHBOJuIyhIVH2R9 36dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gRA1IupYih5I6Iy98YhOJ7t0fZxf4Ce8Dv1dRD1RCnA=; b=Psbu/Iv3Uq2Z39BX1rEs+D+zpDscAddm5F2Rh6yKC3TnVfpZRoveW8cJyCiiDGjDcL QIa3QiSwaRgzSuKKZ4yMMZ8pvIF1gnATBs4uDIyxEebwvyrRePzce7s9OBgq3ZzNrze/ 6tx34cs7aKh4N7/rPM025fEhxsTFuTwckgFYKTTJq0LCILYKAgyLkcuBB4NVgskE67XK i0ZahsUQ8qAXCIRUvHaZzRf1dTwl+gtp1RRB2WAqDoS8jF7GnGbnttlhhnZW35GCRGCW RikkvrRW4YhQth68Y/IDMT1b8JVhe2gD7BVMHHL8GVTvmAc6XDyTKZWzKO5jamOuJpXu BuGQ== X-Gm-Message-State: APjAAAXUI83NaOY88AlemK/hzowwJTtaFCMnl6JRa8W5w2vmF/DUxKRe p3jiATILRhSYTll6NfJR6uvyzPJZ X-Google-Smtp-Source: APXvYqx/PhU8nn92zCl5cDwpz1J2SNe41lKt5nnYA6M5j3eR7H/AYYsAL7/UYlE/2eN3mAcRkyvlrw== X-Received: by 2002:a17:902:9a4a:: with SMTP id x10mr15169275plv.113.1557516143417; Fri, 10 May 2019 12:22:23 -0700 (PDT) Received: from kern417.eng.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id b9sm6749922pgj.94.2019.05.10.12.22.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 May 2019 12:22:22 -0700 (PDT) From: Yifeng Sun To: dev@openvswitch.org Date: Fri, 10 May 2019 12:22:13 -0700 Message-Id: <1557516134-12447-3-git-send-email-pkusunyifeng@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557516134-12447-1-git-send-email-pkusunyifeng@gmail.com> References: <1557516134-12447-1-git-send-email-pkusunyifeng@gmail.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 4/7 v2] datapath: Fix conntrack_count related compilation errors 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: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org This patch fixes the compilation errors of OVS on 4.19+ kernels. Signed-off-by: Yifeng Sun Acked-by: Yi-Hung Wei --- datapath/linux/compat/include/net/netfilter/nf_conntrack_count.h | 4 ++-- datapath/linux/compat/nf_conncount.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/datapath/linux/compat/include/net/netfilter/nf_conntrack_count.h b/datapath/linux/compat/include/net/netfilter/nf_conntrack_count.h index fd536f3e1854..614017309efe 100644 --- a/datapath/linux/compat/include/net/netfilter/nf_conntrack_count.h +++ b/datapath/linux/compat/include/net/netfilter/nf_conntrack_count.h @@ -2,6 +2,8 @@ #define _NF_CONNTRACK_COUNT_WRAPPER_H #include +#include +#include #ifdef HAVE_UPSTREAM_NF_CONNCOUNT #include_next @@ -16,8 +18,6 @@ static inline void rpl_nf_conncount_modexit(void) } #else -#include -#include #define CONFIG_NETFILTER_CONNCOUNT 1 struct nf_conncount_data; diff --git a/datapath/linux/compat/nf_conncount.c b/datapath/linux/compat/nf_conncount.c index 0bee96274b00..eeae440f872d 100644 --- a/datapath/linux/compat/nf_conncount.c +++ b/datapath/linux/compat/nf_conncount.c @@ -13,6 +13,8 @@ * only ignore TIME_WAIT or gone connections * (C) CC Computer Consultants GmbH, 2007 */ +#ifndef HAVE_UPSTREAM_NF_CONNCOUNT + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include #include @@ -138,7 +140,7 @@ static bool conn_free(struct nf_conncount_list *list, if (list->count == 0) { spin_unlock(&list->list_lock); - return free_entry; + return free_entry; } list->count--; @@ -635,3 +637,5 @@ void rpl_nf_conncount_modexit(void) kmem_cache_destroy(conncount_conn_cachep); kmem_cache_destroy(conncount_rb_cachep); } + +#endif /* HAVE_UPSTREAM_NF_CONNCOUNT */