Lines Matching +full:x +full:- +full:z
1 // SPDX-License-Identifier: GPL-2.0
2 /* net/atm/atm_misc.c - Various functions for use by ATM drivers */
4 /* Written 1995-2000 by Werner Almesberger, EPFL ICA */
18 if (atomic_read(&sk_atm(vcc)->sk_rmem_alloc) <= sk_atm(vcc)->sk_rcvbuf) in atm_charge()
21 atomic_inc(&vcc->stats->rx_drop); in atm_charge()
33 if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) { in atm_alloc_charge()
37 atomic_add(skb->truesize-guess, in atm_alloc_charge()
38 &sk->sk_rmem_alloc); in atm_alloc_charge()
43 atomic_inc(&vcc->stats->rx_drop); in atm_alloc_charge()
54 * The rules are as follows (* = maximum, - = absent (0), x = value "x",
55 * (x+ = x or next value above x, x- = x or next value below):
58 * - - - * (UBR only) x - - x+
59 * - - * * x - * *
60 * - - z z- x - z z-
61 * - * - * x * - x+
62 * - * * * x * * *
63 * - * z z- x * z z-
64 * - y - y- x y - x+
65 * - y * y- x y * y-
66 * - y z z- x y z z-
68 * All non-error cases can be converted with the following simple set of rules:
70 * if pcr == z then z-
71 * else if min == x && pcr == - then x+
72 * else if max == y then y-
78 if (tp->pcr && tp->pcr != ATM_MAX_PCR) in atm_pcr_goal()
79 return -tp->pcr; in atm_pcr_goal()
80 if (tp->min_pcr && !tp->pcr) in atm_pcr_goal()
81 return tp->min_pcr; in atm_pcr_goal()
82 if (tp->max_pcr != ATM_MAX_PCR) in atm_pcr_goal()
83 return -tp->max_pcr; in atm_pcr_goal()
90 #define __HANDLE_ITEM(i) to->i = atomic_read(&from->i) in sonet_copy_stats()
98 #define __HANDLE_ITEM(i) atomic_sub(to->i, &from->i) in sonet_subtract_stats()