• Daniel Borkmann's avatar
    tc, clsact: add clsact frontend · 8f9afdd5
    Daniel Borkmann authored
    Add the tc part for the kernel commit 1f211a1b929c ("net, sched: add
    clsact qdisc"). Quoting example usage from that commit description:
    
      Example, adding qdisc:
    
      # tc qdisc add dev foo clsact
      # tc qdisc show dev foo
      qdisc mq 0: root
      qdisc pfifo_fast 0: parent :1 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
      qdisc pfifo_fast 0: parent :2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
      qdisc pfifo_fast 0: parent :3 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
      qdisc pfifo_fast 0: parent :4 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
      qdisc clsact ffff: parent ffff:fff1
    
      Adding filters (deleting, etc works analogous by specifying ingress/egress):
    
      # tc filter add dev foo ingress bpf da obj bar.o sec ingress
      # tc filter add dev foo egress  bpf da obj bar.o sec egress
      # tc filter show dev foo ingress
      filter protocol all pref 49152 bpf
      filter protocol all pref 49152 bpf handle 0x1 bar.o:[ingress] direct-action
      # tc filter show dev foo egress
      filter protocol all pref 49152 bpf
      filter protocol all pref 49152 bpf handle 0x1 bar.o:[egress] direct-action
    
    The ingress parent alias can also be used with ingress qdisc.
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    8f9afdd5
tc_filter.c 10.5 KB