lkml.org 
[lkml]   [2013]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] udp: make use of static_key_slow_set_true() interface
From
Date
On Mon, 2013-07-01 at 00:20 -0400, Jason Baron wrote:
>
> >> @@ -1450,7 +1449,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
> >> goto drop;
> >> nf_reset(skb);
> >>
> >> - if (static_key_false(&udp_encap_needed) && up->encap_type) {
> >> + if (static_key_false(&udp_encap_needed.key) && up->encap_type) {
> > I wonder if we should add a static_bool_key_false(), because that added
> > ".key" is a bit confusing.
> >
> > -- Steve
> >
>
> Yeah - that is sort of ugly, but it avoids introducing a new branch API
> call. That said, a 'static_bool_key_false()' would probably be a simple
> wrapper function.

My main concern was to keep true/false separate from counters to
document how this is being used. A simple wrapper would work too.

-- Steve




\
 
 \ /
  Last update: 2013-07-01 17:01    [W:0.041 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site