Lines Matching defs:psf
185 static void ip_sf_list_clear_all(struct ip_sf_list *psf)
189 while (psf) {
190 next = psf->sf_next;
191 kfree(psf);
192 psf = next;
272 static int is_in(struct ip_mc_list *pmc, struct ip_sf_list *psf, int type,
280 if (!(pmc->gsquery && !psf->sf_gsresp)) {
286 if (psf->sf_count[MCAST_INCLUDE])
289 psf->sf_count[MCAST_EXCLUDE];
295 return psf->sf_count[MCAST_INCLUDE] != 0;
300 psf->sf_count[MCAST_INCLUDE])
303 psf->sf_count[MCAST_EXCLUDE];
305 if (gdeleted || !psf->sf_crcount)
310 return gdeleted || (psf->sf_crcount && sdeleted);
311 return psf->sf_crcount && !gdeleted && !sdeleted;
319 struct ip_sf_list *psf;
322 for (psf = pmc->sources; psf; psf = psf->sf_next) {
323 if (!is_in(pmc, psf, type, gdeleted, sdeleted))
467 struct ip_sf_list *psf, *psf_next, *psf_prev, **psf_list;
506 for (psf = *psf_list; psf; psf = psf_next) {
509 psf_next = psf->sf_next;
511 if (!is_in(pmc, psf, type, gdeleted, sdeleted)) {
512 psf_prev = psf;
522 type == IGMPV3_BLOCK_OLD_SOURCES) && psf->sf_crcount)
527 psf->sf_gsresp = 0;
548 *psrc = psf->sf_inaddr;
551 type == IGMPV3_BLOCK_OLD_SOURCES) && psf->sf_crcount) {
553 psf->sf_crcount--;
554 if ((sdeleted || gdeleted) && psf->sf_crcount == 0) {
556 psf_prev->sf_next = psf->sf_next;
558 *psf_list = psf->sf_next;
559 kfree(psf);
563 psf_prev = psf;
630 struct ip_sf_list *psf_prev, *psf_next, *psf;
633 for (psf = *ppsf; psf; psf = psf_next) {
634 psf_next = psf->sf_next;
635 if (psf->sf_crcount == 0) {
637 psf_prev->sf_next = psf->sf_next;
639 *ppsf = psf->sf_next;
640 kfree(psf);
642 psf_prev = psf;
865 struct ip_sf_list *psf;
869 for (psf = pmc->sources; psf; psf = psf->sf_next) {
874 if (psf->sf_count[MCAST_INCLUDE] ||
876 psf->sf_count[MCAST_EXCLUDE])
878 if (srcs[i] == psf->sf_inaddr) {
892 struct ip_sf_list *psf;
900 for (psf = pmc->sources; psf; psf = psf->sf_next) {
904 if (srcs[i] == psf->sf_inaddr) {
905 psf->sf_gsresp = 1;
1198 struct ip_sf_list *psf;
1203 for (psf = pmc->sources; psf; psf = psf->sf_next)
1204 psf->sf_crcount = pmc->crcount;
1220 struct ip_sf_list *psf;
1245 for (psf = im->sources; psf; psf = psf->sf_next)
1246 psf->sf_crcount = in_dev->mr_qrv ?:
1279 struct ip_sf_list *psf;
1282 psf = pmc->tomb;
1285 ip_sf_list_clear_all(psf);
1865 struct ip_sf_list *psf, *psf_prev;
1869 for (psf = pmc->sources; psf; psf = psf->sf_next) {
1870 if (psf->sf_inaddr == *psfsrc)
1872 psf_prev = psf;
1874 if (!psf || psf->sf_count[sfmode] == 0) {
1878 psf->sf_count[sfmode]--;
1879 if (psf->sf_count[sfmode] == 0) {
1882 if (!psf->sf_count[MCAST_INCLUDE] && !psf->sf_count[MCAST_EXCLUDE]) {
1890 psf_prev->sf_next = psf->sf_next;
1892 pmc->sources = psf->sf_next;
1894 if (psf->sf_oldin &&
1896 psf->sf_crcount = in_dev->mr_qrv ?: READ_ONCE(net->ipv4.sysctl_igmp_qrv);
1897 psf->sf_next = pmc->tomb;
1898 pmc->tomb = psf;
1902 kfree(psf);
1953 struct ip_sf_list *psf;
1962 for (psf = pmc->sources; psf; psf = psf->sf_next)
1963 psf->sf_crcount = 0;
1980 struct ip_sf_list *psf, *psf_prev;
1983 for (psf = pmc->sources; psf; psf = psf->sf_next) {
1984 if (psf->sf_inaddr == *psfsrc)
1986 psf_prev = psf;
1988 if (!psf) {
1989 psf = kzalloc(sizeof(*psf), GFP_ATOMIC);
1990 if (!psf)
1992 psf->sf_inaddr = *psfsrc;
1994 psf_prev->sf_next = psf;
1996 pmc->sources = psf;
1998 psf->sf_count[sfmode]++;
1999 if (psf->sf_count[sfmode] == 1) {
2008 struct ip_sf_list *psf;
2011 for (psf = pmc->sources; psf; psf = psf->sf_next)
2013 psf->sf_oldin = mca_xcount ==
2014 psf->sf_count[MCAST_EXCLUDE] &&
2015 !psf->sf_count[MCAST_INCLUDE];
2017 psf->sf_oldin = psf->sf_count[MCAST_INCLUDE] != 0;
2022 struct ip_sf_list *psf, *dpsf;
2028 for (psf = pmc->sources; psf; psf = psf->sf_next) {
2030 new_in = mca_xcount == psf->sf_count[MCAST_EXCLUDE] &&
2031 !psf->sf_count[MCAST_INCLUDE];
2033 new_in = psf->sf_count[MCAST_INCLUDE] != 0;
2035 if (!psf->sf_oldin) {
2039 if (dpsf->sf_inaddr == psf->sf_inaddr)
2050 psf->sf_crcount = qrv;
2053 } else if (psf->sf_oldin) {
2055 psf->sf_crcount = 0;
2061 if (dpsf->sf_inaddr == psf->sf_inaddr)
2067 *dpsf = *psf;
2126 struct ip_sf_list *psf;
2141 for (psf = pmc->sources; psf; psf = psf->sf_next)
2142 psf->sf_crcount = 0;
2241 struct ip_sf_socklist *psf = rtnl_dereference(iml->sflist);
2244 if (!psf) {
2250 iml->sfmode, psf->sl_count, psf->sl_addr, 0);
2253 atomic_sub(struct_size(psf, sl_addr, psf->sl_max), &sk->sk_omem_alloc);
2254 kfree_rcu(psf, rcu);
2722 struct ip_sf_list *psf;
2746 for (psf = im->sources; psf; psf = psf->sf_next) {
2747 if (psf->sf_inaddr == src_addr)
2750 if (psf)
2751 rv = psf->sf_count[MCAST_INCLUDE] ||
2752 psf->sf_count[MCAST_EXCLUDE] !=
2904 struct ip_sf_list *psf = NULL;
2918 psf = im->sources;
2919 if (likely(psf)) {
2927 return psf;
2930 static struct ip_sf_list *igmp_mcf_get_next(struct seq_file *seq, struct ip_sf_list *psf)
2934 psf = psf->sf_next;
2935 while (!psf) {
2952 psf = state->im->sources;
2955 return psf;
2960 struct ip_sf_list *psf = igmp_mcf_get_first(seq);
2961 if (psf)
2962 while (pos && (psf = igmp_mcf_get_next(seq, psf)) != NULL)
2964 return pos ? NULL : psf;
2976 struct ip_sf_list *psf;
2978 psf = igmp_mcf_get_first(seq);
2980 psf = igmp_mcf_get_next(seq, v);
2982 return psf;
3000 struct ip_sf_list *psf = v;
3011 ntohl(psf->sf_inaddr),
3012 psf->sf_count[MCAST_INCLUDE],
3013 psf->sf_count[MCAST_EXCLUDE]);