diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2020-11-16 12:12:43 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-11-17 22:07:40 +0100 |
commit | 90da4b3208d32bdb5489ca08b91af16ed4a68d00 (patch) | |
tree | 26b7122be1f5a4f8e196a184581404e95a0ee844 /mm/percpu-vm.c | |
parent | de91e631bdc7e6411989e1a9ab65501a31527e0b (diff) |
samples/bpf: Increment Tx stats at sending
Increment the statistics over how many Tx packets have been sent at
the time of sending instead of at the time of completion. This as a
completion event means that the buffer has been sent AND returned to
user space. The packet always gets sent shortly after sendto() is
called. The kernel might, for performance reasons, decide to not
return every single buffer to user space immediately after sending,
for example, only after a batch of packets have been
transmitted. Incrementing the number of packets sent at completion,
will in that case be confusing as if you send a single packet, the
counter might show zero for a while even though the packet has been
transmitted.
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/1605525167-14450-2-git-send-email-magnus.karlsson@gmail.com
Diffstat (limited to 'mm/percpu-vm.c')
0 files changed, 0 insertions, 0 deletions