summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e/i40e_xsk.c
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2020-11-16 14:12:43 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2020-11-18 00:07:40 +0300
commit90da4b3208d32bdb5489ca08b91af16ed4a68d00 (patch)
tree26b7122be1f5a4f8e196a184581404e95a0ee844 /drivers/net/ethernet/intel/i40e/i40e_xsk.c
parentde91e631bdc7e6411989e1a9ab65501a31527e0b (diff)
downloadlinux-90da4b3208d32bdb5489ca08b91af16ed4a68d00.tar.xz
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 'drivers/net/ethernet/intel/i40e/i40e_xsk.c')
0 files changed, 0 insertions, 0 deletions