Message ID | 1571160473-46132-2-git-send-email-yihung.wei@gmail.com |
---|---|
State | Accepted |
Commit | 719197e73bac15656374af48a0f86b79d9eaea34 |
Headers | show |
Series | Backport upstream conntrack related patches | expand |
LGTM. Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com> On Tue, Oct 15, 2019 at 10:40 AM Yi-Hung Wei <yihung.wei@gmail.com> wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > upstream commit: > commit a277d516de5f498c91d91189717ef7e01102ad27 > Author: Arnd Bergmann <arnd@arndb.de> > Date: Fri Nov 2 16:36:55 2018 +0100 > > openvswitch: fix linking without CONFIG_NF_CONNTRACK_LABELS > > 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: Yi-Hung Wei <yihung.wei@gmail.com> > --- > datapath/conntrack.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/datapath/conntrack.c b/datapath/conntrack.c > index c6d523758ff1..e328afe1ad15 100644 > --- a/datapath/conntrack.c > +++ b/datapath/conntrack.c > @@ -1263,7 +1263,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.7.4 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Bleep bloop. Greetings Yi-Hung Wei, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: ERROR: Author Arnd Bergmann <arnd@arndb.de> needs to sign off. WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: Yi-Hung Wei <yihung.wei@gmail.com> Lines checked: 48, Warnings: 1, Errors: 1 Please check this out. If you feel there has been an error, please email aconole@redhat.com Thanks, 0-day Robot
diff --git a/datapath/conntrack.c b/datapath/conntrack.c index c6d523758ff1..e328afe1ad15 100644 --- a/datapath/conntrack.c +++ b/datapath/conntrack.c @@ -1263,7 +1263,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)