Tue, May 21, 2019 at 04:45:53PM CEST, step...@networkplumber.org wrote:
>On Tue, 21 May 2019 08:15:36 +0200
>Jiri Pirko <j...@resnulli.us> wrote:
>
>> +    if (static_branch_unlikely(&generic_xdp_needed_key)) {
>> +            int ret2;
>> +
>> +            preempt_disable();
>> +            rcu_read_lock();
>> +            ret2 = do_xdp_generic(rcu_dereference(skb->dev->xdp_prog), skb);
>> +            rcu_read_unlock();
>> +            preempt_enable();
>> +
>> +            if (ret2 != XDP_PASS)
>> +                    return NET_RX_DROP;
>> +    }
>> +
>
>rcu_read_lock is already held by callers of __netif_receive_skb_core

Sure, the purpose of the draft was just to show the idea.

Reply via email to