Print this page
Support route deletion entries in SVP_R_LOG_ACK.

@@ -313,11 +313,11 @@
  * needs to be processed promptly; however, the information is hopefully going
  * to be relatively infrequent relative to the normal flow of information.
  *
  * The shoot down information needs to be done on a per-backend basis. The
  * general design is that we'll have a single query for this which can fire on a
- * 5-10s period, we randmoize the latter part to give us a bit more load
+ * 5-10s period, we randomize the latter part to give us a bit more load
  * spreading. If we complete because there's no work to do, then we wait the
  * normal period. If we complete, but there's still work to do, we'll go again
  * after a second.
  *
  * A shootdown has a few different parts. We first receive a list of items to

@@ -540,17 +540,30 @@
         libvarpd_plugin_query_reply(svl->svl_u.svl_route.svl_handle,
             VARPD_LOOKUP_OK);
         umem_cache_free(svp_lookup_cache, svl);
 }
 
+/*
+ * Tell the overlay instance to flush out entries matcthing this route.
+ * See libvarpd_route_flush() for more.
+ */
+static void
+svp_route_shootdown_cb(svp_t *svp, uint8_t *srcip, uint8_t *dstip,
+    uint8_t src_prefixlen, uint8_t dst_prefixlen, uint16_t vlan_id)
+{
+        libvarpd_route_flush(svp->svp_hdl, srcip, dstip, src_prefixlen,
+            dst_prefixlen, vlan_id);
+}
+
 static svp_cb_t svp_defops = {
         svp_vl2_lookup_cb,
         svp_vl3_lookup_cb,
         svp_vl2_invalidate_cb,
         svp_vl3_inject_cb,
         svp_shootdown_cb,
         svp_route_lookup_cb,
+        svp_route_shootdown_cb
 };
 
 static boolean_t
 varpd_svp_valid_dest(overlay_plugin_dest_t dest)
 {