-
|
I'd like to use u32 filters with clsact qdisc. But when I try to do it use pyroute2, I get error: Of course the interface exists. I'd appreciate it if you could help me find my mistake. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
There was a wrong parent; the kernel expects there ip.tc("add-filter", "u32", dev_index,
parent=0xfffffff2, # <--- here was a wrong parent
prio=2,
protocol=protocols.ETH_P_IP,
target=0x800,
keys=[f"{dst_ip_hex}/{dst_mask_hex}+{offset}"],
action=dict(kind="gact", action="ok")
)Just for reference: https://github.com/iproute2/iproute2/blob/41710ace5e8fadff354f3dba67bf27ed3a3c5ae7/include/uapi/linux/pkt_sched.h#L80 There is a significant lack of user-friendliness in pyroute2 when it comes to traffic control management, so any contributions in this area are highly welcome. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you! |
Beta Was this translation helpful? Give feedback.
-
|
@svinota I think I should to ask you the same thread. I have a misunderstanding how to delete u32 filter use pyroute2. the same by tc CLI output looks like: How can I delete the |
Beta Was this translation helpful? Give feedback.
There was a wrong parent; the kernel expects there
0xfffffff2in this case.Just for reference: https://github.com/iproute2/iproute2/blob/41710ace5e8fadff354f3dba67bf27ed3a3c5ae7/include/uapi/linux/pkt_sched.h#L80
There is a significant lack of user-friendliness in pyroute2 when it comes to traffic control management, so any contributions in this area are highly welcome.