Lines Matching refs:group
65 struct vxlan_mdb_entry_key group; member
377 struct vxlan_mdb_entry_key *group = &cfg->group; in vxlan_mdb_config_group_set() local
381 group->dst.sa.sa_family = AF_INET; in vxlan_mdb_config_group_set()
382 group->dst.sin.sin_addr.s_addr = entry->addr.u.ip4; in vxlan_mdb_config_group_set()
386 group->dst.sa.sa_family = AF_INET6; in vxlan_mdb_config_group_set()
387 group->dst.sin6.sin6_addr = entry->addr.u.ip6; in vxlan_mdb_config_group_set()
393 vxlan_nla_get_addr(&group->src, source_attr); in vxlan_mdb_config_group_set()
396 static bool vxlan_mdb_is_star_g(const struct vxlan_mdb_entry_key *group) in vxlan_mdb_is_star_g() argument
398 return !vxlan_addr_any(&group->dst) && vxlan_addr_any(&group->src); in vxlan_mdb_is_star_g()
401 static bool vxlan_mdb_is_sg(const struct vxlan_mdb_entry_key *group) in vxlan_mdb_is_sg() argument
403 return !vxlan_addr_any(&group->dst) && !vxlan_addr_any(&group->src); in vxlan_mdb_is_sg()
511 if (!vxlan_addr_is_multicast(&cfg->group.dst) && in vxlan_mdb_config_attrs_init()
512 !vxlan_addr_any(&cfg->group.dst)) { in vxlan_mdb_config_attrs_init()
517 if (vxlan_addr_any(&cfg->group.dst) && in vxlan_mdb_config_attrs_init()
523 if (vxlan_mdb_is_sg(&cfg->group)) in vxlan_mdb_config_attrs_init()
527 if (!vxlan_mdb_is_star_g(&cfg->group)) { in vxlan_mdb_config_attrs_init()
535 if (!vxlan_mdb_is_star_g(&cfg->group)) { in vxlan_mdb_config_attrs_init()
550 if (vxlan_mdb_is_star_g(&cfg->group) && list_empty(&cfg->src_list) && in vxlan_mdb_config_attrs_init()
584 cfg->group.vni = in vxlan_mdb_config_attrs_init()
604 cfg->group.vni = vxlan->default_dst.remote_vni; in vxlan_mdb_config_init()
658 const struct vxlan_mdb_entry_key *group) in vxlan_mdb_entry_lookup() argument
660 return rhashtable_lookup_fast(&vxlan->mdb_tbl, group, in vxlan_mdb_entry_lookup()
790 sg_cfg.group.src = *addr; in vxlan_mdb_remote_src_fwd_add()
791 sg_cfg.group.dst = cfg->group.dst; in vxlan_mdb_remote_src_fwd_add()
792 sg_cfg.group.vni = cfg->group.vni; in vxlan_mdb_remote_src_fwd_add()
809 const struct vxlan_mdb_entry_key *group, in vxlan_mdb_remote_src_fwd_del() argument
818 sg_cfg.group.src = *addr; in vxlan_mdb_remote_src_fwd_del()
819 sg_cfg.group.dst = group->dst; in vxlan_mdb_remote_src_fwd_del()
820 sg_cfg.group.vni = group->vni; in vxlan_mdb_remote_src_fwd_del()
863 const struct vxlan_mdb_entry_key *group, in vxlan_mdb_remote_src_del() argument
867 vxlan_mdb_remote_src_fwd_del(vxlan, group, remote, &ent->addr); in vxlan_mdb_remote_src_del()
890 vxlan_mdb_remote_src_del(cfg->vxlan, &cfg->group, remote, ent); in vxlan_mdb_remote_srcs_add()
895 const struct vxlan_mdb_entry_key *group, in vxlan_mdb_remote_srcs_del() argument
902 vxlan_mdb_remote_src_del(vxlan, group, remote, ent); in vxlan_mdb_remote_srcs_del()
906 vxlan_mdb_nlmsg_src_list_size(const struct vxlan_mdb_entry_key *group, in vxlan_mdb_nlmsg_src_list_size() argument
922 nla_total_size(vxlan_addr_size(&group->dst)) + in vxlan_mdb_nlmsg_src_list_size()
934 const struct vxlan_mdb_entry_key *group = &mdb_entry->key; in vxlan_mdb_nlmsg_size() local
948 if (vxlan_mdb_is_sg(group)) in vxlan_mdb_nlmsg_size()
949 nlmsg_size += nla_total_size(vxlan_addr_size(&group->dst)); in vxlan_mdb_nlmsg_size()
953 nlmsg_size += vxlan_mdb_nlmsg_src_list_size(group, remote); in vxlan_mdb_nlmsg_size()
968 if ((vxlan->cfg.flags & VXLAN_F_COLLECT_METADATA) && group->vni) in vxlan_mdb_nlmsg_size()
1165 const struct vxlan_mdb_entry_key *group) in vxlan_mdb_entry_get() argument
1170 mdb_entry = vxlan_mdb_entry_lookup(vxlan, group); in vxlan_mdb_entry_get()
1179 memcpy(&mdb_entry->key, group, sizeof(mdb_entry->key)); in vxlan_mdb_entry_get()
1221 mdb_entry = vxlan_mdb_entry_get(vxlan, &cfg->group); in __vxlan_mdb_add()
1245 mdb_entry = vxlan_mdb_entry_lookup(vxlan, &cfg->group); in __vxlan_mdb_del()
1306 struct vxlan_mdb_entry_key group; in vxlan_mdb_entry_skb_get() local
1318 memset(&group, 0, sizeof(group)); in vxlan_mdb_entry_skb_get()
1319 group.vni = src_vni; in vxlan_mdb_entry_skb_get()
1325 group.dst.sa.sa_family = AF_INET; in vxlan_mdb_entry_skb_get()
1326 group.dst.sin.sin_addr.s_addr = ip_hdr(skb)->daddr; in vxlan_mdb_entry_skb_get()
1327 group.src.sa.sa_family = AF_INET; in vxlan_mdb_entry_skb_get()
1328 group.src.sin.sin_addr.s_addr = ip_hdr(skb)->saddr; in vxlan_mdb_entry_skb_get()
1334 group.dst.sa.sa_family = AF_INET6; in vxlan_mdb_entry_skb_get()
1335 group.dst.sin6.sin6_addr = ipv6_hdr(skb)->daddr; in vxlan_mdb_entry_skb_get()
1336 group.src.sa.sa_family = AF_INET6; in vxlan_mdb_entry_skb_get()
1337 group.src.sin6.sin6_addr = ipv6_hdr(skb)->saddr; in vxlan_mdb_entry_skb_get()
1344 mdb_entry = vxlan_mdb_entry_lookup(vxlan, &group); in vxlan_mdb_entry_skb_get()
1348 memset(&group.src, 0, sizeof(group.src)); in vxlan_mdb_entry_skb_get()
1349 mdb_entry = vxlan_mdb_entry_lookup(vxlan, &group); in vxlan_mdb_entry_skb_get()
1360 if (ipv4_is_local_multicast(group.dst.sin.sin_addr.s_addr)) in vxlan_mdb_entry_skb_get()
1362 group.dst.sin.sin_addr.s_addr = 0; in vxlan_mdb_entry_skb_get()
1366 if (ipv6_addr_type(&group.dst.sin6.sin6_addr) & in vxlan_mdb_entry_skb_get()
1369 memset(&group.dst.sin6.sin6_addr, 0, in vxlan_mdb_entry_skb_get()
1370 sizeof(group.dst.sin6.sin6_addr)); in vxlan_mdb_entry_skb_get()
1377 return vxlan_mdb_entry_lookup(vxlan, &group); in vxlan_mdb_entry_skb_get()