openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS
authorArnd Bergmann <arnd@arndb.de>
Fri, 2 Nov 2018 15:36:55 +0000 (16:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:14:02 +0000 (09:14 +0100)
commitc4509088acdfc8d1018e97ad0350f5edabada984
treecb0a25bd76c6b7d0b1946f9137de17c82e51ec86
parent024a3ea35bdae12dd37dc81b5df57e9da01dff99
openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS

[ 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 <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/openvswitch/conntrack.c