Lines Matching defs:hn
72 struct mlx5e_eth_addr_hash_node *hn;
75 LIST_FOREACH(hn, &hash[ix], hlist) {
76 if (bcmp(hn->ai.addr, hn_new->ai.addr, ETHER_ADDR_LEN) == 0) {
77 if (hn->action == MLX5E_ACTION_DEL)
78 hn->action = MLX5E_ACTION_NONE;
88 mlx5e_del_eth_addr_from_hash(struct mlx5e_eth_addr_hash_node *hn)
90 LIST_REMOVE(hn, hlist);
91 free(hn, M_MLX5EN);
740 #define mlx5e_for_each_hash_node(hn, tmp, hash, i) \
742 LIST_FOREACH_SAFE(hn, &(hash)[i], hlist, tmp)
746 struct mlx5e_eth_addr_hash_node *hn)
748 switch (hn->action) {
750 mlx5e_add_eth_addr_rule(priv, &hn->ai, MLX5E_FULLMATCH);
751 hn->action = MLX5E_ACTION_NONE;
755 mlx5e_del_eth_addr_from_flow_table(priv, &hn->ai);
756 if (hn->mpfs_index != -1U)
757 mlx5_mpfs_del_mac(priv->mdev, hn->mpfs_index);
758 mlx5e_del_eth_addr_from_hash(hn);
769 struct mlx5e_eth_addr_hash_node *hn;
771 hn = LIST_FIRST(fh);
772 if (hn != NULL) {
773 LIST_REMOVE(hn, hlist);
774 LIST_INSERT_HEAD(uh, hn, hlist);
776 return (hn);
782 struct mlx5e_eth_addr_hash_node *hn;
784 hn = LIST_FIRST(fh);
785 if (hn != NULL)
786 LIST_REMOVE(hn, hlist);
787 return (hn);
800 struct mlx5e_eth_addr_hash_node *hn;
802 hn = mlx5e_move_hn(ctx->free, ctx->fill);
803 if (hn == NULL) {
807 ether_addr_copy(hn->ai.addr, LLADDR(sdl));
819 struct mlx5e_eth_addr_hash_node *hn;
834 hn = malloc(sizeof(*hn), M_MLX5EN, M_WAITOK | M_ZERO);
835 hn->action = MLX5E_ACTION_ADD;
836 hn->mpfs_index = -1U;
837 LIST_INSERT_HEAD(&head_free, hn, hlist);
840 hn = mlx5e_move_hn(&head_free, &head_uc);
841 MPASS(hn != NULL);
843 ether_addr_copy(hn->ai.addr,
860 while ((hn = mlx5e_remove_hn(&head_uc)) != NULL) {
861 if (mlx5e_add_eth_addr_to_hash(priv->eth_addr.if_uc, hn) == 0)
863 if (hn->mpfs_index == -1U)
864 mlx5_mpfs_add_mac(priv->mdev, &hn->mpfs_index,
865 hn->ai.addr, 0, 0);
870 while ((hn = mlx5e_remove_hn(&head_mc)) != NULL) {
871 if (mlx5e_add_eth_addr_to_hash(priv->eth_addr.if_mc, hn) == 0)
876 while ((hn = mlx5e_remove_hn(&head_uc)) != NULL)
877 free(hn, M_MLX5EN);
878 while ((hn = mlx5e_remove_hn(&head_mc)) != NULL)
879 free(hn, M_MLX5EN);
880 while ((hn = mlx5e_remove_hn(&head_free)) != NULL)
881 free(hn, M_MLX5EN);
892 struct mlx5e_eth_addr_hash_node *hn;
905 mlx5e_for_each_hash_node(hn, tmp, addr_list, hi) {
906 if (ether_addr_equal(IF_LLADDR(ifp), hn->ai.addr))
910 ether_addr_copy(addr_array[i++], hn->ai.addr);
918 struct mlx5e_eth_addr_hash_node *hn;
933 mlx5e_for_each_hash_node(hn, tmp, addr_list, hi)
975 struct mlx5e_eth_addr_hash_node *hn;
979 mlx5e_for_each_hash_node(hn, tmp, priv->eth_addr.if_uc, i)
980 mlx5e_execute_action(priv, hn);
982 mlx5e_for_each_hash_node(hn, tmp, priv->eth_addr.if_mc, i)
983 mlx5e_execute_action(priv, hn);
989 struct mlx5e_eth_addr_hash_node *hn;
993 mlx5e_for_each_hash_node(hn, tmp, priv->eth_addr.if_uc, i)
994 hn->action = MLX5E_ACTION_DEL;
995 mlx5e_for_each_hash_node(hn, tmp, priv->eth_addr.if_mc, i)
996 hn->action = MLX5E_ACTION_DEL;