Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nemu3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
nemu3
Commits
35577d04
Commit
35577d04
authored
Oct 24, 2016
by
Martín Ferrari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt to changes in the tc command.
parent
69be7d3d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/nemu/iproute.py
src/nemu/iproute.py
+7
-3
No files found.
src/nemu/iproute.py
View file @
35577d04
...
...
@@ -688,7 +688,7 @@ def get_tc_tree():
if line == "":
continue
match = re.match(r'
qdisc
(
\
S
+
)
([
0
-
9
a
-
f
]
+
):[
0
-
9
a
-
f
]
*
dev
(
\
S
+
)
' +
r'
(
?
:
parent
([
0
-
9
a
-
f
]
+
):[
0
-
9
a
-
f
]
*|
root
)
\
s
*
(.
*
)
', line)
r'
(
?
:
parent
([
0
-
9
a
-
f
]
*
):[
0
-
9
a
-
f
]
*|
root
)
\
s
*
(.
*
)
', line)
if not match:
raise RuntimeError("Invalid output from `tc qdisc'
:
`
%
s
'" % line)
qdisc = match.group(1)
...
...
@@ -696,11 +696,15 @@ def get_tc_tree():
iface = match.group(3)
parent = match.group(4) # or None
extra = match.group(5)
if parent == "":
# XXX: Still not sure what is this, shows in newer kernels for wlan
# interfaces.
continue
if iface not in data:
data[iface] = {}
if parent not in data[iface]:
data[iface][parent] = []
data[iface][parent]
+= [[handle, qdisc, parent, extra]]
data[iface][parent]
.append([handle, qdisc, parent, extra])
tree = {}
for iface in data:
...
...
@@ -789,7 +793,7 @@ def get_tc_data():
continue
node = tree[ifdata[0][i].name]
if not node["children"]:
if node["qdisc"]
== "mq" or node["qdisc"] == "pfifo_fast"
\
if node["qdisc"]
in ("mq", "pfifo_fast", "noqueue")
\
or node["qdisc"][1:] == "fifo":
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment