• Daniel Borkmann's avatar
    cls_bpf: make binding to classid optional · ef146fa4
    Daniel Borkmann authored
    The binding to a particular classid was so far always mandatory for
    cls_bpf, but it doesn't need to be. Therefore, lift this restriction
    as similarly done in other classifiers.
    
    Only a couple of qdiscs make use of class from the tcf_result, others
    don't strictly care, so let the user choose his needs (those that read
    out class can handle situations where it could be NULL).
    
    An explicit check for tcf_unbind_filter() is also not needed here, as
    the previous r->class was 0, so the xchg() will return that and
    therefore a callback to the qdisc's unbind_tcf() is skipped.
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Acked-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ef146fa4
cls_bpf.c 11.8 KB