Lines Matching +full:tx +full:- +full:m
1 // SPDX-License-Identifier: GPL-2.0
101 * FIXME: mpcs (and per-mpc lists) have no locking whatsoever.
104 static void *mpc_start(struct seq_file *m, loff_t *pos) in mpc_start() argument
109 if (!l--) in mpc_start()
111 for (mpc = mpcs; mpc; mpc = mpc->next) in mpc_start()
112 if (!l--) in mpc_start()
117 static void *mpc_next(struct seq_file *m, void *v, loff_t *pos) in mpc_next() argument
121 return v == SEQ_START_TOKEN ? mpcs : p->next; in mpc_next()
124 static void mpc_stop(struct seq_file *m, void *v) in mpc_stop() argument
129 * READING function - called when the /proc/atm/mpoa file is read from.
131 static int mpc_show(struct seq_file *m, void *v) in mpc_show() argument
141 atm_mpoa_disp_qos(m); in mpc_show()
145 seq_printf(m, "\nInterface %d:\n\n", mpc->dev_num); in mpc_show()
146 …seq_printf(m, "Ingress Entries:\nIP address State Holding time Packets fwded VPI VCI\… in mpc_show()
149 for (in_entry = mpc->in_cache; in_entry; in_entry = in_entry->next) { in mpc_show()
150 unsigned long seconds_delta = now - in_entry->time; in mpc_show()
152 sprintf(ip_string, "%pI4", &in_entry->ctrl_info.in_dst_ip); in mpc_show()
153 seq_printf(m, "%-16s%s%-14lu%-12u", in mpc_show()
155 ingress_state_string(in_entry->entry_state), in mpc_show()
156 in_entry->ctrl_info.holding_time - in mpc_show()
158 in_entry->packets_fwded); in mpc_show()
159 if (in_entry->shortcut) in mpc_show()
160 seq_printf(m, " %-3d %-3d", in mpc_show()
161 in_entry->shortcut->vpi, in mpc_show()
162 in_entry->shortcut->vci); in mpc_show()
163 seq_printf(m, "\n"); in mpc_show()
166 seq_printf(m, "\n"); in mpc_show()
167 …seq_printf(m, "Egress Entries:\nIngress MPC ATM addr\nCache-id State Holding time Pac… in mpc_show()
168 for (eg_entry = mpc->eg_cache; eg_entry; eg_entry = eg_entry->next) { in mpc_show()
169 unsigned char *p = eg_entry->ctrl_info.in_MPC_data_ATM_addr; in mpc_show()
170 unsigned long seconds_delta = now - eg_entry->time; in mpc_show()
173 seq_printf(m, "%02x", p[i]); in mpc_show()
174 seq_printf(m, "\n%-16lu%s%-14lu%-15u", in mpc_show()
175 (unsigned long)ntohl(eg_entry->ctrl_info.cache_id), in mpc_show()
176 egress_state_string(eg_entry->entry_state), in mpc_show()
177 (eg_entry->ctrl_info.holding_time - seconds_delta), in mpc_show()
178 eg_entry->packets_rcvd); in mpc_show()
181 sprintf(ip_string, "%pI4", &eg_entry->latest_ip_addr); in mpc_show()
182 seq_printf(m, "%-16s", ip_string); in mpc_show()
184 if (eg_entry->shortcut) in mpc_show()
185 seq_printf(m, " %-3d %-3d", in mpc_show()
186 eg_entry->shortcut->vpi, in mpc_show()
187 eg_entry->shortcut->vci); in mpc_show()
188 seq_printf(m, "\n"); in mpc_show()
190 seq_printf(m, "\n"); in mpc_show()
216 nbytes = PAGE_SIZE-1; in proc_mpc_write()
220 return -ENOMEM; in proc_mpc_write()
225 return -EFAULT; in proc_mpc_write()
245 * add 130.230.54.142 tx=max_pcr,max_sdu rx=max_pcr,max_sdu in parse_qos()
260 if (sscanf(buff, "add %hhu.%hhu.%hhu.%hhu tx=%d,%d rx=tx", in parse_qos()
264 } else if (sscanf(buff, "add %hhu.%hhu.%hhu.%hhu tx=%d,%d rx=%d,%d", in parse_qos()
276 dprintk("parse_qos(): setting qos parameters to tx=%d,%d rx=%d,%d\n", in parse_qos()
285 * INITIALIZATION function - called when module is initialized/loaded.
294 return -ENOMEM; in mpc_proc_init()
300 * DELETING function - called when module is removed.