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,
180 /* the "special" handler, that starts and terminates the test. */
250 static inline int process_frame_data(struct hp_handler *handler,
253 u32 *p = handler->frame_ptr;
257 if (qm_fd_addr_get64(fd) != handler->addr) {
259 qm_fd_addr_get64(fd), handler->addr);
263 *p ^= handler->rx_mixer;
268 *p ^= handler->tx_mixer;
279 struct hp_handler *handler = (struct hp_handler *)fq;
281 if (process_frame_data(handler, &dqrr->fd)) {
285 if (qman_enqueue(&handler->tx, &dqrr->fd)) {
298 struct hp_handler *handler = (struct hp_handler *)fq;
300 process_frame_data(handler, &dqrr->fd);
302 if (qman_enqueue(&handler->tx, &dqrr->fd)) {
317 struct hp_handler *handler;
328 handler = kmem_cache_alloc(hp_handler_slab, GFP_KERNEL);
329 if (!handler) {
334 handler->processor_id = hp_cpu->processor_id;
335 handler->addr = frame_dma;
336 handler->frame_ptr = frame_ptr;
337 list_add_tail(&handler->node, &hp_cpu->handlers);
352 struct hp_handler *handler = list_entry(loop, struct hp_handler,
354 if (qman_retire_fq(&handler->rx, &flags) ||
360 if (qman_oos_fq(&handler->rx)) {
365 qman_destroy_fq(&handler->rx);
366 qman_destroy_fq(&handler->tx);
367 qman_release_fqid(handler->fqid_rx);
368 list_del(&handler->node);
369 kmem_cache_free(hp_handler_slab, handler);
390 struct hp_handler *handler = h;
393 if (handler->processor_id != smp_processor_id()) {
398 memset(&handler->rx, 0, sizeof(handler->rx));
399 if (handler == special_handler)
400 handler->rx.cb.dqrr = special_dqrr;
402 handler->rx.cb.dqrr = normal_dqrr;
403 err = qman_create_fq(handler->fqid_rx, 0, &handler->rx);
413 err = qman_init_fq(&handler->rx, QMAN_INITFQ_FLAG_SCHED |
420 memset(&handler->tx, 0, sizeof(handler->tx));
421 err = qman_create_fq(handler->fqid_tx, QMAN_FQ_FLAG_NO_MODIFY,
422 &handler->tx);
445 struct hp_handler *handler;
459 /* Rx FQID is the previous handler's Tx FQID */
468 /* Rx mixer is the previous handler's Tx mixer */
475 /* Fix up the first handler (fqid_rx==0, rx_mixer=0xdeadbeef) */
477 handler = list_first_entry(&hp_cpu->handlers, struct hp_handler, node);
478 if (handler->fqid_rx != 0 || handler->rx_mixer != 0xdeadbeef)
480 handler->fqid_rx = fqid;
481 handler->rx_mixer = lfsr;
482 /* and tag it as our "special" handler */
483 special_handler = handler;