* [dpdk-dev] [PATCH 1/2] event/dpaa: fix number of supported atomic flows @ 2019-10-11 13:47 Nipun Gupta 2019-10-11 13:47 ` [dpdk-dev] [PATCH 2/2] event/dpaa: support Tx adapter Nipun Gupta 2019-10-16 6:40 ` [dpdk-dev] [PATCH 1/2] event/dpaa: fix number of supported atomic flows Hemant Agrawal 0 siblings, 2 replies; 5+ messages in thread From: Nipun Gupta @ 2019-10-11 13:47 UTC (permalink / raw) To: dev; +Cc: jerinj, hemant.agrawal, stable, Nipun Gupta The number of atomic flows supported was not returned correctly for DPAA driver. This patch fixes the same. Fixes: b08dc6430abd ("event/dpaa: add queue config get/set") Cc: stable@dpdk.org Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> --- drivers/event/dpaa/dpaa_eventdev.c | 1 + drivers/event/dpaa/dpaa_eventdev.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index d02b8694e..570983251 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -471,6 +471,7 @@ dpaa_event_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id, RTE_SET_USED(queue_id); memset(queue_conf, 0, sizeof(struct rte_event_queue_conf)); + queue_conf->nb_atomic_flows = DPAA_EVENT_QUEUE_ATOMIC_FLOWS; queue_conf->schedule_type = RTE_SCHED_TYPE_PARALLEL; queue_conf->priority = RTE_EVENT_DEV_PRIORITY_HIGHEST; } diff --git a/drivers/event/dpaa/dpaa_eventdev.h b/drivers/event/dpaa/dpaa_eventdev.h index b8f247c61..5ce15a3db 100644 --- a/drivers/event/dpaa/dpaa_eventdev.h +++ b/drivers/event/dpaa/dpaa_eventdev.h @@ -32,7 +32,7 @@ do { \ RTE_EVENT_DEV_CAP_BURST_MODE; \ } while (0) -#define DPAA_EVENT_QUEUE_ATOMIC_FLOWS 0 +#define DPAA_EVENT_QUEUE_ATOMIC_FLOWS 2048 #define DPAA_EVENT_QUEUE_ORDER_SEQUENCES 2048 #define RTE_EVENT_ETH_RX_ADAPTER_DPAA_CAP \ -- 2.17.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/2] event/dpaa: support Tx adapter 2019-10-11 13:47 [dpdk-dev] [PATCH 1/2] event/dpaa: fix number of supported atomic flows Nipun Gupta @ 2019-10-11 13:47 ` Nipun Gupta 2019-10-16 6:41 ` Hemant Agrawal 2019-10-16 6:40 ` [dpdk-dev] [PATCH 1/2] event/dpaa: fix number of supported atomic flows Hemant Agrawal 1 sibling, 1 reply; 5+ messages in thread From: Nipun Gupta @ 2019-10-11 13:47 UTC (permalink / raw) To: dev; +Cc: jerinj, hemant.agrawal, Nipun Gupta This patch adds the support of Tx adapter for DPAA1 platform Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> --- drivers/event/dpaa/dpaa_eventdev.c | 75 ++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 5 deletions(-) diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index 570983251..b8761c6a9 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -27,6 +27,7 @@ #include <rte_eventdev_pmd_vdev.h> #include <rte_ethdev.h> #include <rte_event_eth_rx_adapter.h> +#include <rte_event_eth_tx_adapter.h> #include <rte_cryptodev.h> #include <rte_dpaa_bus.h> #include <rte_dpaa_logs.h> @@ -864,6 +865,66 @@ dpaa_eventdev_crypto_stop(const struct rte_eventdev *dev, return 0; } +static int +dpaa_eventdev_tx_adapter_create(uint8_t id, + const struct rte_eventdev *dev) +{ + RTE_SET_USED(id); + RTE_SET_USED(dev); + + /* Nothing to do. Simply return. */ + return 0; +} + +static int +dpaa_eventdev_tx_adapter_caps(const struct rte_eventdev *dev, + const struct rte_eth_dev *eth_dev, + uint32_t *caps) +{ + RTE_SET_USED(dev); + RTE_SET_USED(eth_dev); + + *caps = RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT; + return 0; +} + +static uint16_t +dpaa_eventdev_txa_enqueue_same_dest(void *port, + struct rte_event ev[], + uint16_t nb_events) +{ + struct rte_mbuf *m[DPAA_EVENT_MAX_PORT_ENQUEUE_DEPTH], *m0; + uint8_t qid, i; + + RTE_SET_USED(port); + + m0 = (struct rte_mbuf *)ev[0].mbuf; + qid = rte_event_eth_tx_adapter_txq_get(m0); + + for (i = 0; i < nb_events; i++) + m[i] = (struct rte_mbuf *)ev[i].mbuf; + + return rte_eth_tx_burst(m0->port, qid, m, nb_events); +} + +static uint16_t +dpaa_eventdev_txa_enqueue(void *port, + struct rte_event ev[], + uint16_t nb_events) +{ + struct rte_mbuf *m = (struct rte_mbuf *)ev[0].mbuf; + uint8_t qid, i; + + RTE_SET_USED(port); + + for (i = 0; i < nb_events; i++) { + qid = rte_event_eth_tx_adapter_txq_get(m); + rte_eth_tx_burst(m->port, qid, &m, 1); + } + + return nb_events; +} + static struct rte_eventdev_ops dpaa_eventdev_ops = { .dev_infos_get = dpaa_event_dev_info_get, .dev_configure = dpaa_event_dev_configure, @@ -879,11 +940,13 @@ static struct rte_eventdev_ops dpaa_eventdev_ops = { .port_link = dpaa_event_port_link, .port_unlink = dpaa_event_port_unlink, .timeout_ticks = dpaa_event_dequeue_timeout_ticks, - .eth_rx_adapter_caps_get = dpaa_event_eth_rx_adapter_caps_get, - .eth_rx_adapter_queue_add = dpaa_event_eth_rx_adapter_queue_add, - .eth_rx_adapter_queue_del = dpaa_event_eth_rx_adapter_queue_del, - .eth_rx_adapter_start = dpaa_event_eth_rx_adapter_start, - .eth_rx_adapter_stop = dpaa_event_eth_rx_adapter_stop, + .eth_rx_adapter_caps_get = dpaa_event_eth_rx_adapter_caps_get, + .eth_rx_adapter_queue_add = dpaa_event_eth_rx_adapter_queue_add, + .eth_rx_adapter_queue_del = dpaa_event_eth_rx_adapter_queue_del, + .eth_rx_adapter_start = dpaa_event_eth_rx_adapter_start, + .eth_rx_adapter_stop = dpaa_event_eth_rx_adapter_stop, + .eth_tx_adapter_caps_get = dpaa_eventdev_tx_adapter_caps, + .eth_tx_adapter_create = dpaa_eventdev_tx_adapter_create, .crypto_adapter_caps_get = dpaa_eventdev_crypto_caps_get, .crypto_adapter_queue_pair_add = dpaa_eventdev_crypto_queue_add, .crypto_adapter_queue_pair_del = dpaa_eventdev_crypto_queue_del, @@ -956,6 +1019,8 @@ dpaa_event_dev_create(const char *name, const char *params) eventdev->dequeue = dpaa_event_dequeue_intr; eventdev->dequeue_burst = dpaa_event_dequeue_burst_intr; } + eventdev->txa_enqueue = dpaa_eventdev_txa_enqueue; + eventdev->txa_enqueue_same_dest = dpaa_eventdev_txa_enqueue_same_dest; RTE_LOG(INFO, PMD, "%s eventdev added", name); -- 2.17.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] event/dpaa: support Tx adapter 2019-10-11 13:47 ` [dpdk-dev] [PATCH 2/2] event/dpaa: support Tx adapter Nipun Gupta @ 2019-10-16 6:41 ` Hemant Agrawal 0 siblings, 0 replies; 5+ messages in thread From: Hemant Agrawal @ 2019-10-16 6:41 UTC (permalink / raw) To: Nipun Gupta, dev; +Cc: jerinj, Nipun Gupta Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] event/dpaa: fix number of supported atomic flows 2019-10-11 13:47 [dpdk-dev] [PATCH 1/2] event/dpaa: fix number of supported atomic flows Nipun Gupta 2019-10-11 13:47 ` [dpdk-dev] [PATCH 2/2] event/dpaa: support Tx adapter Nipun Gupta @ 2019-10-16 6:40 ` Hemant Agrawal 2019-10-16 7:58 ` Jerin Jacob 1 sibling, 1 reply; 5+ messages in thread From: Hemant Agrawal @ 2019-10-16 6:40 UTC (permalink / raw) To: Nipun Gupta, dev; +Cc: jerinj, stable, Nipun Gupta Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] event/dpaa: fix number of supported atomic flows 2019-10-16 6:40 ` [dpdk-dev] [PATCH 1/2] event/dpaa: fix number of supported atomic flows Hemant Agrawal @ 2019-10-16 7:58 ` Jerin Jacob 0 siblings, 0 replies; 5+ messages in thread From: Jerin Jacob @ 2019-10-16 7:58 UTC (permalink / raw) To: Hemant Agrawal; +Cc: Nipun Gupta, dev, jerinj, stable On Wed, Oct 16, 2019 at 12:11 PM Hemant Agrawal <hemant.agrawal@nxp.com> wrote: > > Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> > Series applied to dpdk-next-eventdev/master. Thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-16 7:58 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-10-11 13:47 [dpdk-dev] [PATCH 1/2] event/dpaa: fix number of supported atomic flows Nipun Gupta 2019-10-11 13:47 ` [dpdk-dev] [PATCH 2/2] event/dpaa: support Tx adapter Nipun Gupta 2019-10-16 6:41 ` Hemant Agrawal 2019-10-16 6:40 ` [dpdk-dev] [PATCH 1/2] event/dpaa: fix number of supported atomic flows Hemant Agrawal 2019-10-16 7:58 ` Jerin Jacob
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).