Print this page
Version bump SVP to 2

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/varpd/svp/common/libvarpd_svp_prot.h
          +++ new/usr/src/lib/varpd/svp/common/libvarpd_svp_prot.h
↓ open down ↓ 27 lines elided ↑ open up ↑
  28   28  #ifdef __cplusplus
  29   29  extern "C" {
  30   30  #endif
  31   31  
  32   32  /*
  33   33   * SDC VXLAN Protocol Definitions
  34   34   */
  35   35  
  36   36  #define SVP_VERSION_ONE 1
  37   37  #define SVP_VERSION_TWO 2
  38      -/* XXX KEBE SAYS -- we are not yet ready to bump this. */
  39      -#define SVP_CURRENT_VERSION     SVP_VERSION_ONE
       38 +/*
       39 + * Bump this to 2.  Version 1 SVP is a subset of version 2, and can be
       40 + * determined using an SVP_R_PING as part of connection establishment.
       41 + * Version-2 specific changes will be highlighed (look for "v2").
       42 + */
       43 +#define SVP_CURRENT_VERSION     SVP_VERSION_TWO
  40   44  
  41   45  typedef struct svp_req {
  42   46          uint16_t        svp_ver;
  43   47          uint16_t        svp_op;
  44   48          uint32_t        svp_size;
  45   49          uint32_t        svp_id;
  46   50          uint32_t        svp_crc32;
  47   51  } svp_req_t;
  48   52  
       53 +/*
       54 + * Unless specified, all message types function identically between v1 and v2
       55 + * of SVP.
       56 + */
  49   57  typedef enum svp_op {
  50   58          SVP_R_UNKNOWN           = 0x00,
  51   59          SVP_R_PING              = 0x01,
  52   60          SVP_R_PONG              = 0x02,
  53   61          SVP_R_VL2_REQ           = 0x03,
  54   62          SVP_R_VL2_ACK           = 0x04,
  55   63          SVP_R_VL3_REQ           = 0x05,
  56   64          SVP_R_VL3_ACK           = 0x06,
  57   65          SVP_R_BULK_REQ          = 0x07,
  58   66          SVP_R_BULK_ACK          = 0x08,
  59   67          SVP_R_LOG_REQ           = 0x09,
  60   68          SVP_R_LOG_ACK           = 0x0A,
  61      -        SVP_R_LOG_RM            = 0x0B,
  62      -        SVP_R_LOG_RM_ACK        = 0x0C,
       69 +        SVP_R_LOG_RM            = 0x0B, /* v2 introduces new log type */
       70 +        SVP_R_LOG_RM_ACK        = 0x0C, /* See svp_log_route_t */
  63   71          SVP_R_SHOOTDOWN         = 0x0D,
  64      -        SVP_R_ROUTE_REQ         = 0x0E,
  65      -        SVP_R_ROUTE_ACK         = 0x0F
       72 +        SVP_R_ROUTE_REQ         = 0x0E, /* v2 only */
       73 +        SVP_R_ROUTE_ACK         = 0x0F  /* v2 only */
  66   74  } svp_op_t;
  67   75  
  68   76  typedef enum svp_status {
  69   77          SVP_S_OK        = 0x00, /* Everything OK */
  70   78          SVP_S_FATAL     = 0x01, /* Fatal error, close connection */
  71   79          SVP_S_NOTFOUND  = 0x02, /* Entry not found */
  72   80          SVP_S_BADL3TYPE = 0x03, /* Unknown svp_vl3_type_t */
  73   81          SVP_S_BADBULK   = 0x04  /* Unknown svp_bulk_type_t */
  74   82  } svp_status_t;
  75   83  
↓ open down ↓ 91 lines elided ↑ open up ↑
 167  175   * These log entries may be a mixture of both vl2 and vl3 records. The reply is
 168  176   * a stream of bytes after the status message whose length is determined baseed
 169  177   * on the header itself. Each entry begins with a uint32_t that describes its
 170  178   * type and then is followed by the remaining data payload. The next entry
 171  179   * follows immediately which again begins with the uint32_t word that describes
 172  180   * what it should be.
 173  181   */
 174  182  typedef enum svp_log_type {
 175  183          SVP_LOG_VL2     = 0x01,
 176  184          SVP_LOG_VL3     = 0x02,
 177      -        SVP_LOG_ROUTE   = 0x03
      185 +        SVP_LOG_ROUTE   = 0x03  /* v2 only */
 178  186  } svp_log_type_t;
 179  187  
 180  188  typedef struct svp_log_vl2 {
 181  189          uint32_t        svl2_type;      /* Should be SVP_LOG_VL2 */
 182  190          uint8_t         svl2_id[16];    /* 16-byte UUID */
 183  191          uint8_t         svl2_mac[ETHERADDRL];
 184  192          uint8_t         svl2_pad[2];
 185  193          uint32_t        svl2_vnetid;
 186  194  } svp_log_vl2_t;
 187  195  
 188  196  typedef struct svp_log_vl3 {
 189  197          uint32_t        svl3_type;      /* Should be SVP_LOG_VL3 */
 190  198          uint8_t         svl3_id[16];    /* 16-byte UUID */
 191  199          uint8_t         svl3_ip[16];
 192  200          uint8_t         svl3_pad[2];
 193  201          uint16_t        svl3_vlan;
 194  202          uint32_t        svl3_vnetid;
 195  203  } svp_log_vl3_t;
 196  204  
      205 +/*
      206 + * This log entry only appears on v2 connections.
      207 + */
 197  208  typedef struct svp_log_route {
 198  209          uint32_t        svlr_type;      /* Should be SVP_LOG_ROUTE */
 199  210          uint8_t         svlr_id[16];    /* 16-byte UUID */
 200  211          uint32_t        svlr_src_vnetid;        /* Source VXLAN vnetid. */
 201  212          uint32_t        svlr_dst_vnetid;        /* Dest. VXLAN vnetid. */
 202  213          uint32_t        svlr_dcid;      /* Remote/dest Data Center ID. */
 203  214          uint8_t         svlr_srcip[16]; /* Source IP address base. */
 204  215          uint8_t         svlr_dstip[16]; /* Destination IP address base. */
 205  216          uint16_t        svlr_dst_vlan;  /* Source VLAN id. */
 206  217          uint16_t        svlr_src_vlan;  /* Destination VLAN id. */
↓ open down ↓ 41 lines elided ↑ open up ↑
 248  259          uint8_t         svsd_pad[2];
 249  260          uint32_t        svsd_vnetid;
 250  261  } svp_shootdown_t;
 251  262  
 252  263  /*
 253  264   * A route-request (SVP_R_ROUTE_REQ) queries the local SVP server to get a
 254  265   * far-remote (i.e. another Triton Data Center, nee. SDC) SVP server for
 255  266   * far-remote networks.  Modern overlay modules will request IP destinations
 256  267   * for remote-Triton networks, but they must know how to reach the
 257  268   * remote-Triton SVP server.
      269 + *
      270 + * NOTE: SVP_R_ROUTE_{REQ,ACK} are only present in SVP v2.
 258  271   */
 259  272  typedef struct svp_route_req {
 260  273          uint32_t        srr_vnetid;     /* Requester's vnet ID. */
 261  274          uint16_t        srr_vlan;       /* Requester's VLAN ID. */
 262  275          uint16_t        srr_pad;        /* Zero on xmit, ignore on receipt. */
 263  276          uint8_t         srr_srcip[16];  /* VL3 Source IP. */
 264  277          uint8_t         srr_dstip[16];  /* VL3 Destination IP. */
 265  278  } svp_route_req_t;
 266  279  
 267  280  /*
↓ open down ↓ 21 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX