]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/core/dev.c
net: convert rps_needed and rfs_needed to new static branch api
[linux.git] / net / core / dev.c
index 676c9418f8e4ec8dd7da3da6989b449744f6dd88..9ca2d3abfd1a3cf790c919aaa3a340057ee7984f 100644 (file)
@@ -3982,9 +3982,9 @@ EXPORT_SYMBOL(rps_sock_flow_table);
 u32 rps_cpu_mask __read_mostly;
 EXPORT_SYMBOL(rps_cpu_mask);
 
-struct static_key rps_needed __read_mostly;
+struct static_key_false rps_needed __read_mostly;
 EXPORT_SYMBOL(rps_needed);
-struct static_key rfs_needed __read_mostly;
+struct static_key_false rfs_needed __read_mostly;
 EXPORT_SYMBOL(rfs_needed);
 
 static struct rps_dev_flow *
@@ -4510,7 +4510,7 @@ static int netif_rx_internal(struct sk_buff *skb)
        }
 
 #ifdef CONFIG_RPS
-       if (static_key_false(&rps_needed)) {
+       if (static_branch_unlikely(&rps_needed)) {
                struct rps_dev_flow voidflow, *rflow = &voidflow;
                int cpu;
 
@@ -5179,7 +5179,7 @@ static int netif_receive_skb_internal(struct sk_buff *skb)
 
        rcu_read_lock();
 #ifdef CONFIG_RPS
-       if (static_key_false(&rps_needed)) {
+       if (static_branch_unlikely(&rps_needed)) {
                struct rps_dev_flow voidflow, *rflow = &voidflow;
                int cpu = get_rps_cpu(skb->dev, skb, &rflow);
 
@@ -5227,7 +5227,7 @@ static void netif_receive_skb_list_internal(struct list_head *head)
 
        rcu_read_lock();
 #ifdef CONFIG_RPS
-       if (static_key_false(&rps_needed)) {
+       if (static_branch_unlikely(&rps_needed)) {
                list_for_each_entry_safe(skb, next, head, list) {
                        struct rps_dev_flow voidflow, *rflow = &voidflow;
                        int cpu = get_rps_cpu(skb->dev, skb, &rflow);