[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] remus: use plug qdisc for network buffering instead of queue



# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1283883235 -3600
# Node ID ff512bceb394e7f854b4b9b9f7404e587543eca7
# Parent  7fddb93779f78afb010f5f8f46c0d74c0be80824
remus: use plug qdisc for network buffering instead of queue

It was renamed in the pvops [kernel] tree.

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/python/xen/remus/device.py |   18 +++++++++---------
 tools/python/xen/remus/qdisc.py  |   16 ++++++++--------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff -r 7fddb93779f7 -r ff512bceb394 tools/python/xen/remus/device.py
--- a/tools/python/xen/remus/device.py  Tue Sep 07 19:13:01 2010 +0100
+++ b/tools/python/xen/remus/device.py  Tue Sep 07 19:13:55 2010 +0100
@@ -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()
-
-        if not util.modprobe('sch_queue'):
-            raise BufferedNICException('could not load sch_queue module')
+        self.q = qdisc.PlugQdisc()
+
+        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 -r 7fddb93779f7 -r ff512bceb394 tools/python/xen/remus/qdisc.py
--- a/tools/python/xen/remus/qdisc.py   Tue Sep 07 19:13:01 2010 +0100
+++ b/tools/python/xen/remus/qdisc.py   Tue Sep 07 19:13:55 2010 +0100
@@ -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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.