TC filter functions should pass "prio" parameter

Pyroute2 TC filter function accept "prio" parameter to define
the filter priority [1].

[1]https://github.com/svinota/pyroute2/blob/0.5.6/pyroute2/netlink/rtnl/tcmsg/cls_u32.py#L28

Change-Id: I4689e508ed74339903901d4c03fed7bf9547a185
Closes-Bug: #1834753
This commit is contained in:
Rodolfo Alonso Hernandez 2019-06-29 20:10:02 +00:00 committed by LIU Yulong
parent d9e61138ff
commit 12e3b20736

View File

@ -154,7 +154,7 @@ def add_tc_filter_match32(device, parent, priority, class_id, keys,
index = ip_lib.get_link_id(device, namespace)
with ip_lib.get_iproute(namespace) as ip:
ip.tc('add-filter', kind='u32', index=index,
parent=parent, priority=priority, target=class_id,
parent=parent, prio=priority, target=class_id,
protocol=protocol, keys=keys, **kwargs)
except OSError as e:
if e.errno == errno.ENOENT:
@ -180,7 +180,7 @@ def add_tc_filter_policy(device, parent, priority, rate, burst, mtu, action,
index = ip_lib.get_link_id(device, namespace)
with ip_lib.get_iproute(namespace) as ip:
ip.tc('add-filter', kind='u32', index=index,
parent=parent, priority=priority, protocol=protocol,
parent=parent, prio=priority, protocol=protocol,
rate=rate, burst=burst, mtu=mtu, action=action,
keys=keys, target=flowid, **kwargs)
except OSError as e: