Skip to content
Snippets Groups Projects
openvswitch-2.15.0.patch 934 KiB
Newer Older
Louis Abel's avatar
Louis Abel committed
         self.udp_recv.start()
         try:
-            BaseHTTPServer.HTTPServer((self.server_ip, self.server_port),
+            http.server.HTTPServer((self.server_ip, self.server_port),
                     VlanServerHandler).serve_forever()
-        except socket.error, e:
+        except socket.error as e:
             print_safe('Failed to start control server: %s' % e)
             self.udp_recv.stop()
 
         return 1
 
-class VlanServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
+class VlanServerHandler(http.server.BaseHTTPRequestHandler):
     def do_GET(self):
 
         #Guarantee three arguments.
@@ -244,7 +244,7 @@ class VlanClient:
         self.udp_recv       = UDPReceiver(vlan_ip, vlan_port)
 
     def request(self, resource):
-        conn = httplib.HTTPConnection(self.server_ip_port)
+        conn = http.client.HTTPConnection(self.server_ip_port)
         conn.request('GET', resource)
         return conn
 
@@ -256,7 +256,7 @@ class VlanClient:
         try:
             conn = self.request('/start/recv')
             data = conn.getresponse().read()
-        except (socket.error, httplib.HTTPException), e:
+        except (socket.error, http.client.HTTPException) as e:
             error_msg(e)
             return False
 
@@ -277,7 +277,7 @@ class VlanClient:
                 send_packet(test_id, size, ip, port)
                 resp = self.request('/result/%d' % test_id).getresponse()
                 data = resp.read()
-            except (socket.error, httplib.HTTPException), e:
+            except (socket.error, http.client.HTTPException) as e:
                 error_msg(e)
                 return False
 
@@ -302,7 +302,7 @@ class VlanClient:
         try:
             conn    = self.request(resource)
             test_id = conn.getresponse().read()
-        except (socket.error, httplib.HTTPException), e:
+        except (socket.error, http.client.HTTPException) as e:
             error_msg(e)
             return False
 
@@ -335,7 +335,7 @@ class VlanClient:
         try:
             resp = self.request('/ping').getresponse()
             data = resp.read()
-        except (socket.error, httplib.HTTPException), e:
+        except (socket.error, http.client.HTTPException) as e:
             error_msg(e)
             return False
 
@@ -383,7 +383,7 @@ def main():
     try:
         options, args = getopt.gnu_getopt(sys.argv[1:], 'hVs',
                                           ['help', 'version', 'server'])
-    except getopt.GetoptError, geo:
+    except getopt.GetoptError as geo:
         print_safe('%s: %s\n' % (sys.argv[0], geo.msg))
         return 1
 
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 5ed7e82343..ea0630e112 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -3019,9 +3019,9 @@ ofp12_controller_role_to_str(enum ofp12_controller_role role)
     case OFPCR12_ROLE_EQUAL:
         return "other";
     case OFPCR12_ROLE_PRIMARY:
-        return "primary";
+        return "master";
     case OFPCR12_ROLE_SECONDARY:
-        return "secondary";
+        return "slave";
     case OFPCR12_ROLE_NOCHANGE:
     default:
         return NULL;
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index a2ad84edef..d8ea287d5d 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -4660,7 +4660,8 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \
         packets per second the CIR would be set to to to 46000000. This value
         can be broken into '1,000,000 x 46'. Where 1,000,000 is the policing
         rate for the number of packets per second and 46 represents the size
-        of the packet data for a 64 byte ip packet.
+        of the packet data for a 64 bytes IP packet without 14 bytes Ethernet
+        and 4 bytes FCS header.
       </column>
       <column name="other_config" key="cbs" type='{"type": "integer"}'>
         The Committed Burst Size (CBS) is measured in bytes and represents a
@@ -4681,7 +4682,8 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \
         packets per second the EIR would be set to to to 46000000. This value
         can be broken into '1,000,000 x 46'. Where 1,000,000 is the policing
         rate for the number of packets per second and 46 represents the size
-        of the packet data for a 64 byte ip packet.
+        of the packet data for a 64 bytes IP packet without 14 bytes Ethernet
+        and 4 bytes FCS header.
       </column>
       <column name="other_config" key="ebs" type='{"type": "integer"}'>
         The Excess Burst Size (EBS) is measured in bytes and represents a
@@ -6124,6 +6126,15 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \
         True if the datapath supports OVS_ACTION_ATTR_DROP.  If false,
         explicit drop action will not be sent to the datapath.
       </column>
+      <column name="capabilities" key="ct_zero_snat"
+              type='{"type": "boolean"}'>
+        True if the datapath supports all-zero SNAT. This is a special case
+        if the <code>src</code> IP address is configured as all 0's, i.e.,
+        <code>nat(src=0.0.0.0)</code>. In this case, when a source port
+        collision is detected during the commit, the source port will be
+        translated to an ephemeral port. If there is no collision, no SNAT
+        is performed.
+      </column>
     </group>
 
     <group title="Common Columns">