Print this page
Support route deletion entries in SVP_R_LOG_ACK.

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/varpd/libvarpd/common/libvarpd_overlay.c
          +++ new/usr/src/lib/varpd/libvarpd/common/libvarpd_overlay.c
↓ open down ↓ 554 lines elided ↑ open up ↑
 555  555                  case ENOTSUP:
 556  556                          libvarpd_panic("received bad errno from "
 557  557                              "OVERLAY_TARG_CACHE_SET: %d", errno);
 558  558                  default:
 559  559                          break;
 560  560                  }
 561  561          }
 562  562  }
 563  563  
 564  564  void
      565 +libvarpd_route_flush(varpd_provider_handle_t *vph, uint8_t *srcip,
      566 +    uint8_t *dstip, uint8_t src_prefixlen, uint8_t dst_prefixlen,
      567 +    uint16_t vlan_id)
      568 +{
      569 +        varpd_instance_t *inst = (varpd_instance_t *)vph;
      570 +        varpd_impl_t *vip = inst->vri_impl;
      571 +        overlay_targ_cache_net_t otcn;
      572 +        overlay_targ_cache_net_entry_t *otcne;
      573 +        int ret;
      574 +
      575 +        otcn.otcn_linkid = inst->vri_linkid;
      576 +        otcne = &otcn.otcn_entry;
      577 +        bcopy(srcip, &otcne->otcne_src, sizeof (in6_addr_t));
      578 +        bcopy(dstip, &otcne->otcne_dst, sizeof (in6_addr_t));
      579 +        otcne->otcne_vlan = vlan_id;
      580 +        otcne->otcne_src_prefixlen = src_prefixlen;
      581 +        otcne->otcne_dst_prefixlen = dst_prefixlen;
      582 +
      583 +        ret = ioctl(vip->vdi_overlayfd, OVERLAY_TARG_CACHE_REMOVE_NET, &otcn);
      584 +        if (ret != 0) {
      585 +                /* XXX KEBE ASKS, any harmless error cases? */
      586 +                libvarpd_panic("received bad errno from "
      587 +                    "OVERLAY_TARG_CACHE_REMOVE_NET: %d - %s", errno,
      588 +                    strerror(errno));
      589 +        }
      590 +}
      591 +
      592 +void
 565  593  libvarpd_fma_degrade(varpd_provider_handle_t *vph, const char *msg)
 566  594  {
 567  595          int ret;
 568  596          varpd_instance_t *inst = (varpd_instance_t *)vph;
 569  597  
 570  598          ret = libvarpd_overlay_degrade(inst, msg);
 571  599          switch (ret) {
 572  600          case ENOENT:
 573  601          case EFAULT:
 574  602                  libvarpd_panic("received bad errno from degrade ioctl: %d",
↓ open down ↓ 22 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX