Skip to content

Add support for specify libbpf_flags? #4

@ihciah

Description

@ihciah

By default setting libbpf_flags to 0 will make libbpf load its ebpf prog. But for many cases we don't want all the packets to userspace. For example, maybe we only want port 80 packets. In this situation we can do the filtering in ebpf side.

To load custom ebpf prog we need supply XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD to libbpf_flags.

Will it be acceptable to add a libbpf_flags field for SocketOptions? Since it's a pub struct with pub fields, it's a breaking change. If its okay, I will submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions