Print this page
Restore SVP_R_ROUTE_REQ, and all that goes with it.
Interpret sl3a_uport == 0 in SVP_R_VL3_ACK to indicate the VL3 IP is a next-hop router.

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/varpd/svp/common/libvarpd_svp.h
          +++ new/usr/src/lib/varpd/svp/common/libvarpd_svp.h
↓ open down ↓ 66 lines elided ↑ open up ↑
  67   67   * as they are rather variable sized data and we don't want to constrain their
  68   68   * size. Instead, the rdata and wdata members must be set appropriately.
  69   69   */
  70   70  typedef union svp_query_data {
  71   71          svp_vl2_req_t   sqd_vl2r;
  72   72          svp_vl2_ack_t   sqd_vl2a;
  73   73          svp_vl3_req_t   sdq_vl3r;
  74   74          svp_vl3_ack_t   sdq_vl3a;
  75   75          svp_log_req_t   sdq_logr;
  76   76          svp_lrm_ack_t   sdq_lrma;
  77      -        svp_rvl3_req_t  sqd_rvl3r;
  78      -        svp_rvl3_ack_t  sqd_rvl3a;
       77 +        svp_route_req_t sqd_rr;
       78 +        svp_route_ack_t sqd_ra;
  79   79  } svp_query_data_t;
  80   80  
  81   81  typedef void (*svp_query_f)(svp_query_t *, void *);
  82   82  
  83   83  typedef enum svp_query_state {
  84   84          SVP_QUERY_INIT          = 0x00,
  85   85          SVP_QUERY_WRITING       = 0x01,
  86   86          SVP_QUERY_READING       = 0x02,
  87   87          SVP_QUERY_FINISHED      = 0x03
  88   88  } svp_query_state_t;
↓ open down ↓ 151 lines elided ↑ open up ↑
 240  240   */
 241  241  typedef void (*svp_vl2_lookup_f)(svp_t *, svp_status_t, const struct in6_addr *,
 242  242      const uint16_t, void *);
 243  243  typedef void (*svp_vl3_lookup_f)(svp_t *, svp_status_t, const uint8_t *,
 244  244      const struct in6_addr *, const uint16_t, void *);
 245  245  typedef void (*svp_vl2_invalidation_f)(svp_t *, const uint8_t *);
 246  246  typedef void (*svp_vl3_inject_f)(svp_t *, const uint16_t,
 247  247      const struct in6_addr *, const uint8_t *, const uint8_t *);
 248  248  typedef void (*svp_shootdown_f)(svp_t *, const uint8_t *,
 249  249      const struct in6_addr *, const uint16_t uport);
 250      -/* XXX KEBE SAYS FILL ME IN! */
 251      -typedef void (*svp_rvl3_lookup_f)(svp_t *, svp_status_t, void *);
      250 +typedef void (*svp_route_lookup_f)(svp_t *, svp_status_t, uint32_t, uint32_t,
      251 +    uint16_t, uint8_t *, uint8_t *, uint16_t, uint8_t *, uint8_t, uint8_t,
      252 +    void *);
 252  253  
 253  254  typedef struct svp_cb {
 254  255          svp_vl2_lookup_f        scb_vl2_lookup;
 255  256          svp_vl3_lookup_f        scb_vl3_lookup;
 256  257          svp_vl2_invalidation_f  scb_vl2_invalidate;
 257  258          svp_vl3_inject_f        scb_vl3_inject;
 258  259          svp_shootdown_f         scb_shootdown;
 259      -        svp_rvl3_lookup_f       scb_rvl3_lookup;
      260 +        svp_route_lookup_f      scb_route_lookup;
 260  261  } svp_cb_t;
 261  262  
 262  263  /*
 263  264   * Core implementation structure.
 264  265   */
 265  266  struct svp {
 266  267          overlay_plugin_dest_t   svp_dest;       /* RO */
 267  268          varpd_provider_handle_t *svp_hdl;       /* RO */
 268  269          svp_cb_t                svp_cb;         /* RO */
 269  270          uint64_t                svp_vid;        /* RO */
 270  271          avl_node_t              svp_rlink;      /* Owned by svp_remote */
 271  272          svp_remote_t            *svp_remote;    /* RO iff started */
 272  273          mutex_t                 svp_lock;
 273  274          char                    *svp_host;      /* svp_lock */
 274  275          uint16_t                svp_port;       /* svp_lock */
 275  276          uint16_t                svp_uport;      /* svp_lock */
 276  277          uint32_t                svp_dcid;       /* svp_lock (but write-once?) */
 277  278          boolean_t               svp_huip;       /* svp_lock */
 278  279          struct in6_addr         svp_uip;        /* svp_lock */
 279      -        struct ether_addr       svp_router_mac; /* svp_lock (but write-once?) */
      280 +        /* NOTE: lower-3 bytes are 0s. */
      281 +        uint8_t         svp_router_oui[6];      /* svp_lock (but write-once?) */
 280  282  };
 281  283  
 282  284  extern bunyan_logger_t *svp_bunyan;
 283  285  
 284  286  extern int svp_remote_find(char *, uint16_t, struct in6_addr *,
 285  287      svp_remote_t **);
 286  288  extern int svp_remote_attach(svp_remote_t *, svp_t *);
 287  289  extern void svp_remote_detach(svp_t *);
 288  290  extern void svp_remote_release(svp_remote_t *);
 289  291  extern void svp_remote_vl3_lookup(svp_t *, svp_query_t *,
 290  292      const struct sockaddr *, void *);
 291  293  extern void svp_remote_vl2_lookup(svp_t *, svp_query_t *, const uint8_t *,
 292  294      void *);
 293      -extern void svp_remote_rvl3_lookup(svp_t *, svp_query_t *,
 294      -    const struct in6_addr *, const struct in6_addr *, uint32_t, uint32_t,
      295 +extern void svp_remote_route_lookup(svp_t *, svp_query_t *,
      296 +    const struct in6_addr *, const struct in6_addr *, uint32_t,
 295  297      uint16_t, void *);
 296  298  
 297  299  
 298  300  /*
 299  301   * Init functions
 300  302   */
 301  303  extern int svp_remote_init(void);
 302  304  extern void svp_remote_fini(void);
 303  305  extern int svp_event_init(void);
 304  306  extern int svp_event_timer_init(svp_event_t *);
↓ open down ↓ 64 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX