Lines Matching refs:req

63 				struct nmreq_register *req)  in nmreq_register_from_legacy()  argument
65 req->nr_offset = nmr->nr_offset; in nmreq_register_from_legacy()
66 req->nr_memsize = nmr->nr_memsize; in nmreq_register_from_legacy()
67 req->nr_tx_slots = nmr->nr_tx_slots; in nmreq_register_from_legacy()
68 req->nr_rx_slots = nmr->nr_rx_slots; in nmreq_register_from_legacy()
69 req->nr_tx_rings = nmr->nr_tx_rings; in nmreq_register_from_legacy()
70 req->nr_rx_rings = nmr->nr_rx_rings; in nmreq_register_from_legacy()
71 req->nr_host_tx_rings = 0; in nmreq_register_from_legacy()
72 req->nr_host_rx_rings = 0; in nmreq_register_from_legacy()
73 req->nr_mem_id = nmr->nr_arg2; in nmreq_register_from_legacy()
74 req->nr_ringid = nmr->nr_ringid & NETMAP_RING_MASK; in nmreq_register_from_legacy()
86 req->nr_mode = regmode; in nmreq_register_from_legacy()
88 req->nr_mode = nmr->nr_flags & NR_REG_MASK; in nmreq_register_from_legacy()
92 if (req->nr_mode == NR_REG_PIPE_MASTER || in nmreq_register_from_legacy()
93 req->nr_mode == NR_REG_PIPE_SLAVE) { in nmreq_register_from_legacy()
96 (req->nr_mode == NR_REG_PIPE_MASTER ? '{' : '}'), in nmreq_register_from_legacy()
97 req->nr_ringid); in nmreq_register_from_legacy()
104 req->nr_mode = NR_REG_ALL_NIC; in nmreq_register_from_legacy()
105 req->nr_ringid = 0; in nmreq_register_from_legacy()
107 req->nr_flags = nmr->nr_flags & (~NR_REG_MASK); in nmreq_register_from_legacy()
109 req->nr_flags |= NR_NO_TX_POLL; in nmreq_register_from_legacy()
112 req->nr_flags |= NR_DO_RX_POLL; in nmreq_register_from_legacy()
115 req->nr_extra_bufs = nmr->nr_arg3; in nmreq_register_from_legacy()
147 struct nmreq_register *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
148 if (!req) { goto oom; } in nmreq_from_legacy()
149 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
151 if (nmreq_register_from_legacy(nmr, hdr, req)) { in nmreq_from_legacy()
157 struct nmreq_vale_attach *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
158 if (!req) { goto oom; } in nmreq_from_legacy()
159 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
161 if (nmreq_register_from_legacy(nmr, hdr, &req->reg)) { in nmreq_from_legacy()
166 req->reg.nr_mode = NR_REG_NIC_SW; in nmreq_from_legacy()
168 req->reg.nr_mode = NR_REG_ALL_NIC; in nmreq_from_legacy()
179 struct nmreq_port_hdr *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
180 if (!req) { goto oom; } in nmreq_from_legacy()
181 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
184 req->nr_hdr_len = nmr->nr_arg1; in nmreq_from_legacy()
188 struct nmreq_vale_newif *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
189 if (!req) { goto oom; } in nmreq_from_legacy()
190 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
192 req->nr_tx_slots = nmr->nr_tx_slots; in nmreq_from_legacy()
193 req->nr_rx_slots = nmr->nr_rx_slots; in nmreq_from_legacy()
194 req->nr_tx_rings = nmr->nr_tx_rings; in nmreq_from_legacy()
195 req->nr_rx_rings = nmr->nr_rx_rings; in nmreq_from_legacy()
196 req->nr_mem_id = nmr->nr_arg2; in nmreq_from_legacy()
205 struct nmreq_vale_polling *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
206 if (!req) { goto oom; } in nmreq_from_legacy()
207 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
213 req->nr_mode = 0; /* invalid */ in nmreq_from_legacy()
216 req->nr_mode = NETMAP_POLLING_MODE_MULTI_CPU; in nmreq_from_legacy()
219 req->nr_mode = NETMAP_POLLING_MODE_SINGLE_CPU; in nmreq_from_legacy()
222 req->nr_first_cpu_id = nmr->nr_ringid & NETMAP_RING_MASK; in nmreq_from_legacy()
223 req->nr_num_polling_cpus = nmr->nr_arg1; in nmreq_from_legacy()
237 struct nmreq_vale_list *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
238 if (!req) { goto oom; } in nmreq_from_legacy()
239 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
241 req->nr_bridge_idx = nmr->nr_arg1; in nmreq_from_legacy()
242 req->nr_port_idx = nmr->nr_arg2; in nmreq_from_legacy()
245 struct nmreq_port_info_get *req = nm_os_malloc(sizeof(*req)); in nmreq_from_legacy() local
246 if (!req) { goto oom; } in nmreq_from_legacy()
247 hdr->nr_body = (uintptr_t)req; in nmreq_from_legacy()
249 req->nr_memsize = nmr->nr_memsize; in nmreq_from_legacy()
250 req->nr_tx_slots = nmr->nr_tx_slots; in nmreq_from_legacy()
251 req->nr_rx_slots = nmr->nr_rx_slots; in nmreq_from_legacy()
252 req->nr_tx_rings = nmr->nr_tx_rings; in nmreq_from_legacy()
253 req->nr_rx_rings = nmr->nr_rx_rings; in nmreq_from_legacy()
254 req->nr_host_tx_rings = 0; in nmreq_from_legacy()
255 req->nr_host_rx_rings = 0; in nmreq_from_legacy()
256 req->nr_mem_id = nmr->nr_arg2; in nmreq_from_legacy()
276 nmreq_register_to_legacy(const struct nmreq_register *req, struct nmreq *nmr) in nmreq_register_to_legacy() argument
278 nmr->nr_offset = req->nr_offset; in nmreq_register_to_legacy()
279 nmr->nr_memsize = req->nr_memsize; in nmreq_register_to_legacy()
280 nmr->nr_tx_slots = req->nr_tx_slots; in nmreq_register_to_legacy()
281 nmr->nr_rx_slots = req->nr_rx_slots; in nmreq_register_to_legacy()
282 nmr->nr_tx_rings = req->nr_tx_rings; in nmreq_register_to_legacy()
283 nmr->nr_rx_rings = req->nr_rx_rings; in nmreq_register_to_legacy()
284 nmr->nr_arg2 = req->nr_mem_id; in nmreq_register_to_legacy()
285 nmr->nr_arg3 = req->nr_extra_bufs; in nmreq_register_to_legacy()
300 struct nmreq_register *req = in nmreq_to_legacy() local
302 nmreq_register_to_legacy(req, nmr); in nmreq_to_legacy()
306 struct nmreq_port_info_get *req = in nmreq_to_legacy() local
308 nmr->nr_memsize = req->nr_memsize; in nmreq_to_legacy()
309 nmr->nr_tx_slots = req->nr_tx_slots; in nmreq_to_legacy()
310 nmr->nr_rx_slots = req->nr_rx_slots; in nmreq_to_legacy()
311 nmr->nr_tx_rings = req->nr_tx_rings; in nmreq_to_legacy()
312 nmr->nr_rx_rings = req->nr_rx_rings; in nmreq_to_legacy()
313 nmr->nr_arg2 = req->nr_mem_id; in nmreq_to_legacy()
317 struct nmreq_vale_attach *req = in nmreq_to_legacy() local
319 nmreq_register_to_legacy(&req->reg, nmr); in nmreq_to_legacy()
326 struct nmreq_vale_list *req = in nmreq_to_legacy() local
329 nmr->nr_arg1 = req->nr_bridge_idx; in nmreq_to_legacy()
330 nmr->nr_arg2 = req->nr_port_idx; in nmreq_to_legacy()
335 struct nmreq_port_hdr *req = in nmreq_to_legacy() local
337 nmr->nr_arg1 = req->nr_hdr_len; in nmreq_to_legacy()
341 struct nmreq_vale_newif *req = in nmreq_to_legacy() local
343 nmr->nr_tx_slots = req->nr_tx_slots; in nmreq_to_legacy()
344 nmr->nr_rx_slots = req->nr_rx_slots; in nmreq_to_legacy()
345 nmr->nr_tx_rings = req->nr_tx_rings; in nmreq_to_legacy()
346 nmr->nr_rx_rings = req->nr_rx_rings; in nmreq_to_legacy()
347 nmr->nr_arg2 = req->nr_mem_id; in nmreq_to_legacy()