Lines Matching refs:addr
32 const unsigned char *addr,
35 const unsigned char *addr, u16 vid);
94 static void fdb_add_hw_addr(struct net_bridge *br, const unsigned char *addr) in fdb_add_hw_addr() argument
103 err = dev_uc_add(p->dev, addr); in fdb_add_hw_addr()
113 dev_uc_del(p->dev, addr); in fdb_add_hw_addr()
122 static void fdb_del_hw_addr(struct net_bridge *br, const unsigned char *addr) in fdb_del_hw_addr() argument
130 dev_uc_del(p->dev, addr); in fdb_del_hw_addr()
145 ether_addr_copy(fdb.addr, f->addr.addr); in fdb_del_external_learn()
152 fdb_del_hw_addr(br, f->addr.addr); in fdb_delete()
167 const unsigned char *addr = f->addr.addr; in fdb_delete_local() local
176 if (op != p && ether_addr_equal(op->dev->dev_addr, addr) && in fdb_delete_local()
187 if (p && ether_addr_equal(br->dev->dev_addr, addr) && in fdb_delete_local()
199 const unsigned char *addr, u16 vid) in br_fdb_find_delete_local() argument
201 struct hlist_head *head = &br->hash[br_mac_hash(addr, vid)]; in br_fdb_find_delete_local()
205 f = fdb_find(head, addr, vid); in br_fdb_find_delete_local()
376 const unsigned char *addr, in __br_fdb_get() argument
382 &br->hash[br_mac_hash(addr, vid)], hlist) { in __br_fdb_get()
383 if (ether_addr_equal(fdb->addr.addr, addr) && in __br_fdb_get()
397 int br_fdb_test_addr(struct net_device *dev, unsigned char *addr) in br_fdb_test_addr() argument
408 fdb = __br_fdb_get(port->br, addr, 0); in br_fdb_test_addr()
450 memcpy(fe->mac_addr, f->addr.addr, ETH_ALEN); in br_fdb_fillbuf()
471 const unsigned char *addr, in fdb_find() argument
477 if (ether_addr_equal(fdb->addr.addr, addr) && in fdb_find()
485 const unsigned char *addr, in fdb_find_rcu() argument
491 if (ether_addr_equal(fdb->addr.addr, addr) && in fdb_find_rcu()
500 const unsigned char *addr, in fdb_create() argument
509 memcpy(fdb->addr.addr, addr, ETH_ALEN); in fdb_create()
523 const unsigned char *addr, u16 vid) in fdb_insert() argument
525 struct hlist_head *head = &br->hash[br_mac_hash(addr, vid)]; in fdb_insert()
528 if (!is_valid_ether_addr(addr)) in fdb_insert()
531 fdb = fdb_find(head, addr, vid); in fdb_insert()
544 fdb = fdb_create(head, source, addr, vid, 1, 1); in fdb_insert()
548 fdb_add_hw_addr(br, addr); in fdb_insert()
555 const unsigned char *addr, u16 vid) in br_fdb_insert() argument
560 ret = fdb_insert(br, source, addr, vid); in br_fdb_insert()
566 const unsigned char *addr, u16 vid, bool added_by_user) in br_fdb_update() argument
568 struct hlist_head *head = &br->hash[br_mac_hash(addr, vid)]; in br_fdb_update()
581 fdb = fdb_find_rcu(head, addr, vid); in br_fdb_update()
603 if (likely(!fdb_find(head, addr, vid))) { in br_fdb_update()
604 fdb = fdb_create(head, source, addr, vid, 0, 0); in br_fdb_update()
653 if (nla_put(skb, NDA_LLADDR, ETH_ALEN, &fdb->addr)) in fdb_fill_info()
769 const __u8 *addr, __u16 state, __u16 flags, __u16 vid) in fdb_add_entry() argument
771 struct hlist_head *head = &br->hash[br_mac_hash(addr, vid)]; in fdb_add_entry()
787 fdb = fdb_find(head, addr, vid); in fdb_add_entry()
792 fdb = fdb_create(head, source, addr, vid, 0, 0); in fdb_add_entry()
812 fdb_add_hw_addr(br, addr); in fdb_add_entry()
818 fdb_add_hw_addr(br, addr); in fdb_add_entry()
824 fdb_del_hw_addr(br, addr); in fdb_add_entry()
842 struct net_bridge_port *p, const unsigned char *addr, in __br_fdb_add() argument
855 br_fdb_update(br, p, addr, vid, true); in __br_fdb_add()
860 err = fdb_add_entry(br, p, addr, ndm->ndm_state, in __br_fdb_add()
871 const unsigned char *addr, u16 vid, u16 nlh_flags) in br_fdb_add() argument
884 if (is_zero_ether_addr(addr)) { in br_fdb_add()
911 err = __br_fdb_add(ndm, br, p, addr, nlh_flags, vid); in br_fdb_add()
913 err = __br_fdb_add(ndm, br, p, addr, nlh_flags, 0); in br_fdb_add()
924 err = __br_fdb_add(ndm, br, p, addr, nlh_flags, v->vid); in br_fdb_add()
934 static int fdb_delete_by_addr(struct net_bridge *br, const u8 *addr, in fdb_delete_by_addr() argument
937 struct hlist_head *head = &br->hash[br_mac_hash(addr, vid)]; in fdb_delete_by_addr()
940 fdb = fdb_find(head, addr, vid); in fdb_delete_by_addr()
949 const unsigned char *addr, u16 vid) in __br_fdb_delete_by_addr() argument
954 err = fdb_delete_by_addr(br, addr, vid); in __br_fdb_delete_by_addr()
961 const u8 *addr, u16 vlan) in fdb_delete_by_addr_and_port() argument
964 struct hlist_head *head = &br->hash[br_mac_hash(addr, vlan)]; in fdb_delete_by_addr_and_port()
967 fdb = fdb_find(head, addr, vlan); in fdb_delete_by_addr_and_port()
976 const unsigned char *addr, u16 vid) in __br_fdb_delete() argument
981 err = fdb_delete_by_addr_and_port(p, addr, vid); in __br_fdb_delete()
990 const unsigned char *addr, u16 vid) in br_fdb_delete() argument
1019 err = __br_fdb_delete_by_addr(br, addr, vid); in br_fdb_delete()
1021 err = __br_fdb_delete(p, addr, vid); in br_fdb_delete()
1025 err = __br_fdb_delete_by_addr(br, addr, 0); in br_fdb_delete()
1027 err &= __br_fdb_delete(p, addr, 0); in br_fdb_delete()
1036 err = __br_fdb_delete_by_addr(br, addr, v->vid); in br_fdb_delete()
1038 err &= __br_fdb_delete(p, addr, v->vid); in br_fdb_delete()
1059 err = dev_uc_add(p->dev, fdb->addr.addr); in br_fdb_sync_static()
1077 dev_uc_del(p->dev, tmp->addr.addr); in br_fdb_sync_static()
1096 dev_uc_del(p->dev, fdb->addr.addr); in br_fdb_unsync_static()
1102 const unsigned char *addr, u16 vid) in br_fdb_external_learn_add() argument
1111 head = &br->hash[br_mac_hash(addr, vid)]; in br_fdb_external_learn_add()
1112 fdb = fdb_find(head, addr, vid); in br_fdb_external_learn_add()
1114 fdb = fdb_create(head, p, addr, vid, 0, 0); in br_fdb_external_learn_add()
1138 const unsigned char *addr, u16 vid) in br_fdb_external_learn_del() argument
1147 head = &br->hash[br_mac_hash(addr, vid)]; in br_fdb_external_learn_del()
1148 fdb = fdb_find(head, addr, vid); in br_fdb_external_learn_del()