• Jesper Dangaard Brouer's avatar
    xdp: tracepoint xdp_redirect also need a map argument · 8d3b778f
    Jesper Dangaard Brouer authored
    To make sense of the map index, the tracepoint user also need to know
    that map we are talking about.  Supply the map pointer but only expose
    the map->id.
    
    The 'to_index' is renamed 'to_ifindex'.  In the xdp_redirect_map case,
    this is the result of the devmap lookup. The map lookup key is exposed
    as map_index, which is needed to troubleshoot in case the lookup failed.
    The 'to_ifindex' is placed after 'err' to keep TP_STRUCT as common as
    possible.
    
    This also keeps the TP_STRUCT similar enough, that userspace can write
    a monitor program, that doesn't need to care about whether
    bpf_redirect or bpf_redirect_map were used.
    Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8d3b778f
filter.c 111 KB