diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-02-12 00:20:39 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-02-12 17:07:09 +0100 |
commit | dd27c2e3d0a05c01ff14bb672d1a3f0fdd8f98fc (patch) | |
tree | 42041b30b1d27545ac6fde1849cf0044194f1e2a /drivers/net/ethernet/netronome/nfp/bpf/main.c | |
parent | ebbed0f46ed9d3ae23291d67cd52d18abb8501bc (diff) | |
download | linux-dd27c2e3d0a05c01ff14bb672d1a3f0fdd8f98fc.tar.gz linux-dd27c2e3d0a05c01ff14bb672d1a3f0fdd8f98fc.tar.bz2 linux-dd27c2e3d0a05c01ff14bb672d1a3f0fdd8f98fc.zip |
bpf: offload: add priv field for drivers
Currently bpf_offload_dev does not have any priv pointer, forcing
the drivers to work backwards from the netdev in program metadata.
This is not great given programs are conceptually associated with
the offload device, and it means one or two unnecessary deferences.
Add a priv pointer to bpf_offload_dev.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/bpf/main.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/bpf/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/bpf/main.c b/drivers/net/ethernet/netronome/nfp/bpf/main.c index dccae0319204..275de9f4c61c 100644 --- a/drivers/net/ethernet/netronome/nfp/bpf/main.c +++ b/drivers/net/ethernet/netronome/nfp/bpf/main.c @@ -465,7 +465,7 @@ static int nfp_bpf_init(struct nfp_app *app) app->ctrl_mtu = nfp_bpf_ctrl_cmsg_mtu(bpf); } - bpf->bpf_dev = bpf_offload_dev_create(&nfp_bpf_dev_ops); + bpf->bpf_dev = bpf_offload_dev_create(&nfp_bpf_dev_ops, bpf); err = PTR_ERR_OR_ZERO(bpf->bpf_dev); if (err) goto err_free_neutral_maps; |