Enable BPF remaining parameters in kernel config - allow extended usage of kernel & application tracing


Recommended Posts

Hi Team,

 

Could we simply enable the remaining BPF (Berkeley Packet Filter) tracing parameters in the stock kernel configuration file? This will expose raw tracing functionality that has been added to the kernel from 4.9, in a production safe implementation, that will allow the use of detailed application & kernel tracing tools such as those in bcc (BPF Compiler Collection) suite which is for diagnosing and troubleshooting performance and application code issues. 

 

This will be beneficial for the whole community by allowing additional information to be exposed by the kernel, which can then be exposed either in the stock UI or via plugin system.

 

Some examples:

 

image.thumb.png.8015ff75d668227094456d8cc0d43756.png

 

Currently the existing kernel config has:

 

  /usr/src/linux-4.19.56-Unraid% grep BPF .config|sort
# CONFIG_BPFILTER is not set
# CONFIG_BPF_JIT is not set
# CONFIG_BPF_SYSCALL is not set
# CONFIG_NET_CLS_BPF is not set
# CONFIG_TEST_BPF is not set
CONFIG_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_NETFILTER_XT_MATCH_BPF=y

From the bcc INSTALL.md#kernel-configuration section:

 

CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
# [optional, for tc filters]
CONFIG_NET_CLS_BPF=m
# [optional, for tc actions]
CONFIG_NET_ACT_BPF=m
CONFIG_BPF_JIT=y
# [for Linux kernel versions 4.1 through 4.6]
CONFIG_HAVE_BPF_JIT=y
# [for Linux kernel versions 4.7 and later]
CONFIG_HAVE_EBPF_JIT=y
# [optional, for kprobes]
CONFIG_BPF_EVENTS=y

## There are a few optional kernel flags needed for running bcc networking examples on vanilla kernel:

CONFIG_NET_SCH_SFQ=m
CONFIG_NET_ACT_POLICE=m
CONFIG_NET_ACT_GACT=m
CONFIG_DUMMY=m
CONFIG_VXLAN=m

 

As to the last non-BPF by name parameters:

 

  linux-4.19.56-Unraid grep CONFIG_NET_SCH_SFQ .config
# CONFIG_NET_SCH_SFQ is not set
  linux-4.19.56-Unraid grep CONFIG_NET_ACT_POLICE .config
  linux-4.19.56-Unraid grep CONFIG_NET_ACT_GACT .config
  linux-4.19.56-Unraid grep CONFIG_VXLAN .config
CONFIG_VXLAN=m
  linux-4.19.56-Unraid grep CONFIG_DUMMY .config
# CONFIG_DUMMY is not set

Cheers!

  • Upvote 1
Link to comment
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.