From: Arnd Bergmann <arnd@arndb.de>
To: Pravin B Shelar <pshelar@ovn.org>,
"David S. Miller" <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Florian Westphal <fw@strlen.de>, Flavio Leitner <fbl@redhat.com>,
Gao Feng <gfree.wind@vip.163.com>,
Thierry Du Tre <thierry@dtsystems.be>,
Yi-Hung Wei <yihung.wei@gmail.com>,
Ed Swierk <eswierk@skyportsystems.com>,
Julia Lawall <Julia.Lawall@lip6.fr>,
netdev@vger.kernel.org, dev@openvswitch.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS
Date: Fri, 2 Nov 2018 16:36:55 +0100 [thread overview]
Message-ID: <20181102153705.1664786-1-arnd@arndb.de> (raw)
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 <arnd@arndb.de>
---
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 6bec37ab4472..a4660c48ff01 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -1203,7 +1203,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.18.0
next reply other threads:[~2018-11-02 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 15:36 Arnd Bergmann [this message]
2018-11-04 2:29 ` [PATCH] openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181102153705.1664786-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=Julia.Lawall@lip6.fr \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=eswierk@skyportsystems.com \
--cc=fbl@redhat.com \
--cc=fw@strlen.de \
--cc=gfree.wind@vip.163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=pshelar@ovn.org \
--cc=thierry@dtsystems.be \
--cc=yihung.wei@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).