# Create netns
unshare --keep-caps --map-auto --map-group=0 --map-user=0 --user --net --mount
# Finish netns setup
mount -t tmpfs tmpfs /run
# ifstate_tc-basic.yamlinterfaces:lo:link:state:upkind:physicaltc:ingress:truefilter:- kind:basicparent:ffff:fff2match:- kind:metaobject:kind:vlan_tagopnd:eqmask:0xfffvalue:1337action:- kind:vlanv_action:popifstatecli -c ifstate_tc-basic.yaml apply # "filter #49152 change"
ifstatecli -c ifstate_tc-basic.yaml apply # "filter #49152 change"
ifstatecli -c ifstate_tc-basic.yaml apply # "filter #49152 change"
# tc filter show dev lo parent ffff:
filter ingress protocol all pref 49152 basic chain 0
filter ingress protocol all pref 49152 basic chain 0 handle 0x3
meta(vlan mask 0x00000fff eq 1337)
action order 1: vlan pop pipe
index 3 ref 1 bind 1
filter ingress protocol all pref 49152 basic chain 0 handle 0x2
meta(vlan mask 0x00000fff eq 1337)
action order 1: vlan pop pipe
index 2 ref 1 bind 1
filter ingress protocol all pref 49152 basic chain 0 handle 0x1
meta(vlan mask 0x00000fff eq 1337)
action order 1: vlan pop pipe
index 1 ref 1 bind 1
```shell
# Create netns
unshare --keep-caps --map-auto --map-group=0 --map-user=0 --user --net --mount
```
```shell
# Finish netns setup
mount -t tmpfs tmpfs /run
```
```yaml
# ifstate_tc-basic.yaml
interfaces:
lo:
link:
state: up
kind: physical
tc:
ingress: true
filter:
- kind: basic
parent: ffff:fff2
match:
- kind: meta
object:
kind: vlan_tag
opnd: eq
mask: 0xfff
value: 1337
action:
- kind: vlan
v_action: pop
```
```shell
ifstatecli -c ifstate_tc-basic.yaml apply # "filter #49152 change"
ifstatecli -c ifstate_tc-basic.yaml apply # "filter #49152 change"
ifstatecli -c ifstate_tc-basic.yaml apply # "filter #49152 change"
```
```
# tc filter show dev lo parent ffff:
filter ingress protocol all pref 49152 basic chain 0
filter ingress protocol all pref 49152 basic chain 0 handle 0x3
meta(vlan mask 0x00000fff eq 1337)
action order 1: vlan pop pipe
index 3 ref 1 bind 1
filter ingress protocol all pref 49152 basic chain 0 handle 0x2
meta(vlan mask 0x00000fff eq 1337)
action order 1: vlan pop pipe
index 2 ref 1 bind 1
filter ingress protocol all pref 49152 basic chain 0 handle 0x1
meta(vlan mask 0x00000fff eq 1337)
action order 1: vlan pop pipe
index 1 ref 1 bind 1
```