[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190521152145.GA2165@nanopsycho.orion>
Date: Tue, 21 May 2019 17:21:45 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
xdp-newbies@...r.kernel.org, bpf@...r.kernel.org,
Stephen Hemminger <sthemmin@...rosoft.com>,
Jason Wang <jasowang@...hat.com>
Subject: Re: [PATCH v2 net 2/2] net: core: generic XDP support for stacked
device
Tue, May 21, 2019 at 04:45:53PM CEST, stephen@...workplumber.org wrote:
>On Tue, 21 May 2019 08:15:36 +0200
>Jiri Pirko <jiri@...nulli.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.
Powered by blists - more mailing lists