Print this page
Version bump SVP to 2

@@ -33,21 +33,29 @@
  * SDC VXLAN Protocol Definitions
  */
 
 #define SVP_VERSION_ONE 1
 #define SVP_VERSION_TWO 2
-/* XXX KEBE SAYS -- we are not yet ready to bump this. */
-#define SVP_CURRENT_VERSION     SVP_VERSION_ONE
+/*
+ * Bump this to 2.  Version 1 SVP is a subset of version 2, and can be
+ * determined using an SVP_R_PING as part of connection establishment.
+ * Version-2 specific changes will be highlighed (look for "v2").
+ */
+#define SVP_CURRENT_VERSION     SVP_VERSION_TWO
 
 typedef struct svp_req {
         uint16_t        svp_ver;
         uint16_t        svp_op;
         uint32_t        svp_size;
         uint32_t        svp_id;
         uint32_t        svp_crc32;
 } svp_req_t;
 
+/*
+ * Unless specified, all message types function identically between v1 and v2
+ * of SVP.
+ */
 typedef enum svp_op {
         SVP_R_UNKNOWN           = 0x00,
         SVP_R_PING              = 0x01,
         SVP_R_PONG              = 0x02,
         SVP_R_VL2_REQ           = 0x03,

@@ -56,15 +64,15 @@
         SVP_R_VL3_ACK           = 0x06,
         SVP_R_BULK_REQ          = 0x07,
         SVP_R_BULK_ACK          = 0x08,
         SVP_R_LOG_REQ           = 0x09,
         SVP_R_LOG_ACK           = 0x0A,
-        SVP_R_LOG_RM            = 0x0B,
-        SVP_R_LOG_RM_ACK        = 0x0C,
+        SVP_R_LOG_RM            = 0x0B, /* v2 introduces new log type */
+        SVP_R_LOG_RM_ACK        = 0x0C, /* See svp_log_route_t */
         SVP_R_SHOOTDOWN         = 0x0D,
-        SVP_R_ROUTE_REQ         = 0x0E,
-        SVP_R_ROUTE_ACK         = 0x0F
+        SVP_R_ROUTE_REQ         = 0x0E, /* v2 only */
+        SVP_R_ROUTE_ACK         = 0x0F  /* v2 only */
 } svp_op_t;
 
 typedef enum svp_status {
         SVP_S_OK        = 0x00, /* Everything OK */
         SVP_S_FATAL     = 0x01, /* Fatal error, close connection */

@@ -172,11 +180,11 @@
  * what it should be.
  */
 typedef enum svp_log_type {
         SVP_LOG_VL2     = 0x01,
         SVP_LOG_VL3     = 0x02,
-        SVP_LOG_ROUTE   = 0x03
+        SVP_LOG_ROUTE   = 0x03  /* v2 only */
 } svp_log_type_t;
 
 typedef struct svp_log_vl2 {
         uint32_t        svl2_type;      /* Should be SVP_LOG_VL2 */
         uint8_t         svl2_id[16];    /* 16-byte UUID */

@@ -192,10 +200,13 @@
         uint8_t         svl3_pad[2];
         uint16_t        svl3_vlan;
         uint32_t        svl3_vnetid;
 } svp_log_vl3_t;
 
+/*
+ * This log entry only appears on v2 connections.
+ */
 typedef struct svp_log_route {
         uint32_t        svlr_type;      /* Should be SVP_LOG_ROUTE */
         uint8_t         svlr_id[16];    /* 16-byte UUID */
         uint32_t        svlr_src_vnetid;        /* Source VXLAN vnetid. */
         uint32_t        svlr_dst_vnetid;        /* Dest. VXLAN vnetid. */

@@ -253,10 +264,12 @@
  * A route-request (SVP_R_ROUTE_REQ) queries the local SVP server to get a
  * far-remote (i.e. another Triton Data Center, nee. SDC) SVP server for
  * far-remote networks.  Modern overlay modules will request IP destinations
  * for remote-Triton networks, but they must know how to reach the
  * remote-Triton SVP server.
+ *
+ * NOTE: SVP_R_ROUTE_{REQ,ACK} are only present in SVP v2.
  */
 typedef struct svp_route_req {
         uint32_t        srr_vnetid;     /* Requester's vnet ID. */
         uint16_t        srr_vlan;       /* Requester's VLAN ID. */
         uint16_t        srr_pad;        /* Zero on xmit, ignore on receipt. */