Lines Matching full:req
62 struct nmreq_register *req) in nmreq_register_from_legacy() argument
64 req->nr_offset = nmr->nr_offset; in nmreq_register_from_legacy()
65 req->nr_memsize = nmr->nr_memsize; in nmreq_register_from_legacy()
66 req->nr_tx_slots = nmr->nr_tx_slots; in nmreq_register_from_legacy()
67 req->nr_rx_slots = nmr->nr_rx_slots; in nmreq_register_from_legacy()
68 req->nr_tx_rings = nmr->nr_tx_rings; in nmreq_register_from_legacy()
69 req->nr_rx_rings = nmr->nr_rx_rings; in nmreq_register_from_legacy()
70 req->nr_host_tx_rings = 0; in nmreq_register_from_legacy()
71 req->nr_host_rx_rings = 0; in nmreq_register_from_legacy()
72 req->nr_mem_id = nmr->nr_arg2; in nmreq_register_from_legacy()
73 req->nr_ringid = nmr->nr_ringid & NETMAP_RING_MASK; in nmreq_register_from_legacy()
85 req->nr_mode = regmode; in nmreq_register_from_legacy()
87 req->nr_mode = nmr->nr_flags & NR_REG_MASK; in nmreq_register_from_legacy()
91 if (req->nr_mode == NR_REG_PIPE_MASTER || in nmreq_register_from_legacy()
92 req->nr_mode == NR_REG_PIPE_SLAVE) { in nmreq_register_from_legacy()
95 (req->nr_mode == NR_REG_PIPE_MASTER ? '{' : '}'), in nmreq_register_from_legacy()
96 req->nr_ringid); in nmreq_register_from_legacy()
103 req->nr_mode = NR_REG_ALL_NIC; in nmreq_register_from_legacy()
104 req->nr_ringid = 0; in nmreq_register_from_legacy()
106 req->nr_flags = nmr->nr_flags & (~NR_REG_MASK); in nmreq_register_from_legacy()
108 req->nr_flags |= NR_NO_TX_POLL; in nmreq_register_from_legacy()
111 req->nr_flags |= NR_DO_RX_POLL; in nmreq_register_from_legacy()
114 req->nr_extra_bufs = nmr->nr_arg3; in nmreq_register_from_legacy()
146 struct nmreq_register *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
147 if (!req) { goto oom; } in nmreq_from_legacy()
148 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
150 if (nmreq_register_from_legacy(nmr, hdr, req)) { in nmreq_from_legacy()
156 struct nmreq_vale_attach *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
157 if (!req) { goto oom; } in nmreq_from_legacy()
158 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
160 if (nmreq_register_from_legacy(nmr, hdr, &req->reg)) { in nmreq_from_legacy()
165 req->reg.nr_mode = NR_REG_NIC_SW; in nmreq_from_legacy()
167 req->reg.nr_mode = NR_REG_ALL_NIC; in nmreq_from_legacy()
178 struct nmreq_port_hdr *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
179 if (!req) { goto oom; } in nmreq_from_legacy()
180 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
183 req->nr_hdr_len = nmr->nr_arg1; in nmreq_from_legacy()
187 struct nmreq_vale_newif *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
188 if (!req) { goto oom; } in nmreq_from_legacy()
189 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
191 req->nr_tx_slots = nmr->nr_tx_slots; in nmreq_from_legacy()
192 req->nr_rx_slots = nmr->nr_rx_slots; in nmreq_from_legacy()
193 req->nr_tx_rings = nmr->nr_tx_rings; in nmreq_from_legacy()
194 req->nr_rx_rings = nmr->nr_rx_rings; in nmreq_from_legacy()
195 req->nr_mem_id = nmr->nr_arg2; in nmreq_from_legacy()
204 struct nmreq_vale_polling *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
205 if (!req) { goto oom; } in nmreq_from_legacy()
206 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
212 req->nr_mode = 0; /* invalid */ in nmreq_from_legacy()
215 req->nr_mode = NETMAP_POLLING_MODE_MULTI_CPU; in nmreq_from_legacy()
218 req->nr_mode = NETMAP_POLLING_MODE_SINGLE_CPU; in nmreq_from_legacy()
221 req->nr_first_cpu_id = nmr->nr_ringid & NETMAP_RING_MASK; in nmreq_from_legacy()
222 req->nr_num_polling_cpus = nmr->nr_arg1; in nmreq_from_legacy()
236 struct nmreq_vale_list *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
237 if (!req) { goto oom; } in nmreq_from_legacy()
238 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
240 req->nr_bridge_idx = nmr->nr_arg1; in nmreq_from_legacy()
241 req->nr_port_idx = nmr->nr_arg2; in nmreq_from_legacy()
244 struct nmreq_port_info_get *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
245 if (!req) { goto oom; } in nmreq_from_legacy()
246 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
248 req->nr_memsize = nmr->nr_memsize; in nmreq_from_legacy()
249 req->nr_tx_slots = nmr->nr_tx_slots; in nmreq_from_legacy()
250 req->nr_rx_slots = nmr->nr_rx_slots; in nmreq_from_legacy()
251 req->nr_tx_rings = nmr->nr_tx_rings; in nmreq_from_legacy()
252 req->nr_rx_rings = nmr->nr_rx_rings; in nmreq_from_legacy()
253 req->nr_host_tx_rings = 0; in nmreq_from_legacy()
254 req->nr_host_rx_rings = 0; in nmreq_from_legacy()
255 req->nr_mem_id = nmr->nr_arg2; in nmreq_from_legacy()
275 nmreq_register_to_legacy(const struct nmreq_register *req, struct nmreq *nmr) in nmreq_register_to_legacy() argument
277 nmr->nr_offset = req->nr_offset; in nmreq_register_to_legacy()
278 nmr->nr_memsize = req->nr_memsize; in nmreq_register_to_legacy()
279 nmr->nr_tx_slots = req->nr_tx_slots; in nmreq_register_to_legacy()
280 nmr->nr_rx_slots = req->nr_rx_slots; in nmreq_register_to_legacy()
281 nmr->nr_tx_rings = req->nr_tx_rings; in nmreq_register_to_legacy()
282 nmr->nr_rx_rings = req->nr_rx_rings; in nmreq_register_to_legacy()
283 nmr->nr_arg2 = req->nr_mem_id; in nmreq_register_to_legacy()
284 nmr->nr_arg3 = req->nr_extra_bufs; in nmreq_register_to_legacy()
299 struct nmreq_register *req = in nmreq_to_legacy() local
301 nmreq_register_to_legacy(req, nmr); in nmreq_to_legacy()
305 struct nmreq_port_info_get *req = in nmreq_to_legacy() local
307 nmr->nr_memsize = req->nr_memsize; in nmreq_to_legacy()
308 nmr->nr_tx_slots = req->nr_tx_slots; in nmreq_to_legacy()
309 nmr->nr_rx_slots = req->nr_rx_slots; in nmreq_to_legacy()
310 nmr->nr_tx_rings = req->nr_tx_rings; in nmreq_to_legacy()
311 nmr->nr_rx_rings = req->nr_rx_rings; in nmreq_to_legacy()
312 nmr->nr_arg2 = req->nr_mem_id; in nmreq_to_legacy()
316 struct nmreq_vale_attach *req = in nmreq_to_legacy() local
318 nmreq_register_to_legacy(&req->reg, nmr); in nmreq_to_legacy()
325 struct nmreq_vale_list *req = in nmreq_to_legacy() local
328 nmr->nr_arg1 = req->nr_bridge_idx; in nmreq_to_legacy()
329 nmr->nr_arg2 = req->nr_port_idx; in nmreq_to_legacy()
334 struct nmreq_port_hdr *req = in nmreq_to_legacy() local
336 nmr->nr_arg1 = req->nr_hdr_len; in nmreq_to_legacy()
340 struct nmreq_vale_newif *req = in nmreq_to_legacy() local
342 nmr->nr_tx_slots = req->nr_tx_slots; in nmreq_to_legacy()
343 nmr->nr_rx_slots = req->nr_rx_slots; in nmreq_to_legacy()
344 nmr->nr_tx_rings = req->nr_tx_rings; in nmreq_to_legacy()
345 nmr->nr_rx_rings = req->nr_rx_rings; in nmreq_to_legacy()
346 nmr->nr_arg2 = req->nr_mem_id; in nmreq_to_legacy()