Lines Matching refs: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,
255 u32 *p = handler->frame_ptr;
259 if (qm_fd_addr_get64(fd) != handler->addr) {
261 qm_fd_addr_get64(fd), handler->addr);
265 *p ^= handler->rx_mixer;
270 *p ^= handler->tx_mixer;
281 struct hp_handler *handler = (struct hp_handler *)fq;
283 if (process_frame_data(handler, &dqrr->fd)) {
287 if (qman_enqueue(&handler->tx, &dqrr->fd)) {
300 struct hp_handler *handler = (struct hp_handler *)fq;
302 process_frame_data(handler, &dqrr->fd);
304 if (qman_enqueue(&handler->tx, &dqrr->fd)) {
319 struct hp_handler *handler;
330 handler = kmem_cache_alloc(hp_handler_slab, GFP_KERNEL);
331 if (!handler) {
336 handler->processor_id = hp_cpu->processor_id;
337 handler->addr = frame_dma;
338 handler->frame_ptr = frame_ptr;
339 list_add_tail(&handler->node, &hp_cpu->handlers);
354 struct hp_handler *handler = list_entry(loop, struct hp_handler,
356 if (qman_retire_fq(&handler->rx, &flags) ||
362 if (qman_oos_fq(&handler->rx)) {
367 qman_destroy_fq(&handler->rx);
368 qman_destroy_fq(&handler->tx);
369 qman_release_fqid(handler->fqid_rx);
370 list_del(&handler->node);
371 kmem_cache_free(hp_handler_slab, handler);
392 struct hp_handler *handler = h;
395 if (handler->processor_id != smp_processor_id()) {
400 memset(&handler->rx, 0, sizeof(handler->rx));
401 if (handler == special_handler)
402 handler->rx.cb.dqrr = special_dqrr;
404 handler->rx.cb.dqrr = normal_dqrr;
405 err = qman_create_fq(handler->fqid_rx, 0, &handler->rx);
415 err = qman_init_fq(&handler->rx, QMAN_INITFQ_FLAG_SCHED |
422 memset(&handler->tx, 0, sizeof(handler->tx));
423 err = qman_create_fq(handler->fqid_tx, QMAN_FQ_FLAG_NO_MODIFY,
424 &handler->tx);
447 struct hp_handler *handler;
461 /* Rx FQID is the previous handler's Tx FQID */
470 /* Rx mixer is the previous handler's Tx mixer */
477 /* Fix up the first handler (fqid_rx==0, rx_mixer=0xdeadbeef) */
479 handler = list_first_entry(&hp_cpu->handlers, struct hp_handler, node);
480 if (handler->fqid_rx != 0 || handler->rx_mixer != 0xdeadbeef)
482 handler->fqid_rx = fqid;
483 handler->rx_mixer = lfsr;
484 /* and tag it as our "special" handler */
485 special_handler = handler;