remus: use plug qdisc for network buffering instead of queue

It was renamed in the pvops [kernel] tree.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
Brendan Cully committed 2010-09-07 19:13:55 +01:00
1 parent 08aeb139d2
commit 167c73522e
2 files changed
+16 -16

No files matched your search

+8 -8
View File
@@ -281,12 +281,12 @@ class BufferedNIC(CheckpointedDevice):
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 @@ class BufferedNIC(CheckpointedDevice):
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 @@ class BufferedNIC(CheckpointedDevice):
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)
+8 -8
View File
@@ -146,17 +146,17 @@ class CfifoQdisc(Qdisc):
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 @@ class QueueQdisc(Qdisc):
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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.