From: David Ahern <dsahern@gmail.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>, netdev@vger.kernel.org
Cc: alexei.starovoitov@gmail.com, daniel@iogearbox.net
Subject: Re: [PATCH net 05/10] net: xdp: don't allow device-bound programs in driver mode
Date: Mon, 20 Nov 2017 07:36:39 -0700 [thread overview]
Message-ID: <0ca26b61-3c92-5bc1-a6ef-2deb8025c41c@gmail.com> (raw)
In-Reply-To: <20171120045522.2188-6-jakub.kicinski@netronome.com>
On 11/19/17 9:55 PM, Jakub Kicinski wrote:
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 09525a27319c..21de2d37a0ba 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -7143,6 +7143,13 @@ int dev_change_xdp_fd(struct net_device *dev, struct netlink_ext_ack *extack,
> bpf_op == ops->ndo_bpf);
> if (IS_ERR(prog))
> return PTR_ERR(prog);
> +
> + if (!(flags & XDP_FLAGS_HW_MODE) &&
> + bpf_prog_is_dev_bound(prog->aux)) {
> + NL_SET_ERR_MSG_MOD(extack, "using device-bound program without HW_MODE flag not supported");
I don't see dev_change_xdp_fd called by device drivers, so that should
just be NL_SET_ERR_MSG. Also, "is not supported" sounds better to me
than just "not supported".
next prev parent reply other threads:[~2017-11-20 14:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-20 4:55 [PATCH net 00/10] bpf: offload: check netdev pointer in the drivers and namespace trouble Jakub Kicinski
2017-11-20 4:55 ` [PATCH net 01/10] bpf: offload: add comment warning developers about double destroy Jakub Kicinski
2017-11-20 4:55 ` [PATCH net 02/10] bpf: offload: limit offload to cls_bpf and xdp programs only Jakub Kicinski
2017-11-20 4:55 ` [PATCH net 03/10] bpf: offload: rename the ifindex field Jakub Kicinski
2017-11-20 4:55 ` [PATCH net 04/10] bpf: offload: move offload device validation out to the drivers Jakub Kicinski
2017-11-20 7:11 ` Jiri Pirko
2017-11-20 4:55 ` [PATCH net 05/10] net: xdp: don't allow device-bound programs in driver mode Jakub Kicinski
2017-11-20 14:36 ` David Ahern [this message]
2017-11-20 22:02 ` Jakub Kicinski
2017-11-20 22:21 ` Daniel Borkmann
2017-11-20 4:55 ` [PATCH net 06/10] bpf: turn bpf_prog_get_type() into a wrapper Jakub Kicinski
2017-11-20 4:55 ` [PATCH net 07/10] bpf: offload: ignore namespace moves Jakub Kicinski
2017-11-20 4:55 ` [PATCH net 08/10] bpftool: revert printing program device bound info Jakub Kicinski
2017-11-20 4:55 ` [PATCH net 09/10] bpf: revert report offload info to user space Jakub Kicinski
2017-11-20 4:55 ` [PATCH net 10/10] bpf: make bpf_prog_offload_verifier_prep() static inline Jakub Kicinski
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=0ca26b61-3c92-5bc1-a6ef-2deb8025c41c@gmail.com \
--to=dsahern@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=daniel@iogearbox.net \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@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 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).