bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: bpf@vger.kernel.org, bjorn.topel@intel.com,
	songliubraving@fb.com, ast@kernel.org, daniel@iogearbox.net,
	toke@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH bpf-next v3 2/3] bpf: xdp, virtio_net use access ptr macro for xdp enable check
Date: Mon, 27 Jan 2020 11:02:53 +0100	[thread overview]
Message-ID: <20200127100253.GA36124@ranger.igk.intel.com> (raw)
In-Reply-To: <1580084042-11598-3-git-send-email-john.fastabend@gmail.com>

On Sun, Jan 26, 2020 at 04:14:01PM -0800, John Fastabend wrote:
> virtio_net currently relies on rcu critical section to access the xdp
> program in its xdp_xmit handler. However, the pointer to the xdp program
> is only used to do a NULL pointer comparison to determine if xdp is
> enabled or not.
> 
> Use rcu_access_pointer() instead of rcu_dereference() to reflect this.
> Then later when we drop rcu_read critical section virtio_net will not
> need in special handling.
> 
> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>

Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

  reply	other threads:[~2020-01-27 17:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-27  0:13 [PATCH bpf-next v3 0/3] XDP flush cleanups John Fastabend
2020-01-27  0:14 ` [PATCH bpf-next v3 1/3] bpf: xdp, update devmap comments to reflect napi/rcu usage John Fastabend
2020-01-27  0:14 ` [PATCH bpf-next v3 2/3] bpf: xdp, virtio_net use access ptr macro for xdp enable check John Fastabend
2020-01-27 10:02   ` Maciej Fijalkowski [this message]
2020-01-27  0:14 ` [PATCH bpf-next v3 3/3] bpf: xdp, remove no longer required rcu_read_{un}lock() John Fastabend
2020-01-27 10:58 ` [PATCH bpf-next v3 0/3] XDP flush cleanups Daniel Borkmann

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=20200127100253.GA36124@ranger.igk.intel.com \
    --to=maciej.fijalkowski@intel.com \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=toke@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).