Lines Matching refs:psf
786 struct ip6_sf_list *psf; in mld_add_delrec() local
791 for (psf=pmc->mca_sources; psf; psf=psf->sf_next) in mld_add_delrec()
792 psf->sf_crcount = pmc->mca_crcount; in mld_add_delrec()
805 struct ip6_sf_list *psf, *psf_next; in mld_del_delrec() local
822 for (psf=pmc->mca_tomb; psf; psf=psf_next) { in mld_del_delrec()
823 psf_next = psf->sf_next; in mld_del_delrec()
824 kfree(psf); in mld_del_delrec()
850 struct ip6_sf_list *psf, *psf_next; in mld_clear_delrec() local
853 psf = pmc->mca_tomb; in mld_clear_delrec()
856 for (; psf; psf=psf_next) { in mld_clear_delrec()
857 psf_next = psf->sf_next; in mld_clear_delrec()
858 kfree(psf); in mld_clear_delrec()
1025 struct ip6_sf_list *psf; in ipv6_chk_mcast_addr() local
1028 for (psf=mc->mca_sources;psf;psf=psf->sf_next) { in ipv6_chk_mcast_addr()
1029 if (ipv6_addr_equal(&psf->sf_addr, src_addr)) in ipv6_chk_mcast_addr()
1032 if (psf) in ipv6_chk_mcast_addr()
1033 rv = psf->sf_count[MCAST_INCLUDE] || in ipv6_chk_mcast_addr()
1034 psf->sf_count[MCAST_EXCLUDE] != in ipv6_chk_mcast_addr()
1099 struct ip6_sf_list *psf; in mld_xmarksources() local
1103 for (psf=pmc->mca_sources; psf; psf=psf->sf_next) { in mld_xmarksources()
1110 psf->sf_count[MCAST_EXCLUDE]) in mld_xmarksources()
1112 if (ipv6_addr_equal(&srcs[i], &psf->sf_addr)) { in mld_xmarksources()
1127 struct ip6_sf_list *psf; in mld_marksources() local
1136 for (psf=pmc->mca_sources; psf; psf=psf->sf_next) { in mld_marksources()
1140 if (ipv6_addr_equal(&srcs[i], &psf->sf_addr)) { in mld_marksources()
1141 psf->sf_gsresp = 1; in mld_marksources()
1338 static int is_in(struct ifmcaddr6 *pmc, struct ip6_sf_list *psf, int type, in is_in() argument
1346 if (!((pmc->mca_flags & MAF_GSQUERY) && !psf->sf_gsresp)) { in is_in()
1352 if (psf->sf_count[MCAST_INCLUDE]) in is_in()
1355 psf->sf_count[MCAST_EXCLUDE]; in is_in()
1361 return psf->sf_count[MCAST_INCLUDE] != 0; in is_in()
1366 psf->sf_count[MCAST_INCLUDE]) in is_in()
1369 psf->sf_count[MCAST_EXCLUDE]; in is_in()
1371 if (gdeleted || !psf->sf_crcount) in is_in()
1376 return gdeleted || (psf->sf_crcount && sdeleted); in is_in()
1377 return psf->sf_crcount && !gdeleted && !sdeleted; in is_in()
1385 struct ip6_sf_list *psf; in mld_scount() local
1388 for (psf=pmc->mca_sources; psf; psf=psf->sf_next) { in mld_scount()
1389 if (!is_in(pmc, psf, type, gdeleted, sdeleted)) in mld_scount()
1531 struct ip6_sf_list *psf, *psf_next, *psf_prev, **psf_list; in add_grec() local
1562 for (psf=*psf_list; psf; psf=psf_next) { in add_grec()
1565 psf_next = psf->sf_next; in add_grec()
1567 if (!is_in(pmc, psf, type, gdeleted, sdeleted)) { in add_grec()
1568 psf_prev = psf; in add_grec()
1574 psf->sf_gsresp = 0; in add_grec()
1595 *psrc = psf->sf_addr; in add_grec()
1598 type == MLD2_BLOCK_OLD_SOURCES) && psf->sf_crcount) { in add_grec()
1599 psf->sf_crcount--; in add_grec()
1600 if ((sdeleted || gdeleted) && psf->sf_crcount == 0) { in add_grec()
1602 psf_prev->sf_next = psf->sf_next; in add_grec()
1604 *psf_list = psf->sf_next; in add_grec()
1605 kfree(psf); in add_grec()
1609 psf_prev = psf; in add_grec()
1671 struct ip6_sf_list *psf_prev, *psf_next, *psf; in mld_clear_zeros() local
1674 for (psf=*ppsf; psf; psf = psf_next) { in mld_clear_zeros()
1675 psf_next = psf->sf_next; in mld_clear_zeros()
1676 if (psf->sf_crcount == 0) { in mld_clear_zeros()
1678 psf_prev->sf_next = psf->sf_next; in mld_clear_zeros()
1680 *ppsf = psf->sf_next; in mld_clear_zeros()
1681 kfree(psf); in mld_clear_zeros()
1683 psf_prev = psf; in mld_clear_zeros()
1863 struct ip6_sf_list *psf, *psf_prev; in ip6_mc_del1_src() local
1867 for (psf=pmc->mca_sources; psf; psf=psf->sf_next) { in ip6_mc_del1_src()
1868 if (ipv6_addr_equal(&psf->sf_addr, psfsrc)) in ip6_mc_del1_src()
1870 psf_prev = psf; in ip6_mc_del1_src()
1872 if (!psf || psf->sf_count[sfmode] == 0) { in ip6_mc_del1_src()
1876 psf->sf_count[sfmode]--; in ip6_mc_del1_src()
1877 if (!psf->sf_count[MCAST_INCLUDE] && !psf->sf_count[MCAST_EXCLUDE]) { in ip6_mc_del1_src()
1882 psf_prev->sf_next = psf->sf_next; in ip6_mc_del1_src()
1884 pmc->mca_sources = psf->sf_next; in ip6_mc_del1_src()
1885 if (psf->sf_oldin && !(pmc->mca_flags & MAF_NOREPORT) && in ip6_mc_del1_src()
1887 psf->sf_crcount = idev->mc_qrv; in ip6_mc_del1_src()
1888 psf->sf_next = pmc->mca_tomb; in ip6_mc_del1_src()
1889 pmc->mca_tomb = psf; in ip6_mc_del1_src()
1892 kfree(psf); in ip6_mc_del1_src()
1938 struct ip6_sf_list *psf; in ip6_mc_del_src() local
1944 for (psf=pmc->mca_sources; psf; psf = psf->sf_next) in ip6_mc_del_src()
1945 psf->sf_crcount = 0; in ip6_mc_del_src()
1960 struct ip6_sf_list *psf, *psf_prev; in ip6_mc_add1_src() local
1963 for (psf=pmc->mca_sources; psf; psf=psf->sf_next) { in ip6_mc_add1_src()
1964 if (ipv6_addr_equal(&psf->sf_addr, psfsrc)) in ip6_mc_add1_src()
1966 psf_prev = psf; in ip6_mc_add1_src()
1968 if (!psf) { in ip6_mc_add1_src()
1969 psf = kzalloc(sizeof(*psf), GFP_ATOMIC); in ip6_mc_add1_src()
1970 if (!psf) in ip6_mc_add1_src()
1973 psf->sf_addr = *psfsrc; in ip6_mc_add1_src()
1975 psf_prev->sf_next = psf; in ip6_mc_add1_src()
1977 pmc->mca_sources = psf; in ip6_mc_add1_src()
1979 psf->sf_count[sfmode]++; in ip6_mc_add1_src()
1985 struct ip6_sf_list *psf; in sf_markstate() local
1988 for (psf=pmc->mca_sources; psf; psf=psf->sf_next) in sf_markstate()
1990 psf->sf_oldin = mca_xcount == in sf_markstate()
1991 psf->sf_count[MCAST_EXCLUDE] && in sf_markstate()
1992 !psf->sf_count[MCAST_INCLUDE]; in sf_markstate()
1994 psf->sf_oldin = psf->sf_count[MCAST_INCLUDE] != 0; in sf_markstate()
1999 struct ip6_sf_list *psf, *dpsf; in sf_setstate() local
2005 for (psf=pmc->mca_sources; psf; psf=psf->sf_next) { in sf_setstate()
2007 new_in = mca_xcount == psf->sf_count[MCAST_EXCLUDE] && in sf_setstate()
2008 !psf->sf_count[MCAST_INCLUDE]; in sf_setstate()
2010 new_in = psf->sf_count[MCAST_INCLUDE] != 0; in sf_setstate()
2012 if (!psf->sf_oldin) { in sf_setstate()
2018 &psf->sf_addr)) in sf_setstate()
2029 psf->sf_crcount = qrv; in sf_setstate()
2032 } else if (psf->sf_oldin) { in sf_setstate()
2033 psf->sf_crcount = 0; in sf_setstate()
2040 &psf->sf_addr)) in sf_setstate()
2047 *dpsf = *psf; in sf_setstate()
2103 struct ip6_sf_list *psf; in ip6_mc_add_src() local
2114 for (psf=pmc->mca_sources; psf; psf = psf->sf_next) in ip6_mc_add_src()
2115 psf->sf_crcount = 0; in ip6_mc_add_src()
2126 struct ip6_sf_list *psf, *nextpsf; in ip6_mc_clear_src() local
2128 for (psf=pmc->mca_tomb; psf; psf=nextpsf) { in ip6_mc_clear_src()
2129 nextpsf = psf->sf_next; in ip6_mc_clear_src()
2130 kfree(psf); in ip6_mc_clear_src()
2133 for (psf=pmc->mca_sources; psf; psf=nextpsf) { in ip6_mc_clear_src()
2134 nextpsf = psf->sf_next; in ip6_mc_clear_src()
2135 kfree(psf); in ip6_mc_clear_src()
2477 struct ip6_sf_list *psf = NULL; in igmp6_mcf_get_first() local
2493 psf = im->mca_sources; in igmp6_mcf_get_first()
2494 if (likely(psf != NULL)) { in igmp6_mcf_get_first()
2504 return psf; in igmp6_mcf_get_first()
2507 static struct ip6_sf_list *igmp6_mcf_get_next(struct seq_file *seq, struct ip6_sf_list *psf) in igmp6_mcf_get_next() argument
2511 psf = psf->sf_next; in igmp6_mcf_get_next()
2512 while (!psf) { in igmp6_mcf_get_next()
2534 psf = state->im->mca_sources; in igmp6_mcf_get_next()
2537 return psf; in igmp6_mcf_get_next()
2542 struct ip6_sf_list *psf = igmp6_mcf_get_first(seq); in igmp6_mcf_get_idx() local
2543 if (psf) in igmp6_mcf_get_idx()
2544 while (pos && (psf = igmp6_mcf_get_next(seq, psf)) != NULL) in igmp6_mcf_get_idx()
2546 return pos ? NULL : psf; in igmp6_mcf_get_idx()
2558 struct ip6_sf_list *psf; in igmp6_mcf_seq_next() local
2560 psf = igmp6_mcf_get_first(seq); in igmp6_mcf_seq_next()
2562 psf = igmp6_mcf_get_next(seq, v); in igmp6_mcf_seq_next()
2564 return psf; in igmp6_mcf_seq_next()
2586 struct ip6_sf_list *psf = (struct ip6_sf_list *)v; in igmp6_mcf_seq_show() local
2600 &psf->sf_addr, in igmp6_mcf_seq_show()
2601 psf->sf_count[MCAST_INCLUDE], in igmp6_mcf_seq_show()
2602 psf->sf_count[MCAST_EXCLUDE]); in igmp6_mcf_seq_show()