From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: alexei.starovoitov@gmail.com, daniel@iogearbox.net
Cc: oss-drivers@netronome.com, netdev@vger.kernel.org,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH bpf-next 7/9] netdevsim: allow program sharing between devices
Date: Mon, 16 Jul 2018 19:37:21 -0700 [thread overview]
Message-ID: <20180717023723.30155-8-jakub.kicinski@netronome.com> (raw)
In-Reply-To: <20180717023723.30155-1-jakub.kicinski@netronome.com>
Allow program sharing between devices which were linked together.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
---
drivers/net/netdevsim/bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/netdevsim/bpf.c b/drivers/net/netdevsim/bpf.c
index 9eab29f67a0e..81444208b216 100644
--- a/drivers/net/netdevsim/bpf.c
+++ b/drivers/net/netdevsim/bpf.c
@@ -294,7 +294,7 @@ nsim_setup_prog_hw_checks(struct netdevsim *ns, struct netdev_bpf *bpf)
NSIM_EA(bpf->extack, "xdpoffload of non-bound program");
return -EINVAL;
}
- if (bpf->prog->aux->offload->netdev != ns->netdev) {
+ if (!bpf_offload_dev_match(bpf->prog, ns->netdev)) {
NSIM_EA(bpf->extack, "program bound to different dev");
return -EINVAL;
}
--
2.17.1
next prev parent reply other threads:[~2018-07-17 3:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 2:37 [PATCH bpf-next 0/9] bpf: offload program and map sharing Jakub Kicinski
2018-07-17 2:37 ` [PATCH bpf-next 1/9] netdevsim: add switch_id attribute Jakub Kicinski
2018-07-17 2:37 ` [PATCH bpf-next 2/9] netdevsim: add shared netdevsim devices Jakub Kicinski
2018-07-17 2:37 ` [PATCH bpf-next 3/9] netdevsim: associate bound programs with shared dev Jakub Kicinski
2018-07-17 2:37 ` [PATCH bpf-next 4/9] nfp: add .ndo_init() and .ndo_uninit() callbacks Jakub Kicinski
2018-07-17 2:37 ` [PATCH bpf-next 5/9] bpf: offload: aggregate offloads per-device Jakub Kicinski
2018-07-17 2:37 ` [PATCH bpf-next 6/9] bpf: offload: allow program and map sharing per-ASIC Jakub Kicinski
2018-07-17 3:00 ` Alexei Starovoitov
2018-07-17 3:18 ` Jakub Kicinski
2018-07-17 2:37 ` Jakub Kicinski [this message]
2018-07-17 2:37 ` [PATCH bpf-next 8/9] nfp: bpf: allow program sharing within ASIC Jakub Kicinski
2018-07-17 2:37 ` [PATCH bpf-next 9/9] selftests/bpf: add test for sharing objects between netdevs 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=20180717023723.30155-8-jakub.kicinski@netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=alexei.starovoitov@gmail.com \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.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).