net: convert rps_needed and rfs_needed to new static branch api
We prefer static_branch_unlikely() over static_key_false() these days. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7c1508e5f6
commit
dc05360fee
@ -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);
|
||||
|
Reference in New Issue
Block a user