Print this page
Support route deletion entries in SVP_R_LOG_ACK.

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/varpd/svp/common/libvarpd_svp.c
          +++ new/usr/src/lib/varpd/svp/common/libvarpd_svp.c
↓ open down ↓ 307 lines elided ↑ open up ↑
 308  308   * Shootdowns
 309  309   * ----------
 310  310   *
 311  311   * As part of the protocol, we need to be able to handle shootdowns that inform
 312  312   * us some of the information in the system is out of date. This information
 313  313   * needs to be processed promptly; however, the information is hopefully going
 314  314   * to be relatively infrequent relative to the normal flow of information.
 315  315   *
 316  316   * The shoot down information needs to be done on a per-backend basis. The
 317  317   * general design is that we'll have a single query for this which can fire on a
 318      - * 5-10s period, we randmoize the latter part to give us a bit more load
      318 + * 5-10s period, we randomize the latter part to give us a bit more load
 319  319   * spreading. If we complete because there's no work to do, then we wait the
 320  320   * normal period. If we complete, but there's still work to do, we'll go again
 321  321   * after a second.
 322  322   *
 323  323   * A shootdown has a few different parts. We first receive a list of items to
 324  324   * shootdown. After performing all of those, we need to acknowledge them. When
 325  325   * that's been done successfully, we can move onto the next part. From a
 326  326   * protocol perspective, we make a SVP_R_LOG_REQ, we get a reply, and then after
 327  327   * processing them, send an SVP_R_LOG_RM. Only once that's been acked do we
 328  328   * continue.
↓ open down ↓ 206 lines elided ↑ open up ↑
 535  535  
 536  536          otm = svl->svl_u.svl_route.svl_mac;
 537  537          otm->otm_dcid = dcid;
 538  538          bcopy(dstmac, otm->otm_mac, ETHERADDRL);
 539  539  
 540  540          libvarpd_plugin_query_reply(svl->svl_u.svl_route.svl_handle,
 541  541              VARPD_LOOKUP_OK);
 542  542          umem_cache_free(svp_lookup_cache, svl);
 543  543  }
 544  544  
      545 +/*
      546 + * Tell the overlay instance to flush out entries matcthing this route.
      547 + * See libvarpd_route_flush() for more.
      548 + */
      549 +static void
      550 +svp_route_shootdown_cb(svp_t *svp, uint8_t *srcip, uint8_t *dstip,
      551 +    uint8_t src_prefixlen, uint8_t dst_prefixlen, uint16_t vlan_id)
      552 +{
      553 +        libvarpd_route_flush(svp->svp_hdl, srcip, dstip, src_prefixlen,
      554 +            dst_prefixlen, vlan_id);
      555 +}
      556 +
 545  557  static svp_cb_t svp_defops = {
 546  558          svp_vl2_lookup_cb,
 547  559          svp_vl3_lookup_cb,
 548  560          svp_vl2_invalidate_cb,
 549  561          svp_vl3_inject_cb,
 550  562          svp_shootdown_cb,
 551  563          svp_route_lookup_cb,
      564 +        svp_route_shootdown_cb
 552  565  };
 553  566  
 554  567  static boolean_t
 555  568  varpd_svp_valid_dest(overlay_plugin_dest_t dest)
 556  569  {
 557  570          if (dest != (OVERLAY_PLUGIN_D_IP | OVERLAY_PLUGIN_D_PORT))
 558  571                  return (B_FALSE);
 559  572  
 560  573          return (B_TRUE);
 561  574  }
↓ open down ↓ 835 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX