Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6016648ybc; Wed, 27 Nov 2019 13:27:56 -0800 (PST) X-Google-Smtp-Source: APXvYqxKoNmrwrHMuyUqAFy4N+8F8nPiyL0keKDC9YPaAKzC8KtBSnA896oHuOi6DvgFcNTOLmVK X-Received: by 2002:aa7:d64e:: with SMTP id v14mr34754510edr.88.1574890076358; Wed, 27 Nov 2019 13:27:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890076; cv=none; d=google.com; s=arc-20160816; b=wCJJQv5X7DP8DLT2tXDb7A929i7yxqo+0XShMkCPla1/3G2YPziQZakjQs9BY3qV9z t4KxSyrlfcM+GY9bG5H22vW6pidqZm43idgkGCtzm6H//8pMsUJm8+qWYQiAHsj98dHq ILSlzBWFt1883BeSju2uJPBtfSTbRdoGIVKOPd/BugAZcSwvmlmu/KRVYsI9W9jH1D8s r4Nya3/vE0KkGM2JLBQa7gBlzpPaRz4nfQKmS6iVF+Ub9b3k41NYMDEz5M96SZF3+lOh FCI1ErxLthSj2q7lSR3m2VKhJNYjSQDiz7koOgOZeNZKpUiVcKrtpuLtOgsw1tVB99PA I8Sw== 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 t18si10388321ejs.161.2019.11.27.13.27.31; Wed, 27 Nov 2019 13:27:56 -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 S1731202AbfK0VDk (ORCPT + 99 others); Wed, 27 Nov 2019 16:03:40 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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(-) 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) -- 2.20.1