From patchwork Fri May 10 19:30:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yifeng Sun X-Patchwork-Id: 1098306 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="pScwQ4/y"; 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 4510jK5crFz9s3q for ; Sat, 11 May 2019 05:32:37 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 3A648EA4; Fri, 10 May 2019 19:30:27 +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 CAE8CE84 for ; Fri, 10 May 2019 19:30: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 7BC831FB for ; Fri, 10 May 2019 19:30:24 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id y3so3281007plp.0 for ; Fri, 10 May 2019 12:30:24 -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=pScwQ4/yizOTj8z90s0IRxGZFwG9cLi5VD/u9DNSxykolGhszoZPp38eMoq7vbQcUd u6gSMRPZExi1ZqVRweM6ZWohARS+cGSwMLKNgyxS0MO3/PhrMu6FQ4Qx9R9n/cL0KXgI 742o9FHbt5fYEzyRL4UBqJ3sIxi0z2dGrSyeOTK6XRFYjT8pxEuSg6WFhhO+cNzrmD/j comIPMQ3nRLOSJ1QgLr+NoIO0OTfg9V4JgK9JZWSwTJEWrKjdZ9QmOxUV681gS3K6pQ6 7c7CH/UdbeBij4rGJ4S1k8BPFuU3EHv7jftMV+A2A/1oDim8X/y1wNIGpak70r2gXcrW w4dg== 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=sQ5Fsb7FhtMT/2ZTJLltgM1+/WhiECzan1xWgCMUAiXh88mmxOuXJdOXvwfgav1OoR GuhxxWbO3LsPhbwAd6vGrKf93J1BV9VrVPNlB5bxOyLoZRcDBRlotP+YpLax2emTovgy T054TcoAu/bfWes1Hy3rGG7VooWXDaOzRX1ejbP9jJEpB5zNkPYN/ymsbwmU1JgcsCa4 Bq9a9v9M6s0uLbpSrNWV/2703LKeXmt/Wa2YXsuxBDsx4ANncwlKPelrs8gDyTilgPXD rndNSKCscSwSSdE5fL66hmKDI1ydc8B2pH0alnajQ6CwCs87BJkDS4kHiq0lmo3NOAJe BT/A== X-Gm-Message-State: APjAAAVitLynMgD5woI2XMxBteIfcz50nlXALw2UvMVzpxRBBFY+PpFC XnQOH9+7Kw1ubVICTUCKlvppM+KQ X-Google-Smtp-Source: APXvYqy90sve7XQpS8OS+G94lB8j1JWAEgYCEoYDPZVKIPPXvuRAnmXrXShPO3EOAdSxzh85slsHaQ== X-Received: by 2002:a17:902:e407:: with SMTP id ci7mr15162621plb.219.1557516623909; Fri, 10 May 2019 12:30:23 -0700 (PDT) Received: from kern417.eng.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id h13sm6423301pgk.55.2019.05.10.12.30.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 May 2019 12:30:23 -0700 (PDT) From: Yifeng Sun To: dev@openvswitch.org Date: Fri, 10 May 2019 12:30:11 -0700 Message-Id: <1557516614-12563-5-git-send-email-pkusunyifeng@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557516614-12563-1-git-send-email-pkusunyifeng@gmail.com> References: <1557516614-12563-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 v3] 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 */