Lines Matching defs:nve

205 	struct mlxsw_sp_nve *nve = mlxsw_sp->nve;
207 return rhashtable_lookup_fast(&nve->mc_list_ht, key,
215 struct mlxsw_sp_nve *nve = mlxsw_sp->nve;
226 err = rhashtable_insert_fast(&nve->mc_list_ht, &mc_list->ht_node,
241 struct mlxsw_sp_nve *nve = mlxsw_sp->nve;
243 rhashtable_remove_fast(&nve->mc_list_ht, &mc_list->ht_node,
276 unsigned int num_max_entries = mlxsw_sp->nve->num_max_mc_entries[proto];
324 struct mlxsw_sp_nve *nve = mlxsw_sp->nve;
327 num_entries < nve->num_max_mc_entries[proto])
346 struct mlxsw_sp_nve *nve = mc_record->mlxsw_sp->nve;
350 num_max_entries = nve->num_max_mc_entries[mc_record->proto];
385 num_max_entries = mlxsw_sp->nve->num_max_mc_entries[mc_record->proto];
417 struct mlxsw_sp_nve *nve = mc_record->mlxsw_sp->nve;
421 num_max_entries = nve->num_max_mc_entries[mc_record->proto];
685 struct mlxsw_sp_nve *nve = mc_record->mlxsw_sp->nve;
689 num_max_entries = nve->num_max_mc_entries[mc_record->proto];
729 struct mlxsw_sp_nve *nve = mlxsw_sp->nve;
733 if (nve->num_nve_tunnels++ != 0)
736 nve->config = *config;
739 &nve->tunnel_index);
743 ops = nve->nve_ops_arr[config->type];
744 err = ops->init(nve, config);
752 nve->tunnel_index);
754 memset(&nve->config, 0, sizeof(nve->config));
755 nve->num_nve_tunnels--;
761 struct mlxsw_sp_nve *nve = mlxsw_sp->nve;
764 ops = nve->nve_ops_arr[nve->config.type];
766 if (mlxsw_sp->nve->num_nve_tunnels == 1) {
767 ops->fini(nve);
769 nve->tunnel_index);
770 memset(&nve->config, 0, sizeof(nve->config));
772 nve->num_nve_tunnels--;
796 ops = mlxsw_sp->nve->nve_ops_arr[type];
839 return rhashtable_lookup_fast(&mlxsw_sp->nve->ipv6_ht, &key,
848 struct mlxsw_sp_nve *nve = mlxsw_sp->nve;
859 err = rhashtable_insert_fast(&nve->ipv6_ht, &ipv6_ht_node->ht_node,
864 list_add(&ipv6_ht_node->list, &nve->ipv6_addr_list);
877 struct mlxsw_sp_nve *nve = mlxsw_sp->nve;
880 rhashtable_remove_fast(&nve->ipv6_ht, &ipv6_ht_node->ht_node,
924 struct mlxsw_sp_nve *nve = mlxsw_sp->nve;
926 list_for_each_entry_safe(ipv6_ht_node, tmp, &nve->ipv6_addr_list,
940 struct mlxsw_sp_nve *nve = mlxsw_sp->nve;
945 ops = nve->nve_ops_arr[params->type];
947 if (!ops->can_offload(nve, params, extack))
951 ops->nve_config(nve, params, &config);
952 if (nve->num_nve_tunnels &&
953 memcmp(&config, &nve->config, sizeof(config))) {
1110 mlxsw_sp->nve->num_max_mc_entries[MLXSW_SP_L3_PROTO_IPV4] = max;
1112 mlxsw_sp->nve->num_max_mc_entries[MLXSW_SP_L3_PROTO_IPV6] = max;
1119 struct mlxsw_sp_nve *nve;
1122 nve = kzalloc(sizeof(*mlxsw_sp->nve), GFP_KERNEL);
1123 if (!nve)
1125 mlxsw_sp->nve = nve;
1126 nve->mlxsw_sp = mlxsw_sp;
1127 nve->nve_ops_arr = mlxsw_sp->nve_ops_arr;
1129 err = rhashtable_init(&nve->mc_list_ht,
1134 err = rhashtable_init(&nve->ipv6_ht, &mlxsw_sp_nve_ipv6_ht_params);
1138 INIT_LIST_HEAD(&nve->ipv6_addr_list);
1157 rhashtable_destroy(&nve->ipv6_ht);
1159 rhashtable_destroy(&nve->mc_list_ht);
1161 mlxsw_sp->nve = NULL;
1162 kfree(nve);
1168 WARN_ON(mlxsw_sp->nve->num_nve_tunnels);
1169 WARN_ON(!list_empty(&mlxsw_sp->nve->ipv6_addr_list));
1170 rhashtable_destroy(&mlxsw_sp->nve->ipv6_ht);
1171 rhashtable_destroy(&mlxsw_sp->nve->mc_list_ht);
1172 kfree(mlxsw_sp->nve);
1173 mlxsw_sp->nve = NULL;