• Home
  • Raw
  • Download

Lines Matching refs:entry

106 static inline void lec_arp_hold(struct lec_arp_table *entry)  in lec_arp_hold()  argument
108 refcount_inc(&entry->usage); in lec_arp_hold()
111 static inline void lec_arp_put(struct lec_arp_table *entry) in lec_arp_put() argument
113 if (refcount_dec_and_test(&entry->usage)) in lec_arp_put()
114 kfree(entry); in lec_arp_put()
211 struct lec_arp_table *entry; in lec_start_xmit() local
282 entry = NULL; in lec_start_xmit()
283 vcc = lec_arp_resolve(priv, dst, is_rdesc, &entry); in lec_start_xmit()
285 dev->name, vcc, vcc ? vcc->flags : 0, entry); in lec_start_xmit()
287 if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { in lec_start_xmit()
290 skb_queue_tail(&entry->tx_wait, skb); in lec_start_xmit()
304 while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { in lec_start_xmit()
328 if (entry) in lec_start_xmit()
329 lec_arp_put(entry); in lec_start_xmit()
347 struct lec_arp_table *entry; in lec_atm_send() local
377 entry = lec_arp_find(priv, mesg->content.normal.mac_addr); in lec_atm_send()
378 lec_arp_remove(priv, entry); in lec_atm_send()
616 struct lec_arp_table *entry; in lec_push() local
639 entry = lec_arp_find(priv, src); in lec_push()
640 if (entry && entry->vcc != vcc) { in lec_push()
641 lec_arp_remove(priv, entry); in lec_push()
642 lec_arp_put(entry); in lec_push()
800 static void lec_info(struct seq_file *seq, struct lec_arp_table *entry) in lec_info() argument
805 seq_printf(seq, "%2.2x", entry->mac_addr[i] & 0xff); in lec_info()
808 seq_printf(seq, "%2.2x", entry->atm_addr[i] & 0xff); in lec_info()
809 seq_printf(seq, " %s %4.4x", lec_arp_get_status_string(entry->status), in lec_info()
810 entry->flags & 0xffff); in lec_info()
811 if (entry->vcc) in lec_info()
812 seq_printf(seq, "%3d %3d ", entry->vcc->vpi, entry->vcc->vci); in lec_info()
815 if (entry->recv_vcc) { in lec_info()
816 seq_printf(seq, " %3d %3d", entry->recv_vcc->vpi, in lec_info()
817 entry->recv_vcc->vci); in lec_info()
979 struct lec_arp_table *entry = hlist_entry(state->node, in lec_seq_show() local
984 lec_info(seq, entry); in lec_seq_show()
1177 struct lec_arp_table *entry = lec_arp_find(priv, mac_addr); in lane2_associate_ind()
1179 if (entry == NULL) in lane2_associate_ind()
1182 kfree(entry->tlvs); in lane2_associate_ind()
1184 entry->tlvs = kmemdup(tlvs, sizeoftlvs, GFP_KERNEL); in lane2_associate_ind()
1185 if (entry->tlvs == NULL) in lane2_associate_ind()
1187 entry->sizeoftlvs = sizeoftlvs; in lane2_associate_ind()
1255 static void lec_arp_clear_vccs(struct lec_arp_table *entry) in lec_arp_clear_vccs() argument
1257 if (entry->vcc) { in lec_arp_clear_vccs()
1258 struct atm_vcc *vcc = entry->vcc; in lec_arp_clear_vccs()
1267 vcc->push = entry->old_push; in lec_arp_clear_vccs()
1269 entry->vcc = NULL; in lec_arp_clear_vccs()
1271 if (entry->recv_vcc) { in lec_arp_clear_vccs()
1272 entry->recv_vcc->push = entry->old_recv_push; in lec_arp_clear_vccs()
1273 vcc_release_async(entry->recv_vcc, -EPIPE); in lec_arp_clear_vccs()
1274 entry->recv_vcc = NULL; in lec_arp_clear_vccs()
1283 lec_arp_add(struct lec_priv *priv, struct lec_arp_table *entry) in lec_arp_add() argument
1287 tmp = &priv->lec_arp_tables[HASH(entry->mac_addr[ETH_ALEN - 1])]; in lec_arp_add()
1288 hlist_add_head(&entry->next, tmp); in lec_arp_add()
1290 pr_debug("Added entry:%pM\n", entry->mac_addr); in lec_arp_add()
1299 struct lec_arp_table *entry; in lec_arp_remove() local
1317 hlist_for_each_entry(entry, in lec_arp_remove()
1320 entry->atm_addr, ATM_ESA_LEN) == 0) { in lec_arp_remove()
1478 struct lec_arp_table *entry; in lec_arp_destroy() local
1489 hlist_for_each_entry_safe(entry, next, in lec_arp_destroy()
1491 lec_arp_remove(priv, entry); in lec_arp_destroy()
1492 lec_arp_put(entry); in lec_arp_destroy()
1497 hlist_for_each_entry_safe(entry, next, in lec_arp_destroy()
1499 del_timer_sync(&entry->timer); in lec_arp_destroy()
1500 lec_arp_clear_vccs(entry); in lec_arp_destroy()
1501 hlist_del(&entry->next); in lec_arp_destroy()
1502 lec_arp_put(entry); in lec_arp_destroy()
1506 hlist_for_each_entry_safe(entry, next, in lec_arp_destroy()
1508 del_timer_sync(&entry->timer); in lec_arp_destroy()
1509 lec_arp_clear_vccs(entry); in lec_arp_destroy()
1510 hlist_del(&entry->next); in lec_arp_destroy()
1511 lec_arp_put(entry); in lec_arp_destroy()
1515 hlist_for_each_entry_safe(entry, next, &priv->mcast_fwds, next) { in lec_arp_destroy()
1517 lec_arp_clear_vccs(entry); in lec_arp_destroy()
1518 hlist_del(&entry->next); in lec_arp_destroy()
1519 lec_arp_put(entry); in lec_arp_destroy()
1533 struct lec_arp_table *entry; in lec_arp_find() local
1538 hlist_for_each_entry(entry, head, next) { in lec_arp_find()
1539 if (ether_addr_equal(mac_addr, entry->mac_addr)) in lec_arp_find()
1540 return entry; in lec_arp_find()
1568 struct lec_arp_table *entry; in lec_arp_expire_arp() local
1570 entry = from_timer(entry, t, timer); in lec_arp_expire_arp()
1573 if (entry->status == ESI_ARP_PENDING) { in lec_arp_expire_arp()
1574 if (entry->no_tries <= entry->priv->max_retry_count) { in lec_arp_expire_arp()
1575 if (entry->is_rdesc) in lec_arp_expire_arp()
1576 send_to_lecd(entry->priv, l_rdesc_arp_xmt, in lec_arp_expire_arp()
1577 entry->mac_addr, NULL, NULL); in lec_arp_expire_arp()
1579 send_to_lecd(entry->priv, l_arp_xmt, in lec_arp_expire_arp()
1580 entry->mac_addr, NULL, NULL); in lec_arp_expire_arp()
1581 entry->no_tries++; in lec_arp_expire_arp()
1583 mod_timer(&entry->timer, jiffies + (1 * HZ)); in lec_arp_expire_arp()
1609 static bool __lec_arp_check_expire(struct lec_arp_table *entry, in __lec_arp_check_expire() argument
1615 if ((entry->flags) & LEC_REMOTE_FLAG && priv->topology_change) in __lec_arp_check_expire()
1621 now, entry->last_used, time_to_check); in __lec_arp_check_expire()
1622 if (time_after(now, entry->last_used + time_to_check) && in __lec_arp_check_expire()
1623 !(entry->flags & LEC_PERMANENT_FLAG) && in __lec_arp_check_expire()
1624 !(entry->mac_addr[0] & 0x01)) { /* LANE2: 7.1.20 */ in __lec_arp_check_expire()
1627 lec_arp_remove(priv, entry); in __lec_arp_check_expire()
1628 lec_arp_put(entry); in __lec_arp_check_expire()
1631 if ((entry->status == ESI_VC_PENDING || in __lec_arp_check_expire()
1632 entry->status == ESI_ARP_PENDING) && in __lec_arp_check_expire()
1633 time_after_eq(now, entry->timestamp + in __lec_arp_check_expire()
1635 entry->timestamp = jiffies; in __lec_arp_check_expire()
1636 entry->packets_flooded = 0; in __lec_arp_check_expire()
1637 if (entry->status == ESI_VC_PENDING) in __lec_arp_check_expire()
1639 entry->mac_addr, in __lec_arp_check_expire()
1640 entry->atm_addr, in __lec_arp_check_expire()
1643 if (entry->status == ESI_FLUSH_PENDING && in __lec_arp_check_expire()
1644 time_after_eq(now, entry->timestamp + in __lec_arp_check_expire()
1646 lec_arp_hold(entry); in __lec_arp_check_expire()
1675 struct lec_arp_table *entry; in lec_arp_check_expire() local
1684 hlist_for_each_entry_safe(entry, next, in lec_arp_check_expire()
1686 if (__lec_arp_check_expire(entry, now, priv)) { in lec_arp_check_expire()
1688 struct atm_vcc *vcc = entry->vcc; in lec_arp_check_expire()
1692 while ((skb = skb_dequeue(&entry->tx_wait))) in lec_arp_check_expire()
1694 entry->last_used = jiffies; in lec_arp_check_expire()
1695 entry->status = ESI_FORWARD_DIRECT; in lec_arp_check_expire()
1696 lec_arp_put(entry); in lec_arp_check_expire()
1717 struct lec_arp_table *entry; in lec_arp_resolve() local
1734 entry = lec_arp_find(priv, mac_to_find); in lec_arp_resolve()
1736 if (entry) { in lec_arp_resolve()
1737 if (entry->status == ESI_FORWARD_DIRECT) { in lec_arp_resolve()
1739 entry->last_used = jiffies; in lec_arp_resolve()
1740 lec_arp_hold(entry); in lec_arp_resolve()
1741 *ret_entry = entry; in lec_arp_resolve()
1742 found = entry->vcc; in lec_arp_resolve()
1749 if (entry->status == ESI_ARP_PENDING) in lec_arp_resolve()
1750 entry->no_tries = 0; in lec_arp_resolve()
1757 if (entry->status != ESI_FLUSH_PENDING && in lec_arp_resolve()
1758 entry->packets_flooded < in lec_arp_resolve()
1760 entry->packets_flooded++; in lec_arp_resolve()
1770 lec_arp_hold(entry); in lec_arp_resolve()
1771 *ret_entry = entry; in lec_arp_resolve()
1772 pr_debug("entry->status %d entry->vcc %p\n", entry->status, in lec_arp_resolve()
1773 entry->vcc); in lec_arp_resolve()
1777 entry = make_entry(priv, mac_to_find); in lec_arp_resolve()
1779 if (!entry) { in lec_arp_resolve()
1783 lec_arp_add(priv, entry); in lec_arp_resolve()
1785 entry->packets_flooded = 1; in lec_arp_resolve()
1786 entry->status = ESI_ARP_PENDING; in lec_arp_resolve()
1787 entry->no_tries = 1; in lec_arp_resolve()
1788 entry->last_used = entry->timestamp = jiffies; in lec_arp_resolve()
1789 entry->is_rdesc = is_rdesc; in lec_arp_resolve()
1790 if (entry->is_rdesc) in lec_arp_resolve()
1795 entry->timer.expires = jiffies + (1 * HZ); in lec_arp_resolve()
1796 entry->timer.function = lec_arp_expire_arp; in lec_arp_resolve()
1797 add_timer(&entry->timer); in lec_arp_resolve()
1812 struct lec_arp_table *entry; in lec_addr_delete() local
1818 hlist_for_each_entry_safe(entry, next, in lec_addr_delete()
1820 if (!memcmp(atm_addr, entry->atm_addr, ATM_ESA_LEN) && in lec_addr_delete()
1822 !(entry->flags & LEC_PERMANENT_FLAG))) { in lec_addr_delete()
1823 lec_arp_remove(priv, entry); in lec_addr_delete()
1824 lec_arp_put(entry); in lec_addr_delete()
1844 struct lec_arp_table *entry, *tmp; in lec_arp_update() local
1851 entry = lec_arp_find(priv, mac_addr); in lec_arp_update()
1852 if (entry == NULL && targetless_le_arp) in lec_arp_update()
1858 hlist_for_each_entry_safe(entry, next, in lec_arp_update()
1860 if (memcmp(entry->atm_addr, atm_addr, ATM_ESA_LEN) == 0) { in lec_arp_update()
1861 hlist_del(&entry->next); in lec_arp_update()
1862 del_timer(&entry->timer); in lec_arp_update()
1868 tmp->vcc = entry->vcc; in lec_arp_update()
1869 tmp->old_push = entry->old_push; in lec_arp_update()
1871 del_timer(&entry->timer); in lec_arp_update()
1872 lec_arp_put(entry); in lec_arp_update()
1873 entry = tmp; in lec_arp_update()
1875 entry->status = ESI_FORWARD_DIRECT; in lec_arp_update()
1876 ether_addr_copy(entry->mac_addr, in lec_arp_update()
1878 entry->last_used = jiffies; in lec_arp_update()
1879 lec_arp_add(priv, entry); in lec_arp_update()
1882 entry->flags |= LEC_REMOTE_FLAG; in lec_arp_update()
1884 entry->flags &= ~LEC_REMOTE_FLAG; in lec_arp_update()
1892 entry = lec_arp_find(priv, mac_addr); in lec_arp_update()
1893 if (!entry) { in lec_arp_update()
1894 entry = make_entry(priv, mac_addr); in lec_arp_update()
1895 if (!entry) in lec_arp_update()
1897 entry->status = ESI_UNKNOWN; in lec_arp_update()
1898 lec_arp_add(priv, entry); in lec_arp_update()
1901 memcpy(entry->atm_addr, atm_addr, ATM_ESA_LEN); in lec_arp_update()
1902 del_timer(&entry->timer); in lec_arp_update()
1906 if (entry != tmp && in lec_arp_update()
1914 entry->vcc = tmp->vcc; in lec_arp_update()
1915 entry->old_push = tmp->old_push; in lec_arp_update()
1917 entry->status = tmp->status; in lec_arp_update()
1923 entry->flags |= LEC_REMOTE_FLAG; in lec_arp_update()
1925 entry->flags &= ~LEC_REMOTE_FLAG; in lec_arp_update()
1926 if (entry->status == ESI_ARP_PENDING || entry->status == ESI_UNKNOWN) { in lec_arp_update()
1927 entry->status = ESI_VC_PENDING; in lec_arp_update()
1928 send_to_lecd(priv, l_svc_setup, entry->mac_addr, atm_addr, NULL); in lec_arp_update()
1945 struct lec_arp_table *entry; in lec_vcc_added() local
1953 entry = lec_arp_find(priv, bus_mac); in lec_vcc_added()
1954 if (!entry) { in lec_vcc_added()
1958 memcpy(entry->atm_addr, ioc_data->atm_addr, ATM_ESA_LEN); in lec_vcc_added()
1959 entry->recv_vcc = vcc; in lec_vcc_added()
1960 entry->old_recv_push = old_push; in lec_vcc_added()
1962 entry = make_entry(priv, bus_mac); in lec_vcc_added()
1963 if (entry == NULL) in lec_vcc_added()
1965 del_timer(&entry->timer); in lec_vcc_added()
1966 memcpy(entry->atm_addr, ioc_data->atm_addr, ATM_ESA_LEN); in lec_vcc_added()
1967 entry->recv_vcc = vcc; in lec_vcc_added()
1968 entry->old_recv_push = old_push; in lec_vcc_added()
1969 hlist_add_head(&entry->next, &priv->mcast_fwds); in lec_vcc_added()
1987 entry = make_entry(priv, bus_mac); in lec_vcc_added()
1988 if (entry == NULL) in lec_vcc_added()
1990 memcpy(entry->atm_addr, ioc_data->atm_addr, ATM_ESA_LEN); in lec_vcc_added()
1991 eth_zero_addr(entry->mac_addr); in lec_vcc_added()
1992 entry->recv_vcc = vcc; in lec_vcc_added()
1993 entry->old_recv_push = old_push; in lec_vcc_added()
1994 entry->status = ESI_UNKNOWN; in lec_vcc_added()
1995 entry->timer.expires = jiffies + priv->vcc_timeout_period; in lec_vcc_added()
1996 entry->timer.function = lec_arp_expire_vcc; in lec_vcc_added()
1997 hlist_add_head(&entry->next, &priv->lec_no_forward); in lec_vcc_added()
1998 add_timer(&entry->timer); in lec_vcc_added()
2014 hlist_for_each_entry(entry, in lec_vcc_added()
2017 (ioc_data->atm_addr, entry->atm_addr, in lec_vcc_added()
2021 entry->vcc ? entry->vcc->vci : 0, in lec_vcc_added()
2022 entry->recv_vcc ? entry->recv_vcc-> in lec_vcc_added()
2025 del_timer(&entry->timer); in lec_vcc_added()
2026 entry->vcc = vcc; in lec_vcc_added()
2027 entry->old_push = old_push; in lec_vcc_added()
2028 if (entry->status == ESI_VC_PENDING) { in lec_vcc_added()
2031 entry->status = in lec_vcc_added()
2034 entry->timestamp = jiffies; in lec_vcc_added()
2035 entry->status = in lec_vcc_added()
2040 entry->atm_addr, in lec_vcc_added()
2070 entry = make_entry(priv, bus_mac); in lec_vcc_added()
2071 if (!entry) in lec_vcc_added()
2073 entry->vcc = vcc; in lec_vcc_added()
2074 entry->old_push = old_push; in lec_vcc_added()
2075 memcpy(entry->atm_addr, ioc_data->atm_addr, ATM_ESA_LEN); in lec_vcc_added()
2076 eth_zero_addr(entry->mac_addr); in lec_vcc_added()
2077 entry->status = ESI_UNKNOWN; in lec_vcc_added()
2078 hlist_add_head(&entry->next, &priv->lec_arp_empty_ones); in lec_vcc_added()
2079 entry->timer.expires = jiffies + priv->vcc_timeout_period; in lec_vcc_added()
2080 entry->timer.function = lec_arp_expire_vcc; in lec_vcc_added()
2081 add_timer(&entry->timer); in lec_vcc_added()
2091 struct lec_arp_table *entry; in lec_flush_complete() local
2098 hlist_for_each_entry(entry, in lec_flush_complete()
2100 if (entry->flush_tran_id == tran_id && in lec_flush_complete()
2101 entry->status == ESI_FLUSH_PENDING) { in lec_flush_complete()
2103 struct atm_vcc *vcc = entry->vcc; in lec_flush_complete()
2105 lec_arp_hold(entry); in lec_flush_complete()
2108 while ((skb = skb_dequeue(&entry->tx_wait))) in lec_flush_complete()
2110 entry->last_used = jiffies; in lec_flush_complete()
2111 entry->status = ESI_FORWARD_DIRECT; in lec_flush_complete()
2112 lec_arp_put(entry); in lec_flush_complete()
2127 struct lec_arp_table *entry; in lec_set_flush_tran_id() local
2132 hlist_for_each_entry(entry, in lec_set_flush_tran_id()
2134 if (!memcmp(atm_addr, entry->atm_addr, ATM_ESA_LEN)) { in lec_set_flush_tran_id()
2135 entry->flush_tran_id = tran_id; in lec_set_flush_tran_id()
2137 tran_id, entry); in lec_set_flush_tran_id()
2185 struct lec_arp_table *entry; in lec_vcc_close() local
2194 hlist_for_each_entry_safe(entry, next, in lec_vcc_close()
2196 if (vcc == entry->vcc) { in lec_vcc_close()
2197 lec_arp_remove(priv, entry); in lec_vcc_close()
2198 lec_arp_put(entry); in lec_vcc_close()
2205 hlist_for_each_entry_safe(entry, next, in lec_vcc_close()
2207 if (entry->vcc == vcc) { in lec_vcc_close()
2208 lec_arp_clear_vccs(entry); in lec_vcc_close()
2209 del_timer(&entry->timer); in lec_vcc_close()
2210 hlist_del(&entry->next); in lec_vcc_close()
2211 lec_arp_put(entry); in lec_vcc_close()
2215 hlist_for_each_entry_safe(entry, next, in lec_vcc_close()
2217 if (entry->recv_vcc == vcc) { in lec_vcc_close()
2218 lec_arp_clear_vccs(entry); in lec_vcc_close()
2219 del_timer(&entry->timer); in lec_vcc_close()
2220 hlist_del(&entry->next); in lec_vcc_close()
2221 lec_arp_put(entry); in lec_vcc_close()
2225 hlist_for_each_entry_safe(entry, next, &priv->mcast_fwds, next) { in lec_vcc_close()
2226 if (entry->recv_vcc == vcc) { in lec_vcc_close()
2227 lec_arp_clear_vccs(entry); in lec_vcc_close()
2229 hlist_del(&entry->next); in lec_vcc_close()
2230 lec_arp_put(entry); in lec_vcc_close()
2244 struct lec_arp_table *entry, *tmp; in lec_arp_check_empties() local
2249 hlist_for_each_entry_safe(entry, next, in lec_arp_check_empties()
2251 if (vcc == entry->vcc) { in lec_arp_check_empties()
2252 del_timer(&entry->timer); in lec_arp_check_empties()
2253 ether_addr_copy(entry->mac_addr, src); in lec_arp_check_empties()
2254 entry->status = ESI_FORWARD_DIRECT; in lec_arp_check_empties()
2255 entry->last_used = jiffies; in lec_arp_check_empties()
2262 hlist_del(&entry->next); in lec_arp_check_empties()
2263 lec_arp_add(priv, entry); in lec_arp_check_empties()