• Scott Peterson's avatar
    i40e/i40evf: Add tracepoints · ed0980c4
    Scott Peterson authored
    This patch adds tracepoints to the i40e and i40evf drivers to which
    BPF programs can be attached for feature testing and verification.
    It's expected that an attached BPF program will identify and count or
    log some interesting subset of traffic. The bcc-tools package is
    helpful there for containing all the BPF arcana in a handy Python
    wrapper. Though you can make these tracepoints log trace messages, the
    messages themselves probably won't be very useful (other to verify the
    tracepoint is being called while you're debugging your BPF program).
    
    The idea here is that tracepoints have such low performance cost when
    disabled that we can leave these in the upstream drivers. This may
    eventually enable the instrumentation of unmodified customer systems
    should the need arise to verify a NIC feature is working as expected.
    In general this enables one set of feature verification tools to be
    used on these drivers whether they're built with the kernel or
    separately.
    
    Users are advised against using these tracepoints for anything other
    than a diagnostic tool. They have a performance impact when enabled,
    and their exact placement and form may change as we see how well they
    work in practice for the purposes above.
    
    Change-ID: Id6014a7322c0e6d08068114dd20bd156f2f6435e
    Signed-off-by: default avatarScott Peterson <scott.d.peterson@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    ed0980c4
i40evf_main.c 83.1 KB