WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 1 of 2] Remus: use plug qdisc for network buffering i

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1 of 2] Remus: use plug qdisc for network buffering instead of queue
From: Brendan Cully <brendan@xxxxxxxxx>
Date: Fri, 03 Sep 2010 14:29:47 -0700
Delivery-date: Fri, 03 Sep 2010 14:33:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1283549386@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1283549386@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.3+86-e59156a1316f
# 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