[dpdk-dev] [PATCH v5 04/20] event/sw: add configure function
Jerin Jacob
jerin.jacob at caviumnetworks.com
Sat Mar 25 14:17:07 CET 2017
On Fri, Mar 24, 2017 at 04:52:59PM +0000, Harry van Haaren wrote:
> From: Bruce Richardson <bruce.richardson at intel.com>
>
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
> ---
> drivers/event/sw/sw_evdev.c | 15 +++++++++++++++
> drivers/event/sw/sw_evdev.h | 11 +++++++++++
> 2 files changed, 26 insertions(+)
>
> diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
> index 9d8517a..28a2326 100644
> --- a/drivers/event/sw/sw_evdev.c
> +++ b/drivers/event/sw/sw_evdev.c
> @@ -44,6 +44,20 @@
> #define SCHED_QUANTA_ARG "sched_quanta"
> #define CREDIT_QUANTA_ARG "credit_quanta"
>
> +static int
> +sw_dev_configure(const struct rte_eventdev *dev)
> +{
> + struct sw_evdev *sw = sw_pmd_priv(dev);
> + const struct rte_eventdev_data *data = dev->data;
> + const struct rte_event_dev_config *conf = &data->dev_conf;
> +
> + sw->qid_count = conf->nb_event_queues;
> + sw->port_count = conf->nb_event_ports;
> + sw->nb_events_limit = conf->nb_events_limit;
I think, we can add a check here to detect the unavailability of
per dequeue timeout support in the configure stage.
if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT)
return -ENOTSUP;
With that change,
Acked-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
More information about the dev
mailing list