Lines Matching full:handler
43 * moves it from one cpu to another. (The use of more than one handler per cpu
49 * each forwarding action. To achieve this, each handler will be assigned a
51 * received by a handler, the mixer of the expected sender is XOR'd into all
54 * the current handler. Apart from validating that the frame is taking the
57 * conditional branching. There is a "special" handler designated to act as the
65 * handlers and link-list them (but do no other handler setup).
68 * hp_cpu's 'iterator' to point to its first handler. With each loop,
69 * allocate rx/tx FQIDs and mixer values to the hp_cpu's iterator handler
71 * which connects the last handler to the first (and which is why phase 2
75 * hp_cpu's 'iterator' to point to its first handler. With each loop,
182 /* the "special" handler, that starts and terminates the test. */
252 static inline int process_frame_data(struct hp_handler *handler, in process_frame_data() argument
255 u32 *p = handler->frame_ptr; in process_frame_data()
259 if (qm_fd_addr_get64(fd) != handler->addr) { in process_frame_data()
261 qm_fd_addr_get64(fd), handler->addr); in process_frame_data()
265 *p ^= handler->rx_mixer; in process_frame_data()
270 *p ^= handler->tx_mixer; in process_frame_data()
281 struct hp_handler *handler = (struct hp_handler *)fq; in normal_dqrr() local
283 if (process_frame_data(handler, &dqrr->fd)) { in normal_dqrr()
287 if (qman_enqueue(&handler->tx, &dqrr->fd)) { in normal_dqrr()
300 struct hp_handler *handler = (struct hp_handler *)fq; in special_dqrr() local
302 process_frame_data(handler, &dqrr->fd); in special_dqrr()
304 if (qman_enqueue(&handler->tx, &dqrr->fd)) { in special_dqrr()
319 struct hp_handler *handler; in create_per_cpu_handlers() local
330 handler = kmem_cache_alloc(hp_handler_slab, GFP_KERNEL); in create_per_cpu_handlers()
331 if (!handler) { in create_per_cpu_handlers()
336 handler->processor_id = hp_cpu->processor_id; in create_per_cpu_handlers()
337 handler->addr = frame_dma; in create_per_cpu_handlers()
338 handler->frame_ptr = frame_ptr; in create_per_cpu_handlers()
339 list_add_tail(&handler->node, &hp_cpu->handlers); in create_per_cpu_handlers()
354 struct hp_handler *handler = list_entry(loop, struct hp_handler, in destroy_per_cpu_handlers() local
356 if (qman_retire_fq(&handler->rx, &flags) || in destroy_per_cpu_handlers()
362 if (qman_oos_fq(&handler->rx)) { in destroy_per_cpu_handlers()
367 qman_destroy_fq(&handler->rx); in destroy_per_cpu_handlers()
368 qman_destroy_fq(&handler->tx); in destroy_per_cpu_handlers()
369 qman_release_fqid(handler->fqid_rx); in destroy_per_cpu_handlers()
370 list_del(&handler->node); in destroy_per_cpu_handlers()
371 kmem_cache_free(hp_handler_slab, handler); in destroy_per_cpu_handlers()
392 struct hp_handler *handler = h; in init_handler() local
395 if (handler->processor_id != smp_processor_id()) { in init_handler()
400 memset(&handler->rx, 0, sizeof(handler->rx)); in init_handler()
401 if (handler == special_handler) in init_handler()
402 handler->rx.cb.dqrr = special_dqrr; in init_handler()
404 handler->rx.cb.dqrr = normal_dqrr; in init_handler()
405 err = qman_create_fq(handler->fqid_rx, 0, &handler->rx); in init_handler()
415 err = qman_init_fq(&handler->rx, QMAN_INITFQ_FLAG_SCHED | in init_handler()
422 memset(&handler->tx, 0, sizeof(handler->tx)); in init_handler()
423 err = qman_create_fq(handler->fqid_tx, QMAN_FQ_FLAG_NO_MODIFY, in init_handler()
424 &handler->tx); in init_handler()
447 struct hp_handler *handler; in init_phase2() local
461 /* Rx FQID is the previous handler's Tx FQID */ in init_phase2()
470 /* Rx mixer is the previous handler's Tx mixer */ in init_phase2()
477 /* Fix up the first handler (fqid_rx==0, rx_mixer=0xdeadbeef) */ in init_phase2()
479 handler = list_first_entry(&hp_cpu->handlers, struct hp_handler, node); in init_phase2()
480 if (handler->fqid_rx != 0 || handler->rx_mixer != 0xdeadbeef) in init_phase2()
482 handler->fqid_rx = fqid; in init_phase2()
483 handler->rx_mixer = lfsr; in init_phase2()
484 /* and tag it as our "special" handler */ in init_phase2()
485 special_handler = handler; in init_phase2()