Lines Matching refs:entries
68 table->entries[i] = 0; in mlx4_init_mac_table()
82 table->entries[i] = 0; in mlx4_init_vlan_table()
105 if (index < 0 || index >= table->max || !table->entries[index]) { in validate_index()
120 (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) in find_index()
128 __be64 *entries) in mlx4_set_port_mac_table() argument
138 memcpy(mailbox->buf, entries, MLX4_MAC_TABLE_SIZE); in mlx4_set_port_mac_table()
160 if (mac == (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) { in mlx4_find_cached_mac()
216 if (((MLX4_MAC_MASK & mac) == (MLX4_MAC_MASK & be64_to_cpu(table->entries[i])))) in __mlx4_register_mac()
218 if (((MLX4_MAC_MASK & mac) == (MLX4_MAC_MASK & be64_to_cpu(dup_table->entries[i])))) in __mlx4_register_mac()
243 ((MLX4_MAC_MASK & mac) == (MLX4_MAC_MASK & be64_to_cpu(table->entries[index_at_dup_port])))) in __mlx4_register_mac()
262 (MLX4_MAC_MASK & be64_to_cpu(table->entries[i]))) { in __mlx4_register_mac()
267 u64 dup_mac = MLX4_MAC_MASK & be64_to_cpu(dup_table->entries[i]); in __mlx4_register_mac()
299 table->entries[free] = cpu_to_be64(mac | MLX4_MAC_VALID); in __mlx4_register_mac()
301 err = mlx4_set_port_mac_table(dev, port, table->entries); in __mlx4_register_mac()
305 table->entries[free] = 0; in __mlx4_register_mac()
314 dup_table->entries[free] = cpu_to_be64(mac | MLX4_MAC_VALID); in __mlx4_register_mac()
316 err = mlx4_set_port_mac_table(dev, dup_port, dup_table->entries); in __mlx4_register_mac()
320 dup_table->entries[free] = 0; in __mlx4_register_mac()
420 table->entries[index] = 0; in __mlx4_unregister_mac()
421 if (mlx4_set_port_mac_table(dev, port, table->entries)) in __mlx4_unregister_mac()
429 dup_table->entries[index] = 0; in __mlx4_unregister_mac()
430 if (mlx4_set_port_mac_table(dev, dup_port, dup_table->entries)) in __mlx4_unregister_mac()
501 table->entries[index] = cpu_to_be64(new_mac | MLX4_MAC_VALID); in __mlx4_replace_mac()
503 err = mlx4_set_port_mac_table(dev, port, table->entries); in __mlx4_replace_mac()
507 table->entries[index] = 0; in __mlx4_replace_mac()
510 dup_table->entries[index] = cpu_to_be64(new_mac | MLX4_MAC_VALID); in __mlx4_replace_mac()
512 err = mlx4_set_port_mac_table(dev, dup_port, dup_table->entries); in __mlx4_replace_mac()
516 dup_table->entries[index] = 0; in __mlx4_replace_mac()
537 __be32 *entries) in mlx4_set_port_vlan_table() argument
547 memcpy(mailbox->buf, entries, MLX4_VLAN_TABLE_SIZE); in mlx4_set_port_vlan_table()
566 be32_to_cpu(table->entries[i])))) { in mlx4_find_cached_vlan()
617 if (vlan == (MLX4_VLAN_MASK & be32_to_cpu(table->entries[i]))) in __mlx4_register_vlan()
619 if (vlan == (MLX4_VLAN_MASK & be32_to_cpu(dup_table->entries[i]))) in __mlx4_register_vlan()
643 (vlan == (MLX4_VLAN_MASK & be32_to_cpu(dup_table->entries[index_at_dup_port])))) in __mlx4_register_vlan()
662 be32_to_cpu(table->entries[i])))) { in __mlx4_register_vlan()
668 u16 dup_vlan = MLX4_VLAN_MASK & be32_to_cpu(dup_table->entries[i]); in __mlx4_register_vlan()
699 table->entries[free] = cpu_to_be32(vlan | MLX4_VLAN_VALID); in __mlx4_register_vlan()
701 err = mlx4_set_port_vlan_table(dev, port, table->entries); in __mlx4_register_vlan()
705 table->entries[free] = 0; in __mlx4_register_vlan()
712 dup_table->entries[free] = cpu_to_be32(vlan | MLX4_VLAN_VALID); in __mlx4_register_vlan()
714 err = mlx4_set_port_vlan_table(dev, dup_port, dup_table->entries); in __mlx4_register_vlan()
718 dup_table->entries[free] = 0; in __mlx4_register_vlan()
799 table->entries[index] = 0; in __mlx4_unregister_vlan()
800 if (mlx4_set_port_vlan_table(dev, port, table->entries)) in __mlx4_unregister_vlan()
807 dup_table->entries[index] = 0; in __mlx4_unregister_vlan()
808 if (mlx4_set_port_vlan_table(dev, dup_port, dup_table->entries)) in __mlx4_unregister_vlan()
854 if ((t1->entries[i] != t2->entries[i]) && in mlx4_bond_mac_table()
855 t1->entries[i] && t2->entries[i]) { in mlx4_bond_mac_table()
863 if (t1->entries[i] && !t2->entries[i]) { in mlx4_bond_mac_table()
864 t2->entries[i] = t1->entries[i]; in mlx4_bond_mac_table()
867 } else if (!t1->entries[i] && t2->entries[i]) { in mlx4_bond_mac_table()
868 t1->entries[i] = t2->entries[i]; in mlx4_bond_mac_table()
871 } else if (t1->entries[i] && t2->entries[i]) { in mlx4_bond_mac_table()
878 ret = mlx4_set_port_mac_table(dev, 1, t1->entries); in mlx4_bond_mac_table()
883 ret = mlx4_set_port_mac_table(dev, 2, t2->entries); in mlx4_bond_mac_table()
909 if (t1->entries[i] != t2->entries[i]) { in mlx4_unbond_mac_table()
917 if (!t1->entries[i]) in mlx4_unbond_mac_table()
921 t1->entries[i] = 0; in mlx4_unbond_mac_table()
926 t2->entries[i] = 0; in mlx4_unbond_mac_table()
932 ret = mlx4_set_port_mac_table(dev, 1, t1->entries); in mlx4_unbond_mac_table()
937 ret1 = mlx4_set_port_mac_table(dev, 2, t2->entries); in mlx4_unbond_mac_table()
961 if ((t1->entries[i] != t2->entries[i]) && in mlx4_bond_vlan_table()
962 t1->entries[i] && t2->entries[i]) { in mlx4_bond_vlan_table()
970 if (t1->entries[i] && !t2->entries[i]) { in mlx4_bond_vlan_table()
971 t2->entries[i] = t1->entries[i]; in mlx4_bond_vlan_table()
974 } else if (!t1->entries[i] && t2->entries[i]) { in mlx4_bond_vlan_table()
975 t1->entries[i] = t2->entries[i]; in mlx4_bond_vlan_table()
978 } else if (t1->entries[i] && t2->entries[i]) { in mlx4_bond_vlan_table()
985 ret = mlx4_set_port_vlan_table(dev, 1, t1->entries); in mlx4_bond_vlan_table()
990 ret = mlx4_set_port_vlan_table(dev, 2, t2->entries); in mlx4_bond_vlan_table()
1016 if (t1->entries[i] != t2->entries[i]) { in mlx4_unbond_vlan_table()
1024 if (!t1->entries[i]) in mlx4_unbond_vlan_table()
1028 t1->entries[i] = 0; in mlx4_unbond_vlan_table()
1033 t2->entries[i] = 0; in mlx4_unbond_vlan_table()
1039 ret = mlx4_set_port_vlan_table(dev, 1, t1->entries); in mlx4_unbond_vlan_table()
1044 ret1 = mlx4_set_port_vlan_table(dev, 2, t2->entries); in mlx4_unbond_vlan_table()