All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	xdp-newbies@vger.kernel.org, bpf@vger.kernel.org,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Jason Wang <jasowang@redhat.com>
Subject: Re: [PATCH v2 net 2/2] net: core: generic XDP support for stacked device
Date: Tue, 21 May 2019 07:45:53 -0700	[thread overview]
Message-ID: <20190521074553.12329dd5@hermes.lan> (raw)
In-Reply-To: <20190521061536.GB2210@nanopsycho.orion>

On Tue, 21 May 2019 08:15:36 +0200
Jiri Pirko <jiri@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

  reply	other threads:[~2019-05-21 14:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-19  3:10 [PATCH v2 net 0/2] XDP generic related fixes Stephen Hemminger
2019-05-19  3:10 ` [PATCH v2 net 1/2] netvsc: unshare skb in VF rx handler Stephen Hemminger
2019-05-19  3:10 ` [PATCH v2 net 2/2] net: core: generic XDP support for stacked device Stephen Hemminger
2019-05-20  9:11   ` Jiri Pirko
2019-05-20 15:53     ` Stephen Hemminger
2019-05-21  5:54       ` Jason Wang
2019-05-20 16:04     ` Stephen Hemminger
2019-05-21  6:15       ` Jiri Pirko
2019-05-21 14:45         ` Stephen Hemminger [this message]
2019-05-21 15:21           ` Jiri Pirko
2019-05-21  4:47     ` Jason Wang
2019-05-21  6:08       ` Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190521074553.12329dd5@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=xdp-newbies@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.