# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1283549071 25200
# Node ID 28b1cd50c43d408c43f89c177b720984168ee196
# Parent 930cd1ca2ddc548f5647b433a90fce96989646f3
Remus: use plug qdisc for network buffering instead of queue
It was renamed in the pvops tree.
Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>
diff --git a/tools/python/xen/remus/device.py b/tools/python/xen/remus/device.py
--- a/tools/python/xen/remus/device.py
+++ b/tools/python/xen/remus/device.py
@@ -281,12 +281,12 @@
if not self.installed:
self.install()
- self._sendqmsg(qdisc.TC_QUEUE_CHECKPOINT)
+ self._sendqmsg(qdisc.TC_PLUG_CHECKPOINT)
def commit(self):
'''Called when checkpoint has been acknowledged by
the backup'''
- self._sendqmsg(qdisc.TC_QUEUE_RELEASE)
+ self._sendqmsg(qdisc.TC_PLUG_RELEASE)
# private
def _sendqmsg(self, action):
@@ -296,7 +296,7 @@
return True
def setup(self):
- """install Remus queue on VIF outbound traffic"""
+ """install Remus plug on VIF outbound traffic"""
self.bufdev = self.pool.get()
devname = self.bufdev.devname
@@ -308,19 +308,19 @@
self.bufdevno = bufdev['index']
self.handle = qdisc.TC_H_ROOT
- self.q = qdisc.QueueQdisc()
+ self.q = qdisc.PlugQdisc()
- if not util.modprobe('sch_queue'):
- raise BufferedNICException('could not load sch_queue module')
+ if not util.modprobe('sch_plug'):
+ raise BufferedNICException('could not load sch_plug module')
def install(self):
devname = self.bufdev.devname
q = self.rth.getqdisc(self.bufdevno)
if q:
- if q['kind'] == 'queue':
+ if q['kind'] == 'plug':
self.installed = True
return
- if q['kind'] != 'pfifo_fast':
+ if q['kind'] not in ('ingress', 'pfifo_fast'):
raise BufferedNICException('there is already a queueing '
'discipline on %s' % devname)
diff --git a/tools/python/xen/remus/qdisc.py b/tools/python/xen/remus/qdisc.py
--- a/tools/python/xen/remus/qdisc.py
+++ b/tools/python/xen/remus/qdisc.py
@@ -146,17 +146,17 @@
qdisc_kinds['cfifo'] = CfifoQdisc
-TC_QUEUE_CHECKPOINT = 0
-TC_QUEUE_RELEASE = 1
+TC_PLUG_CHECKPOINT = 0
+TC_PLUG_RELEASE = 1
-class QueueQdisc(Qdisc):
+class PlugQdisc(Qdisc):
fmt = 'I'
def __init__(self, qdict=None):
if not qdict:
- qdict = {'kind': 'queue',
+ qdict = {'kind': 'plug',
'handle': TC_H_ROOT}
- super(QueueQdisc, self).__init__(qdict)
+ super(PlugQdisc, self).__init__(qdict)
self.action = 0
@@ -169,10 +169,10 @@
arg = args[0]
if arg == 'checkpoint':
- self.action = TC_QUEUE_CHECKPOINT
+ self.action = TC_PLUG_CHECKPOINT
elif arg == 'release':
- self.action = TC_QUEUE_RELEASE
+ self.action = TC_PLUG_RELEASE
else:
raise QdiscException('unknown action')
-qdisc_kinds['queue'] = QueueQdisc
+qdisc_kinds['plug'] = PlugQdisc
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|