Lines Matching refs:queue

185  * For a given PKO port number, return the base output queue
189 * @return Base output queue
247 cvmx_dprintf("pko_port %d (interface%d index%d) has %d queues (queue base = %d)\n",
287 int queue, base_queue, num_queues;
301 * Give the user a chance to override the per queue priorities.
307 * static queue priority validation
309 for (queue = 0; queue < num_queues; queue++)
312 priorities[queue] == CVMX_PKO_QUEUE_STATIC_PRIORITY)
313 static_priority_base = queue;
317 priorities[queue] != CVMX_PKO_QUEUE_STATIC_PRIORITY &&
318 queue)
319 static_priority_end = queue - 1;
322 queue == num_queues - 1)
323 static_priority_end = queue; /* all queues are static priority */
328 * queue 0.
331 (int)queue > static_priority_end &&
332 priorities[queue] == CVMX_PKO_QUEUE_STATIC_PRIORITY)
335 "queues aren't contiguous or don't start at base queue. "
336 "q: %d, eq: %d\n", (int)queue, static_priority_end);
341 "queues don't start at base queue. sq: %d\n",
348 * each queue
350 for (queue = 0; queue < num_queues; queue++)
353 config.s.index = queue;
354 config.s.qid = base_queue + queue;
356 config.s.tail = (queue == (num_queues - 1));
357 config.s.s_tail = (queue == static_priority_end);
359 config.s.static_q = (queue <= static_priority_end);
366 switch ((int)priorities[queue])
383 (unsigned long long)priorities[queue]);
395 CVMX_CMD_QUEUE_PKO(base_queue + queue),
413 cvmx_dprintf("ERROR: __cvmx_pko_iport_config: Command queue initialization failed.");
416 cvmx_dprintf(" pko_port%d base_queue%d num_queues%d queue%d.\n",
417 pko_port, base_queue, num_queues, queue);
421 CVMX_CMD_QUEUE_PKO(base_queue + queue));
729 int queue;
737 for (queue = 0; queue < CVMX_PKO_MAX_OUTPUT_QUEUES; queue++)
739 config.s.qid = queue;
741 cvmx_cmd_queue_shutdown(CVMX_CMD_QUEUE_PKO(queue));
747 for (queue=0; queue<CVMX_PKO_MAX_OUTPUT_QUEUES; queue++)
753 config.s.queue = queue & 0x7f;
760 config1.s.qid7 = queue >> 7;
764 cvmx_cmd_queue_shutdown(CVMX_CMD_QUEUE_PKO(queue));
775 * @param base_queue First queue number to associate with this port.
777 * @param priority Array of priority levels for each queue. Values are
792 uint64_t queue;
811 cvmx_dprintf("ERROR: cvmx_pko_config_port: Invalid queue range %llu\n",
819 * Validate the static queue priority setup and set
822 for (queue = 0; queue < num_queues; queue++)
824 /* Find first queue of static priority */
825 if (static_priority_base == -1 && priority[queue] ==
827 static_priority_base = queue;
828 /* Find last queue of static priority */
830 priority[queue] != CVMX_PKO_QUEUE_STATIC_PRIORITY && queue)
831 static_priority_end = queue - 1;
833 queue == num_queues - 1)
834 static_priority_end = queue; /* all queues're static priority */
839 * queue 0.
841 if (static_priority_end != -1 && (int)queue > static_priority_end &&
842 priority[queue] == CVMX_PKO_QUEUE_STATIC_PRIORITY)
845 "queues aren't contiguous or don't start at base queue. "
846 "q: %d, eq: %d\n", (int)queue, static_priority_end);
853 "don't start at base queue. sq: %d\n", static_priority_base);
860 * both -1, or are valid start/end queue numbers
871 for (queue = 0; queue < num_queues; queue++)
876 config1.s.idx3 = queue >> 3;
877 config1.s.qid7 = (base_queue + queue) >> 7;
880 config.s.tail = queue == (num_queues - 1);
881 config.s.index = queue;
883 config.s.queue = base_queue + queue;
886 config.s.static_q = (int)queue <= static_priority_end;
887 config.s.s_tail = (int)queue == static_priority_end;
892 switch ((int)priority[queue])
908 (unsigned long long)priority[queue]);
917 CVMX_CMD_QUEUE_PKO(base_queue + queue),
937 "Command queue initialization failed.\n");
943 CVMX_CMD_QUEUE_PKO(base_queue + queue));