• Stanislav Fomichev's avatar
    bpf: XDP metadata RX kfuncs · 3d76a4d3
    Stanislav Fomichev authored
    Define a new kfunc set (xdp_metadata_kfunc_ids) which implements all possible
    XDP metatada kfuncs. Not all devices have to implement them. If kfunc is not
    supported by the target device, the default implementation is called instead.
    The verifier, at load time, replaces a call to the generic kfunc with a call
    to the per-device one. Per-device kfunc pointers are stored in separate
    struct xdp_metadata_ops.
    
    Cc: John Fastabend <john.fastabend@gmail.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Martin KaFai Lau <martin.lau@linux.dev>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Cc: Willem de Bruijn <willemb@google.com>
    Cc: Jesper Dangaard Brouer <brouer@redhat.com>
    Cc: Anatoly Burakov <anatoly.burakov@intel.com>
    Cc: Alexander Lobakin <alexandr.lobakin@intel.com>
    Cc: Magnus Karlsson <magnus.karlsson@gmail.com>
    Cc: Maryam Tahhan <mtahhan@redhat.com>
    Cc: xdp-hints@xdp-project.net
    Cc: netdev@vger.kernel.org
    Signed-off-by: default avatarStanislav Fomichev <sdf@google.com>
    Link: https://lore.kernel.org/r/20230119221536.3349901-8-sdf@google.comSigned-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
    3d76a4d3
verifier.c 504 KB