[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180108160218.1e735fca@cakuba.netronome.com>
Date: Mon, 8 Jan 2018 16:02:25 -0800
From: Jakub Kicinski <kubakici@...pl>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: Alexei Starovoitov <ast@...nel.org>, davem@...emloft.net,
torvalds@...ux-foundation.org, jannh@...gle.com,
alan@...ux.intel.com, netdev@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH bpf-next] bpf: introduce BPF_JIT_ALWAYS_ON config
On Mon, 8 Jan 2018 22:59:04 +0100, Daniel Borkmann wrote:
> > @@ -1453,6 +1457,11 @@ struct bpf_prog *bpf_prog_select_runtime(struct bpf_prog *fp, int *err)
> > */
> > *err = bpf_check_tail_call(fp);
> >
> > +#ifdef CONFIG_BPF_JIT_ALWAYS_ON
> > + if (!fp->jited)
> > + *err = -ENOTSUPP;
> > +#endif
I think programs JITed for offload won't have fp->jited set, but
those are pretty safe from CPU bugs. Should we set fp->jited = 1; in
bpf_prog_offload_compile()? Just throwing "&& !bpf_prog_is_dev_bound()"
in here seems cleaner to me.
FWIW if you have netdevsim compiled and recent iproute2, this will
work to check:
# ip link add type netdevsim
# ip link set netdevsim0 xdpoffload obj ~/xdp/pass.o
Powered by blists - more mailing lists