From patchwork Wed Nov 27 20:30:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180338 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6649907ilf; Wed, 27 Nov 2019 13:03:43 -0800 (PST) X-Google-Smtp-Source: APXvYqw4ECIWKkKnGHJKCFAMH0tqjJCemzhasKxc4sSs7373YmrF6IsaOWzVPHmKrY3jtXEGFsEA X-Received: by 2002:a7b:c10c:: with SMTP id w12mr6532442wmi.114.1574888623567; Wed, 27 Nov 2019 13:03:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888623; cv=none; d=google.com; s=arc-20160816; b=cW9kkHfbND6jic9Kog8EdEOVoPdRK5BQnZtOMc6xtBNuaYa91UKdU2RFqnLSz4C0dv BgJKGqGJcW+uaonFmSFuke7VPDucEHaPXH5DSeveuZc2ofN7bhdvqJrwwuJNSPO+W2qd N0W2OLnJRBt7KKbWrbXd3y+sB/qF0fafygCZdL5P/NGv1bEqwsyxvL1T19nZWMJTeQvf N0SU3J7n42W+ETVmKYJ2TR625nytdwLDk7zW425hxf2eGl0vcFOZwyqBK7M+IacXmLSC EyjO+Nw4iF4rr16gf8to8Lzsu0AGfMnh2HZKFCHoqzTFZAO1n4QB9eO2mc5+0mL+fzZo 1EBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gaTR9CsJDVP8VLdRCG2F6SHKtz2MuPQde36wj2YWsrI=; b=bUbQXz+IUPW3qZL9gNwL9ftDDlycMNdglS7Cr1/X1Vn1xZzvdyU65jP6rxLBRpe6tt o3FvV7ZAc2oux9RV6pUBioCabiZSqLuo82cPmmbpk7nFZq2pRq8PF1n7k4xrRcWMfTce 1FUjOlTxbGS2yGfX6qsjpvqp42gbYS8RmtFaWlNK7wzOMFYe9qiKmqz+ImVffRULuhOq u+OsxEUjLMoRKI34tACtUzkKX9ELwzGUgywbCDyWDCj97mg2Lmfvd9Re2uCKaiicXLXT VQTBuFoVsPwbBbDLcVqj1dBl7sUQ2MFQHko+lZkJW7DL95m6ROiIvVy+s25usKLV+lK7 CJNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LAFR1FyI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dd6si1087018edb.186.2019.11.27.13.03.43; Wed, 27 Nov 2019 13:03:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LAFR1FyI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732063AbfK0VDl (ORCPT + 26 others); Wed, 27 Nov 2019 16:03:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:56784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732049AbfK0VDd (ORCPT ); Wed, 27 Nov 2019 16:03:33 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6FCBA2176D; Wed, 27 Nov 2019 21:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888612; bh=KG7jFFleSrAXnKXJdxb/7eBupZkKjYHi6r78Y7FcSD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LAFR1FyI24ayXK2G5VsI4a0qXsJtgK7AwkO/KBZtu7YgL2l407m2lZRkzsz+w4lT8 Gz2m0G5Ae8i+9U6K+rfP3/hPJ6hr3Y2OSlukT5FVfaL+eDTYpuB5iwRPqWsUHOuPrI i7kDy1DQjJG6KBSjZlQPbVI6yJVsUATVrU2gRWdQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 203/306] openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS Date: Wed, 27 Nov 2019 21:30:53 +0100 Message-Id: <20191127203129.984214265@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit a277d516de5f498c91d91189717ef7e01102ad27 ] When CONFIG_CC_OPTIMIZE_FOR_DEBUGGING is enabled, the compiler fails to optimize out a dead code path, which leads to a link failure: net/openvswitch/conntrack.o: In function `ovs_ct_set_labels': conntrack.c:(.text+0x2e60): undefined reference to `nf_connlabels_replace' In this configuration, we can take a shortcut, and completely remove the contrack label code. This may also help the regular optimization. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/openvswitch/conntrack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 35ae64cbef33f..46aa1aa51db41 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -1199,7 +1199,8 @@ static int ovs_ct_commit(struct net *net, struct sw_flow_key *key, &info->labels.mask); if (err) return err; - } else if (labels_nonzero(&info->labels.mask)) { + } else if (IS_ENABLED(CONFIG_NF_CONNTRACK_LABELS) && + labels_nonzero(&info->labels.mask)) { err = ovs_ct_set_labels(ct, key, &info->labels.value, &info->labels.mask); if (err)