]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: Count syscalls in xdpsock
authorCiara Loftus <ciara.loftus@intel.com>
Fri, 2 Oct 2020 13:36:11 +0000 (13:36 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 6 Oct 2020 18:46:50 +0000 (11:46 -0700)
commitee1dba98e108d2f9890c605e2914138bcdd9f8f9
tree04b5c415865aee21ad2152cd5149447481bde582
parent83aa75bbeb5862e33fd6b8c2ce5987fffe5c32e9
samples: bpf: Count syscalls in xdpsock

Categorise and record syscalls issued in the xdpsock sample app. The
categories recorded are:

  rx_empty_polls:    polls when the rx ring is empty
  fill_fail_polls:   polls when failed to get addr from fill ring
  copy_tx_sendtos:   sendtos issued for tx when copy mode enabled
  tx_wakeup_sendtos: sendtos issued when tx ring needs waking up
  opt_polls:         polls issued since the '-p' flag is set

Print the stats using '-a' on the xdpsock command line.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20201002133612.31536-2-ciara.loftus@intel.com
samples/bpf/xdpsock_user.c