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/ice: fix flow FDIR/switch memory leak
[dpdk.git]
/
drivers
/
event
/
dsw
/
dsw_evdev.c
diff --git
a/drivers/event/dsw/dsw_evdev.c
b/drivers/event/dsw/dsw_evdev.c
index
2ecb365
..
7798a38
100644
(file)
--- a/
drivers/event/dsw/dsw_evdev.c
+++ b/
drivers/event/dsw/dsw_evdev.c
@@
-8,6
+8,7
@@
#include <rte_eventdev_pmd.h>
#include <rte_eventdev_pmd_vdev.h>
#include <rte_random.h>
#include <rte_eventdev_pmd.h>
#include <rte_eventdev_pmd_vdev.h>
#include <rte_random.h>
+#include <rte_ring_elem.h>
#include "dsw_evdev.h"
#include "dsw_evdev.h"
@@
-46,9
+47,11
@@
dsw_port_setup(struct rte_eventdev *dev, uint8_t port_id,
snprintf(ring_name, sizeof(ring_name), "dswctl%d_p%u",
dev->data->dev_id, port_id);
snprintf(ring_name, sizeof(ring_name), "dswctl%d_p%u",
dev->data->dev_id, port_id);
- ctl_in_ring = rte_ring_create(ring_name, DSW_CTL_IN_RING_SIZE,
- dev->data->socket_id,
- RING_F_SC_DEQ|RING_F_EXACT_SZ);
+ ctl_in_ring = rte_ring_create_elem(ring_name,
+ sizeof(struct dsw_ctl_msg),
+ DSW_CTL_IN_RING_SIZE,
+ dev->data->socket_id,
+ RING_F_SC_DEQ|RING_F_EXACT_SZ);
if (ctl_in_ring == NULL) {
rte_event_ring_free(in_ring);
if (ctl_in_ring == NULL) {
rte_event_ring_free(in_ring);
@@
-102,9
+105,6
@@
dsw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
if (RTE_EVENT_QUEUE_CFG_ALL_TYPES & conf->event_queue_cfg)
return -ENOTSUP;
if (RTE_EVENT_QUEUE_CFG_ALL_TYPES & conf->event_queue_cfg)
return -ENOTSUP;
- if (conf->schedule_type == RTE_SCHED_TYPE_ORDERED)
- return -ENOTSUP;
-
/* SINGLE_LINK is better off treated as TYPE_ATOMIC, since it
* avoid the "fake" TYPE_PARALLEL flow_id assignment. Since
* the queue will only have a single serving port, no
/* SINGLE_LINK is better off treated as TYPE_ATOMIC, since it
* avoid the "fake" TYPE_PARALLEL flow_id assignment. Since
* the queue will only have a single serving port, no
@@
-113,8
+113,12
@@
dsw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
*/
if (RTE_EVENT_QUEUE_CFG_SINGLE_LINK & conf->event_queue_cfg)
queue->schedule_type = RTE_SCHED_TYPE_ATOMIC;
*/
if (RTE_EVENT_QUEUE_CFG_SINGLE_LINK & conf->event_queue_cfg)
queue->schedule_type = RTE_SCHED_TYPE_ATOMIC;
- else /* atomic or parallel */
+ else {
+ if (conf->schedule_type == RTE_SCHED_TYPE_ORDERED)
+ return -ENOTSUP;
+ /* atomic or parallel */
queue->schedule_type = conf->schedule_type;
queue->schedule_type = conf->schedule_type;
+ }
queue->num_serving_ports = 0;
queue->num_serving_ports = 0;
@@
-217,7
+221,9
@@
dsw_info_get(struct rte_eventdev *dev __rte_unused,
.max_event_port_enqueue_depth = DSW_MAX_PORT_ENQUEUE_DEPTH,
.max_num_events = DSW_MAX_EVENTS,
.event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE|
.max_event_port_enqueue_depth = DSW_MAX_PORT_ENQUEUE_DEPTH,
.max_num_events = DSW_MAX_EVENTS,
.event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE|
- RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED
+ RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED|
+ RTE_EVENT_DEV_CAP_NONSEQ_MODE|
+ RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT
};
}
};
}
@@
-378,7
+384,10
@@
static struct rte_eventdev_ops dsw_evdev_ops = {
.dev_configure = dsw_configure,
.dev_start = dsw_start,
.dev_stop = dsw_stop,
.dev_configure = dsw_configure,
.dev_start = dsw_start,
.dev_stop = dsw_stop,
- .dev_close = dsw_close
+ .dev_close = dsw_close,
+ .xstats_get = dsw_xstats_get,
+ .xstats_get_names = dsw_xstats_get_names,
+ .xstats_get_by_name = dsw_xstats_get_by_name
};
static int
};
static int