Lines Matching full:fe

605 	struct vxlan_ftable_entry *fe, *tfe;
609 LIST_FOREACH_SAFE(fe, &sc->vxl_ftable[i], vxlfe_hash, tfe) {
610 if (all || VXLAN_FE_IS_DYNAMIC(fe))
611 vxlan_ftable_entry_destroy(sc, fe);
619 struct vxlan_ftable_entry *fe, *tfe;
625 LIST_FOREACH_SAFE(fe, &sc->vxl_ftable[i], vxlfe_hash, tfe) {
626 if (VXLAN_FE_IS_DYNAMIC(fe) &&
627 time_uptime >= fe->vxlfe_expire)
628 vxlan_ftable_entry_destroy(sc, fe);
638 struct vxlan_ftable_entry *fe;
649 fe = vxlan_ftable_entry_lookup(sc, mac);
650 if (fe != NULL) {
651 fe->vxlfe_expire = time_uptime + sc->vxl_ftable_timeout;
653 if (!VXLAN_FE_IS_DYNAMIC(fe) ||
654 vxlan_sockaddr_in_equal(&fe->vxlfe_raddr, &vxlsa->sa))
662 vxlan_sockaddr_in_copy(&fe->vxlfe_raddr, &vxlsa->sa);
678 fe = vxlan_ftable_entry_alloc();
679 if (fe == NULL)
682 vxlan_ftable_entry_init(sc, fe, mac, &vxlsa->sa, VXLAN_FE_FLAG_DYNAMIC);
685 error = vxlan_ftable_entry_insert(sc, fe);
725 struct vxlan_ftable_entry *fe;
742 LIST_FOREACH(fe, &sc->vxl_ftable[i], vxlfe_hash) {
745 vxlan_ftable_entry_dump(fe, &sb);
763 struct vxlan_ftable_entry *fe;
765 fe = malloc(sizeof(*fe), M_VXLAN, M_ZERO | M_NOWAIT);
767 return (fe);
771 vxlan_ftable_entry_free(struct vxlan_ftable_entry *fe)
774 free(fe, M_VXLAN);
778 vxlan_ftable_entry_init(struct vxlan_softc *sc, struct vxlan_ftable_entry *fe,
782 fe->vxlfe_flags = flags;
783 fe->vxlfe_expire = time_uptime + sc->vxl_ftable_timeout;
784 memcpy(fe->vxlfe_mac, mac, ETHER_ADDR_LEN);
785 vxlan_sockaddr_copy(&fe->vxlfe_raddr, sa);
790 struct vxlan_ftable_entry *fe)
794 LIST_REMOVE(fe, vxlfe_hash);
795 vxlan_ftable_entry_free(fe);
800 struct vxlan_ftable_entry *fe)
807 hash = VXLAN_SC_FTABLE_HASH(sc, fe->vxlfe_mac);
811 LIST_INSERT_HEAD(&sc->vxl_ftable[hash], fe, vxlfe_hash);
816 dir = vxlan_ftable_addr_cmp(fe->vxlfe_mac, lfe->vxlfe_mac);
820 LIST_INSERT_BEFORE(lfe, fe, vxlfe_hash);
823 LIST_INSERT_AFTER(lfe, fe, vxlfe_hash);
838 struct vxlan_ftable_entry *fe;
845 LIST_FOREACH(fe, &sc->vxl_ftable[hash], vxlfe_hash) {
846 dir = vxlan_ftable_addr_cmp(mac, fe->vxlfe_mac);
848 return (fe);
857 vxlan_ftable_entry_dump(struct vxlan_ftable_entry *fe, struct sbuf *sb)
864 sa = &fe->vxlfe_raddr;
868 sbuf_printf(sb, "%c 0x%02X ", VXLAN_FE_IS_DYNAMIC(fe) ? 'D' : 'S',
869 fe->vxlfe_flags);
872 sbuf_printf(sb, "%02X:", fe->vxlfe_mac[i]);
873 sbuf_printf(sb, "%02X ", fe->vxlfe_mac[i]);
885 sbuf_printf(sb, "%08jd", (intmax_t)fe->vxlfe_expire);
2216 struct vxlan_ftable_entry *fe;
2238 fe = vxlan_ftable_entry_alloc();
2239 if (fe == NULL)
2245 vxlan_ftable_entry_init(sc, fe, cmd->vxlcmd_mac, &vxlsa.sa,
2249 error = vxlan_ftable_entry_insert(sc, fe);
2253 vxlan_ftable_entry_free(fe);
2262 struct vxlan_ftable_entry *fe;
2268 fe = vxlan_ftable_entry_lookup(sc, cmd->vxlcmd_mac);
2269 if (fe != NULL) {
2270 vxlan_ftable_entry_destroy(sc, fe);
2746 struct vxlan_ftable_entry *fe;
2753 fe = NULL;
2774 fe = vxlan_ftable_entry_lookup(sc, eh->ether_dhost);
2775 if (fe == NULL)
2776 fe = &sc->vxl_default_fe;
2777 vxlan_sockaddr_copy(&vxlsa, &fe->vxlfe_raddr.sa);