From patchwork Wed Nov 27 20:31:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180323 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6637910ilf; Wed, 27 Nov 2019 12:51:25 -0800 (PST) X-Google-Smtp-Source: APXvYqzBRbPAQFbz8HLbJAZxyo9AkbI09lADsrbSYwV4yklNA/ZI9j+HNUWsmnsjNw5kkJUooJS7 X-Received: by 2002:a05:6402:1694:: with SMTP id a20mr34415564edv.211.1574887885115; Wed, 27 Nov 2019 12:51:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574887885; cv=none; d=google.com; s=arc-20160816; b=ZFxMygPX0Qfa2wht4AskZvJ4DdROj74OKpj1QT2YQ9AEasqasj6ccFjYgPICw/t/nf zqngAaV2eV4rQ8ZAjaS2M46R1wcoSrzUZFddlj1t4fK67A1EWx9Et6XceKzmUjdk769q Un7lCVtQX28EbBAGZ4V/+wjXzfCbzUUyZYwP+dK9lm+/crXvPEc5CTWbCuPh1xsWapCj rrqdgvKiQt1HuQt0x0ItJp4WJm3SAhVK0p3yJPhrcGXIpL5YomG1EiLpPJMHh39Clfwn c4HXyN9dD87ALENHju0hADJJXBHQ2IVwPoW0SbE2c58rzYwr4FlOUA2CWGr9F3cbEdSV t0sA== 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=4euF3goeXv8bS5dGUnXytWJsRHSsiBGfK8YmfmXVfUs=; b=KB/e+x7rS4QLMoGsHVoK8ZI3LNRvJ+2945OeGvib3nDmBnvETD8MLquRNqZoeUu0Lm uV/F9r5G7Efp/zxEaTqRiFjdRMU8vhBRCpQW5rQ2IYmpdkAQv4dqJJhL+dghIOSg+Xbp oAkVcLaAEsSgdTESpMi+KXyzRDzSiucH7dBKxFEh6ybPclqAINhkFJ62M9aRLQl8FcJU XRhU2IRE3HxEQu0uFPNXu5Og1ibqz7PQi/eVfcTFu+CR7kNpvb8muzI05J/FFbZ8VxuC YrqxuHwntt5tOMAh/nEoXQkFeGCrxl/WtUy/txtkhS17GqXK/a6HPAcQJ4niWwT+FwDy +3ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vYqPotm8; 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 x14si12008348edl.128.2019.11.27.12.51.24; Wed, 27 Nov 2019 12:51:25 -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=vYqPotm8; 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 S1729251AbfK0UvX (ORCPT + 26 others); Wed, 27 Nov 2019 15:51:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:37976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730462AbfK0UvU (ORCPT ); Wed, 27 Nov 2019 15:51:20 -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 6F6132184C; Wed, 27 Nov 2019 20:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887879; bh=Y4lAoQyQxZwgpe8S14AlWKNoT/13S/b0oclnwxddKWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vYqPotm8GTsuqhrJ7qaPf0UmjPoKpl5O2H5OXmYS5Z2xQJlN8D1K40oEgS+XGLX1G iKhgrBiKfeAu8w2/5ZeJI59Lg2j2YulA3/Y9KfGF7vdbmUy6GIEYziuMnTpPWMCVoT Z2O42BL3hVM0c9aojzB7vW5EKch0uEvjDvoLmISI= 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.14 129/211] openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS Date: Wed, 27 Nov 2019 21:31:02 +0100 Message-Id: <20191127203106.276796645@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203049.431810767@linuxfoundation.org> References: <20191127203049.431810767@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 0171b27a2b81b..48d81857961ca 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -1083,7 +1083,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)