diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2018-05-24 16:45:57 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-05-24 18:36:15 -0700 |
commit | 38edddb81172e8b8decb057c0cd23271583a5fa0 (patch) | |
tree | 444ebbb5e686501073401c5836712b819ef03e10 /net/core | |
parent | 5d053f9da4311a86bc58be8588bb5660fb3f0724 (diff) | |
download | linux-38edddb81172e8b8decb057c0cd23271583a5fa0.tar.gz linux-38edddb81172e8b8decb057c0cd23271583a5fa0.tar.bz2 linux-38edddb81172e8b8decb057c0cd23271583a5fa0.zip |
xdp: add tracepoint for devmap like cpumap have
Notice how this allow us get XDP statistic without affecting the XDP
performance, as tracepoint is no-longer activated on a per packet basis.
V5: Spotted by John Fastabend.
Fix 'sent' also counted 'drops' in this patch, a later patch corrected
this, but it was a mistake in this intermediate step.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/filter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index c867106d3707..36cf2f87d742 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -3067,7 +3067,7 @@ static int __bpf_tx_xdp_map(struct net_device *dev_rx, void *fwd, case BPF_MAP_TYPE_DEVMAP: { struct bpf_dtab_netdev *dst = fwd; - err = dev_map_enqueue(dst, xdp); + err = dev_map_enqueue(dst, xdp, dev_rx); if (err) return err; __dev_map_insert_ctx(map, index); |