Messages in this thread | | | Subject | Re: [PATCH 3/3] udp: make use of static_key_slow_set_true() interface | From | Steven Rostedt <> | Date | Mon, 01 Jul 2013 10:28:02 -0400 |
| |
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
| |