Message ID | 1492211174-28936-1-git-send-email-azhou@ovn.org |
---|---|
State | Accepted |
Headers | show |
On 14 April 2017 at 16:06, Andy Zhou <azhou@ovn.org> wrote: > When CONFIG_NF_CONNTRACK_LABLES is not set, upstream code still make > use of NF_CT_LABLES_MAX_SIZE. Always define it in the compat code > to keep back ports close to the upstream. > > Signed-off-by: Andy Zhou <azhou@ovn.org> > > --- Acked-by: Joe Stringer <joe@ovn.org>
On Tue, Apr 18, 2017 at 4:05 PM, Joe Stringer <joe@ovn.org> wrote: > On 14 April 2017 at 16:06, Andy Zhou <azhou@ovn.org> wrote: >> When CONFIG_NF_CONNTRACK_LABLES is not set, upstream code still make >> use of NF_CT_LABLES_MAX_SIZE. Always define it in the compat code >> to keep back ports close to the upstream. >> >> Signed-off-by: Andy Zhou <azhou@ovn.org> >> >> --- > > Acked-by: Joe Stringer <joe@ovn.org> Thanks for the review. Pushed the series to master.
diff --git a/datapath/linux/compat/include/net/netfilter/nf_conntrack_labels.h b/datapath/linux/compat/include/net/netfilter/nf_conntrack_labels.h index c138de7bab7a..5af5a9a8db7c 100644 --- a/datapath/linux/compat/include/net/netfilter/nf_conntrack_labels.h +++ b/datapath/linux/compat/include/net/netfilter/nf_conntrack_labels.h @@ -5,13 +5,13 @@ #include <linux/version.h> #include_next <net/netfilter/nf_conntrack_labels.h> -#ifndef HAVE_NF_CONNLABELS_GET_TAKES_BIT -#if IS_ENABLED(CONFIG_NF_CONNTRACK_LABELS) - #ifndef NF_CT_LABELS_MAX_SIZE #define NF_CT_LABELS_MAX_SIZE ((XT_CONNLABEL_MAXBIT + 1) / BITS_PER_BYTE) #endif +#ifndef HAVE_NF_CONNLABELS_GET_TAKES_BIT +#if IS_ENABLED(CONFIG_NF_CONNTRACK_LABELS) + /* XXX: This doesn't lock others out from doing the same configuration * simultaneously. */ static inline int rpl_nf_connlabels_get(struct net *net, unsigned int bits)
When CONFIG_NF_CONNTRACK_LABLES is not set, upstream code still make use of NF_CT_LABLES_MAX_SIZE. Always define it in the compat code to keep back ports close to the upstream. Signed-off-by: Andy Zhou <azhou@ovn.org> --- v1->v2: Drop the v1, change to always export NF_CT_LABELS_MAX_SIZE --- datapath/linux/compat/include/net/netfilter/nf_conntrack_labels.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)