aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netronome
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-01-10 12:25:56 +0000
committerDaniel Borkmann <daniel@iogearbox.net>2018-01-10 13:49:35 +0100
commitc4f7730be580f8c39decc058246a83ddf7d7b3cb (patch)
tree844ab4f418b487138892e5ba29b7651a0d9a6d89 /drivers/net/ethernet/netronome
parentnfp: fix incumbent kdoc warnings (diff)
downloadlinux-dev-c4f7730be580f8c39decc058246a83ddf7d7b3cb.tar.xz
linux-dev-c4f7730be580f8c39decc058246a83ddf7d7b3cb.zip
nfp: bpf: round up the size of the stack
Kernel enforces the alignment of the bottom of the stack, NFP deals with positive offsets better so we should align the top of the stack. Round the stack size to NFP word size (4B). Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'drivers/net/ethernet/netronome')
-rw-r--r--drivers/net/ethernet/netronome/nfp/bpf/offload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/bpf/offload.c b/drivers/net/ethernet/netronome/nfp/bpf/offload.c
index fa2905e67b07..8dbf13450bab 100644
--- a/drivers/net/ethernet/netronome/nfp/bpf/offload.c
+++ b/drivers/net/ethernet/netronome/nfp/bpf/offload.c
@@ -147,7 +147,7 @@ int nfp_bpf_translate(struct nfp_app *app, struct nfp_net *nn,
return -EOPNOTSUPP;
}
- nfp_prog->stack_depth = prog->aux->stack_depth;
+ nfp_prog->stack_depth = round_up(prog->aux->stack_depth, 4);
nfp_prog->start_off = nn_readw(nn, NFP_NET_CFG_BPF_START);
nfp_prog->tgt_done = nn_readw(nn, NFP_NET_CFG_BPF_DONE);