On Mon, Jun 12, 2017 at 06:28:42PM -0700, Jakub Kicinski wrote: > On Mon, 12 Jun 2017 18:00:23 -0700, Martin KaFai Lau wrote: > > + case XDP_QUERY_PROG: { > > + const struct bpf_prog *xdp_prog; > > + > > + xdp_prog = READ_ONCE(nn->dp.xdp_prog); > > + if (xdp_prog) > > + xdp->prog_id = xdp_prog->aux->id; > > + else > > + xdp->prog_id = 0; > > return 0; > > + } > > default: > > return -EINVAL; > > } > > Why READ_ONCE? I thought .ndo_xdp is always called under RTNL. will remove in the next spin.
- [PATCH net-next 00/10] bpf: xdp: Report bpf_prog ID in IF... Martin KaFai Lau
- [PATCH net-next 06/10] bpf: thunderx: Report bpf_pro... Martin KaFai Lau
- [PATCH net-next 05/10] bpf: bnxt: Report bpf_prog ID... Martin KaFai Lau
- [PATCH net-next 04/10] bpf: virtio_net: Report bpf_p... Martin KaFai Lau
- [PATCH net-next 10/10] net: Remove prog_attached fro... Martin KaFai Lau
- [PATCH net-next 08/10] bpf: nfp: Report bpf_prog ID ... Martin KaFai Lau
- Re: [PATCH net-next 08/10] bpf: nfp: Report bpf_... Jakub Kicinski
- Re: [PATCH net-next 08/10] bpf: nfp: Report ... Martin KaFai Lau
- [PATCH net-next 03/10] bpf: mlx5e: Report bpf_prog I... Martin KaFai Lau
- Re: [PATCH net-next 03/10] bpf: mlx5e: Report bp... Saeed Mahameed
- Re: [PATCH net-next 03/10] bpf: mlx5e: Repor... Martin KaFai Lau
- Re: [PATCH net-next 03/10] bpf: mlx5e: R... Daniel Borkmann
- [PATCH net-next 02/10] bpf: mlx4: Report bpf_prog ID... Martin KaFai Lau
- [PATCH net-next 09/10] bpf: qede: Report bpf_prog ID... Martin KaFai Lau
- [PATCH net-next 07/10] bpf: ixgbe: Report bpf_prog I... Martin KaFai Lau
- [PATCH net-next 01/10] net: Add IFLA_XDP_PROG_ID Martin KaFai Lau
- Re: [PATCH net-next 00/10] bpf: xdp: Report bpf_prog... Jakub Kicinski
- Re: [PATCH net-next 00/10] bpf: xdp: Report bpf_... Martin KaFai Lau