From patchwork Thu Nov 12 23:10:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1399451 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.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.a=rsa-sha256 header.s=20161025 header.b=k0aDSor1; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CXHQP6rD2z9sTK for ; Fri, 13 Nov 2020 10:10:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7B9D487378; Thu, 12 Nov 2020 23:10:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 52I4AS47SgbC; Thu, 12 Nov 2020 23:10:51 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 331468738D; Thu, 12 Nov 2020 23:10:51 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0968BC163C; Thu, 12 Nov 2020 23:10:51 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 47A95C0FAA for ; Thu, 12 Nov 2020 23:10:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7A103203D0 for ; Thu, 12 Nov 2020 23:10:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TPMnBFR9vTAQ for ; Thu, 12 Nov 2020 23:10:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by silver.osuosl.org (Postfix) with ESMTPS id 3FD132041A for ; Thu, 12 Nov 2020 23:10:46 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id u2so3587973pls.10 for ; Thu, 12 Nov 2020 15:10:46 -0800 (PST) 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=4c/L4Uuy4kL2dupQN4ynoPRDm6go8Yg82NMOPRX39Rc=; b=k0aDSor15OWnDAdxxE4LBirgfgLh8qanSpxQNYiKFvMsgIFW3u7us2DghMseQGGRdx t06dZWhgFs/nwFR9WCwqVIpy0Y9LnTdcyPmVoSJw2NA/nx2FQj+DOqSmabn7Q6/2Z+Hf G+otRR+mvvFR7M77iJhGLR+VZGD5DqnJhjNrJ3lg4HPn+MqS5JmQwM84JDknmvzfn6It AOktrek4IG25P7HGi1mecBOdTz2IYOKRhA3Jp++9P++VzJyKJlLqsKvmy5aKhYhg/ueU 78DSizi8QdDFC6URMNd6HcmDF3R520lkjuaPicr76Cf+3JJyvTZ37rRoqe+UvxyByBhM 1oSQ== 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=4c/L4Uuy4kL2dupQN4ynoPRDm6go8Yg82NMOPRX39Rc=; b=Z/MEfeNA+4ePRRHSKuC4QUBY/UiE5TpQVM9jf03MiuroV16pqaHJKmmtt0pPa4d63T ObEeEDt63PJcJnK6as6QRSy7h6TaXberaJytksqMaRJi4IgRZ+kFydTLi7w05YVEV361 HodvD05JtjWZ/0hmE8uFCvV4r6f7niGojodLYVMmwHbka66pd856Ct4Oz4LzKfFgwYyS X+QKJqfEGUP/9cF/fYFdguKADZzQlOpjyzxDHw/8lj+t4zijiIS+iHtYNH7GnW22K/T+ FzRq0DEcWJvzJxdWIjBt1tc/gXxIXvPepktPiiSLyAUu6S5m7dPf6pcbRFoCMb1S9QJa u/og== X-Gm-Message-State: AOAM530A1MJLYzzJSSxPKGxJvUjAepoCnFsqkp0SRz2ahbtBqTSMWUj2 gzt/bZ9/TDgZnvnDbRbQHb9TwuVc027q6w== X-Google-Smtp-Source: ABdhPJySSZmfQDmM4akZsywz013/9FiC49fUNIV3g8ijoN+FOgtjo5v7lzJTwEZl6fReTi07pLLzWg== X-Received: by 2002:a17:902:a9c9:b029:d6:2d8f:f7b4 with SMTP id b9-20020a170902a9c9b02900d62d8ff7b4mr1485549plr.2.1605222645594; Thu, 12 Nov 2020 15:10:45 -0800 (PST) Received: from VMware-box.domain (97-115-80-55.ptld.qwest.net. [97.115.80.55]) by smtp.googlemail.com with ESMTPSA id a81sm7495425pfd.178.2020.11.12.15.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 15:10:45 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Thu, 12 Nov 2020 15:10:39 -0800 Message-Id: <20201112231039.1973-4-gvrose8192@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201112231039.1973-1-gvrose8192@gmail.com> References: <20201112231039.1973-1-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 3/3] compat: Fix compile warning X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" In ../compat/nf_conntrack_reasm.c nf_frags_cache_name is declared if OVS_NF_DEFRAG6_BACKPORT is defined. However, later in the patch it is only used if HAVE_INET_FRAGS_WITH_FRAGS_WORK is defined and HAVE_INET_FRAGS_RND is not defined. This will cause a compile warning about unused variables. Fix it up by using the same defines that enable its use to decide if it should be declared and avoid the compiler warning. Fixes: 4a90b277baca ("compat: Fixup ipv6 fragmentation on 4.9.135+ kernels") Signed-off-by: Greg Rose Acked-by: Yi-Hung Wei --- V2 No change --- datapath/linux/compat/nf_conntrack_reasm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/datapath/linux/compat/nf_conntrack_reasm.c b/datapath/linux/compat/nf_conntrack_reasm.c index ced9fba98..77b4b2548 100644 --- a/datapath/linux/compat/nf_conntrack_reasm.c +++ b/datapath/linux/compat/nf_conntrack_reasm.c @@ -57,10 +57,13 @@ #include #include "datapath.h" -#ifdef OVS_NF_DEFRAG6_BACKPORT +#if defined(HAVE_INET_FRAGS_WITH_FRAGS_WORK) || !defined(HAVE_INET_FRAGS_RND) static const char nf_frags_cache_name[] = "ovs-frag6"; +#endif + +#ifdef OVS_NF_DEFRAG6_BACKPORT struct nf_ct_frag6_skb_cb { struct inet6_skb_parm h;