git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/virtio_user: remove redundant declaration
[dpdk.git]
/
drivers
/
event
/
opdl
/
opdl_evdev_init.c
diff --git
a/drivers/event/opdl/opdl_evdev_init.c
b/drivers/event/opdl/opdl_evdev_init.c
index
c37d8bc
..
15aae47
100644
(file)
--- a/
drivers/event/opdl/opdl_evdev_init.c
+++ b/
drivers/event/opdl/opdl_evdev_init.c
@@
-1,6
+1,5
@@
-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2014 Intel Corporation
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2017 Intel Corporation
*/
#include <inttypes.h>
*/
#include <inttypes.h>
@@
-36,7
+35,7
@@
enqueue_check(struct opdl_port *p,
p->id,
ev[i].queue_id,
p->next_external_qid);
p->id,
ev[i].queue_id,
p->next_external_qid);
- rte_errno =
-
EINVAL;
+ rte_errno = EINVAL;
return 0;
}
}
return 0;
}
}
@@
-64,7
+63,7
@@
enqueue_check(struct opdl_port *p,
} else {
if (num > 0 &&
ev[0].queue_id != p->next_external_qid) {
} else {
if (num > 0 &&
ev[0].queue_id != p->next_external_qid) {
- rte_errno =
-
EINVAL;
+ rte_errno = EINVAL;
return 0;
}
}
return 0;
}
}
@@
-117,7
+116,7
@@
opdl_rx_error_enqueue(struct opdl_port *p,
RTE_SET_USED(ev);
RTE_SET_USED(num);
RTE_SET_USED(ev);
RTE_SET_USED(num);
- rte_errno =
-
ENOSPC;
+ rte_errno = ENOSPC;
return 0;
}
return 0;
}
@@
-146,7
+145,7
@@
opdl_rx_enqueue(struct opdl_port *p,
if (enqueued < num)
if (enqueued < num)
- rte_errno =
-
ENOSPC;
+ rte_errno = ENOSPC;
return enqueued;
}
return enqueued;
}
@@
-165,7
+164,7
@@
opdl_tx_error_dequeue(struct opdl_port *p,
RTE_SET_USED(ev);
RTE_SET_USED(num);
RTE_SET_USED(ev);
RTE_SET_USED(num);
- rte_errno =
-
ENOSPC;
+ rte_errno = ENOSPC;
return 0;
}
return 0;
}
@@
-241,7
+240,7
@@
opdl_claim(struct opdl_port *p, struct rte_event ev[], uint16_t num)
"Attempt to dequeue num of events larger than port (%d) max",
opdl_pmd_dev_id(p->opdl),
p->id);
"Attempt to dequeue num of events larger than port (%d) max",
opdl_pmd_dev_id(p->opdl),
p->id);
- rte_errno =
-
EINVAL;
+ rte_errno = EINVAL;
return 0;
}
return 0;
}
@@
-314,8
+313,8
@@
static int opdl_add_deps(struct opdl_evdev *device,
"Stages and dependents"
" are not for same opdl ring",
opdl_pmd_dev_id(device));
"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);
}
opdl_ring_dump(device->opdl[k],
stdout);
}
@@
-505,8
+504,9
@@
void
destroy_queues_and_rings(struct rte_eventdev *dev)
{
struct opdl_evdev *device = opdl_pmd_priv(dev);
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]);
}
if (device->opdl[i])
opdl_ring_free(device->opdl[i]);
}
@@
-639,7
+639,8
@@
create_queues_and_rings(struct rte_eventdev *dev)
OPDL_Q_POS_START,
-1);
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) {
/* Check */
if (!device->q_md[i].setup) {
@@
-702,7
+703,8
@@
initialise_all_other_ports(struct rte_eventdev *dev)
struct opdl_evdev *device = opdl_pmd_priv(dev);
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];
struct opdl_port *port = &device->ports[i];
struct opdl_queue *queue = &device->queue[port->queue_id];
@@
-731,6
+733,9
@@
initialise_all_other_ports(struct rte_eventdev *dev)
queue->ports[queue->nb_ports] = port;
port->instance_id = queue->nb_ports;
queue->nb_ports++;
queue->ports[queue->nb_ports] = port;
port->instance_id = queue->nb_ports;
queue->nb_ports++;
+ opdl_stage_set_queue_id(stage_inst,
+ port->queue_id);
+
} else if (queue->q_pos == OPDL_Q_POS_END) {
/* tx port */
} else if (queue->q_pos == OPDL_Q_POS_END) {
/* tx port */
@@
-827,7
+832,7
@@
initialise_all_other_ports(struct rte_eventdev *dev)
* setup the last bit of stage md
*/
if (!err) {
* 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_port *port = &device->ports[i];
struct opdl_queue *queue =
&device->queue[port->queue_id];
@@
-872,7
+877,8
@@
initialise_queue_zero_ports(struct rte_eventdev *dev)
struct opdl_evdev *device = opdl_pmd_priv(dev);
/* Assign queue zero and figure out how many Q0 ports we have */
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;
struct opdl_port *port = &device->ports[i];
if (port->queue_id == OPDL_INVALID_QID) {
port->queue_id = 0;
@@
-889,7
+895,7
@@
initialise_queue_zero_ports(struct rte_eventdev *dev)
if (stage_inst) {
/* Assign the new created input stage to all relevant ports */
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];
struct opdl_port *port = &device->ports[i];
if (port->queue_id == 0) {
queue = &device->queue[port->queue_id];
@@
-914,8
+920,9
@@
assign_internal_queue_ids(struct rte_eventdev *dev)
{
int err = 0;
struct opdl_evdev *device = opdl_pmd_priv(dev);
{
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 =
struct opdl_port *port = &device->ports[i];
if (port->external_qid != OPDL_INVALID_QID) {
port->queue_id =