}
}
/* Check if queue id has been setup already */
- for (uint32_t i = 0; i < device->nb_q_md; i++) {
+ uint32_t i;
+ for (i = 0; i < device->nb_q_md; i++) {
if (device->q_md[i].ext_id == queue_id) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
"queue id %u already setup\n",
fprintf(f,
"\n\n -- RING STATISTICS --\n");
-
- for (uint32_t i = 0; i < device->nb_opdls; i++)
+ uint32_t i;
+ for (i = 0; i < device->nb_opdls; i++)
opdl_ring_dump(device->opdl[i], f);
fprintf(f,
"Av. Grant Size Av. Cycles PP"
" Empty DEQs Non Empty DEQs Pkts Processed\n");
- for (uint32_t i = 0; i < device->max_port_nb; i++) {
+ for (i = 0; i < device->max_port_nb; i++) {
char queue_id[64];
char total_cyc[64];
const char *p_type;
"Stages and dependents"
" are not for same opdl ring",
opdl_pmd_dev_id(device));
- for (uint32_t k = 0;
- k < device->nb_opdls; k++) {
+ uint32_t k;
+ for (k = 0; k < device->nb_opdls; k++) {
opdl_ring_dump(device->opdl[k],
stdout);
}
destroy_queues_and_rings(struct rte_eventdev *dev)
{
struct opdl_evdev *device = opdl_pmd_priv(dev);
+ uint32_t i;
- for (uint32_t i = 0; i < device->nb_opdls; i++) {
+ for (i = 0; i < device->nb_opdls; i++) {
if (device->opdl[i])
opdl_ring_free(device->opdl[i]);
}
OPDL_Q_POS_START,
-1);
- for (uint32_t i = 0; i < device->nb_q_md; i++) {
+ uint32_t i;
+ for (i = 0; i < device->nb_q_md; i++) {
/* Check */
if (!device->q_md[i].setup) {
struct opdl_evdev *device = opdl_pmd_priv(dev);
- for (uint32_t i = 0; i < device->nb_ports; i++) {
+ uint32_t i;
+ for (i = 0; i < device->nb_ports; i++) {
struct opdl_port *port = &device->ports[i];
struct opdl_queue *queue = &device->queue[port->queue_id];
* setup the last bit of stage md
*/
if (!err) {
- for (uint32_t i = 0; i < device->nb_ports; i++) {
+ for (i = 0; i < device->nb_ports; i++) {
struct opdl_port *port = &device->ports[i];
struct opdl_queue *queue =
&device->queue[port->queue_id];
struct opdl_evdev *device = opdl_pmd_priv(dev);
/* Assign queue zero and figure out how many Q0 ports we have */
- for (uint32_t i = 0; i < device->nb_ports; i++) {
+ uint32_t i;
+ for (i = 0; i < device->nb_ports; i++) {
struct opdl_port *port = &device->ports[i];
if (port->queue_id == OPDL_INVALID_QID) {
port->queue_id = 0;
if (stage_inst) {
/* Assign the new created input stage to all relevant ports */
- for (uint32_t i = 0; i < device->nb_ports; i++) {
+ for (i = 0; i < device->nb_ports; i++) {
struct opdl_port *port = &device->ports[i];
if (port->queue_id == 0) {
queue = &device->queue[port->queue_id];
{
int err = 0;
struct opdl_evdev *device = opdl_pmd_priv(dev);
+ uint32_t i;
- for (uint32_t i = 0; i < device->nb_ports; i++) {
+ for (i = 0; i < device->nb_ports; i++) {
struct opdl_port *port = &device->ports[i];
if (port->external_qid != OPDL_INVALID_QID) {
port->queue_id =
uint32_t port_idx = queue_port_id * max_num_port_xstat;
- for (uint32_t j = 0; j < max_num_port_xstat; j++) {
+ uint32_t j;
+ for (j = 0; j < max_num_port_xstat; j++) {
strcpy(xstats_names[j].name,
device->port_xstat[j + port_idx].stat.name);
uint32_t p_start = queue_port_id * max_num_port_xstat;
uint32_t p_finish = p_start + max_num_port_xstat;
- for (uint32_t i = 0; i < n; i++) {
+ uint32_t i;
+ for (i = 0; i < n; i++) {
if (ids[i] < p_start || ids[i] >= p_finish)
return -EINVAL;
uint32_t max_index = device->max_port_nb * max_num_port_xstat;
- for (uint32_t i = 0; i < max_index; i++) {
+ uint32_t i;
+ for (i = 0; i < max_index; i++) {
if (strncmp(name,
device->port_xstat[i].stat.name,
return -1;
}
- for (int j = 0; j < 3; j++) {
+ int j;
+ for (j = 0; j < 3; j++) {
deq_ev[j].op = RTE_EVENT_OP_FORWARD;
deq_ev[j].queue_id = t->qid[1];
}
check_statistics(void)
{
int num_ports = 3; /* Hard-coded for this app */
+ int i;
- for (int i = 0; i < num_ports; i++) {
+ for (i = 0; i < num_ports; i++) {
int num_stats, num_stats_returned;
num_stats = rte_event_dev_xstats_names_get(0,