DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Rao, Nikhil" <nikhil.rao@intel.com>
To: Nipun Gupta <nipun.gupta@nxp.com>, dev@dpdk.org
Cc: hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com
Subject: Re: [dpdk-dev] [PATCH 3/4] event/dpaa2: support event eth adapter
Date: Wed, 11 Oct 2017 09:40:21 +0530	[thread overview]
Message-ID: <06dd15c2-ed06-2dfc-fa2b-05759c0885f1@intel.com> (raw)
In-Reply-To: <1507657887-11366-3-git-send-email-nipun.gupta@nxp.com>

On 10/10/2017 11:21 PM, Nipun Gupta wrote:
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
>   drivers/event/Makefile               |  4 +-
>   drivers/event/dpaa2/Makefile         |  2 +
>   drivers/event/dpaa2/dpaa2_eventdev.c | 96 +++++++++++++++++++++++++++++++++++-
>   drivers/event/dpaa2/dpaa2_eventdev.h |  8 +++
>   4 files changed, 107 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
> index 6967741..ca782c3 100644
> --- a/drivers/event/dpaa2/dpaa2_eventdev.c
> +++ b/drivers/event/dpaa2/dpaa2_eventdev.c
> @@ -53,11 +53,14 @@
>   #include <rte_memzone.h>
>   #include <rte_pci.h>
>   #include <rte_vdev.h>
> +#include <rte_ethdev.h>
> +#include <rte_event_eth_rx_adapter.h>
>   
>   #include <fslmc_vfio.h>
>   #include <dpaa2_hw_pvt.h>
>   #include <dpaa2_hw_mempool.h>
>   #include <dpaa2_hw_dpio.h>
> +#include <dpaa2_ethdev.h>
>   #include "dpaa2_eventdev.h"
>   #include <portal/dpaa2_hw_pvt.h>
>   #include <mc/fsl_dpci.h>
> @@ -557,6 +560,92 @@ static void dpaa2_eventdev_process_atomic(struct qbman_swp *swp,
>   	RTE_SET_USED(f);
>   }
>   
> +static int
> +dpaa2_eventdev_eth_caps_get(const struct rte_eventdev *dev,
> +			    const struct rte_eth_dev *eth_dev,
> +			    uint32_t *caps)
> +{
> +	const char *ethdev_driver = eth_dev->device->driver->name;
> +
> +	PMD_DRV_FUNC_TRACE();
> +
> +	RTE_SET_USED(dev);
> +
> +	if (!strcmp(ethdev_driver, "net_dpaa2"))
> +		*caps = RTE_EVENT_ETH_RX_ADAPTER_DPAA2_CAP;
> +	else
> +		*caps = RTE_EVENT_ETH_RX_ADAPTER_SW_CAP;
> +
> +	return 0;
> +}
> +
> +static int
> +dpaa2_eventdev_eth_queue_add(const struct rte_eventdev *dev,
> +		const struct rte_eth_dev *eth_dev,
> +		int32_t rx_queue_id,
> +		const struct rte_event_eth_rx_adapter_queue_conf *queue_conf)
> +{
> +	struct dpaa2_eventdev *priv = dev->data->dev_private;
> +	uint8_t ev_qid = queue_conf->ev.queue_id;
> +	uint16_t dpcon_id = priv->evq_info[ev_qid].dpcon->dpcon_id;
> +	int ret;
> +
> +	PMD_DRV_FUNC_TRACE();
> +
> +	ret = dpaa2_eth_eventq_attach(eth_dev, rx_queue_id,
> +		dpcon_id, queue_conf);

Shouldn't the _add & _del functions be handling the case where 
rx_queue_id == -1 ?

> +	if (ret) {
> +		PMD_DRV_ERR("dpaa2_eth_eventq_attach failed: ret: %d\n", ret);
> +		return ret;
> +	}
> +	return 0;
> +}
> +
> +static int
> +dpaa2_eventdev_eth_queue_del(const struct rte_eventdev *dev,
> +			     const struct rte_eth_dev *eth_dev,
> +			     int32_t rx_queue_id)
> +{
> +	int ret;
> +
> +	PMD_DRV_FUNC_TRACE();
> +
> +	RTE_SET_USED(dev);
> +
> +	ret = dpaa2_eth_eventq_detach(eth_dev, rx_queue_id);
> +	if (ret) {
> +		PMD_DRV_ERR("dpaa2_eth_eventq_detach failed: ret: %d\n", ret);
> +		return ret;
> +	}
> +	return 0;
> +
> +	return 0;
> +}
> +

Nikhil

  parent reply	other threads:[~2017-10-11  4:10 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 17:51 [dpdk-dev] [PATCH 1/4] drivers: add queue parameter in event processing callback Nipun Gupta
2017-10-10 17:51 ` [dpdk-dev] [PATCH 2/4] net/dpaa2: add API's to support event eth adapter Nipun Gupta
2017-10-10 17:51 ` [dpdk-dev] [PATCH 3/4] event/dpaa2: " Nipun Gupta
2017-10-11  3:45   ` Rao, Nikhil
2017-10-11 11:03     ` Nipun Gupta
2017-10-11  4:10   ` Rao, Nikhil [this message]
2017-10-11 11:03     ` Nipun Gupta
2017-10-10 17:51 ` [dpdk-dev] [PATCH 4/4] event/dpaa2: improve the err handling and log msg Nipun Gupta
2017-10-12 17:18 ` [dpdk-dev] [PATCH v2 1/4] drivers: add queue parameter in event processing callback Nipun Gupta
2017-10-12 17:18   ` [dpdk-dev] [PATCH v2 2/4] net/dpaa2: add API's to support event eth adapter Nipun Gupta
2017-10-13 14:55     ` Hemant Agrawal
2017-10-12 17:18   ` [dpdk-dev] [PATCH v2 3/4] event/dpaa2: " Nipun Gupta
2017-10-13  5:57     ` Rao, Nikhil
2017-10-13 14:52       ` Hemant Agrawal
2017-10-12 17:18   ` [dpdk-dev] [PATCH v2 4/4] event/dpaa2: improve the err handling and log msg Nipun Gupta
2017-10-13 14:52     ` Hemant Agrawal
2017-10-13 14:48   ` [dpdk-dev] [PATCH v2 1/4] drivers: add queue parameter in event processing callback Hemant Agrawal
2017-10-16 21:44 ` [dpdk-dev] [PATCH v3 " Nipun Gupta
2017-10-16 21:44   ` [dpdk-dev] [PATCH v3 2/4] net/dpaa2: add API's to support event eth adapter Nipun Gupta
2017-10-16 21:44   ` [dpdk-dev] [PATCH v3 3/4] event/dpaa2: " Nipun Gupta
2017-10-17  5:00     ` Jerin Jacob
2017-10-17 10:28       ` Nipun Gupta
2017-10-16 21:44   ` [dpdk-dev] [PATCH v3 4/4] event/dpaa2: improve the err handling and log msg Nipun Gupta
2017-10-17 16:38 ` [dpdk-dev] [PATCH v4 1/5] drivers: add queue parameter in event processing callback Nipun Gupta
2017-10-17 16:38   ` [dpdk-dev] [PATCH v4 2/5] net/dpaa2: add API's to support event eth adapter Nipun Gupta
2017-10-17 12:32     ` Hemant Agrawal
2017-10-17 16:38   ` [dpdk-dev] [PATCH v4 3/5] drivers: add net as dependency for event drivers Nipun Gupta
2017-10-21 10:05     ` Jerin Jacob
2017-10-17 16:38   ` [dpdk-dev] [PATCH v4 4/5] event/dpaa2: support event eth adapter Nipun Gupta
2017-10-17 16:38   ` [dpdk-dev] [PATCH v4 5/5] event/dpaa2: improve the err handling and log msg Nipun Gupta
2017-10-23 12:37 ` [dpdk-dev] [PATCH v5 1/5] drivers: add queue parameter in event processing callback Nipun Gupta
2017-10-23 12:37   ` [dpdk-dev] [PATCH v5 2/5] net/dpaa2: add API's to support event eth adapter Nipun Gupta
2017-10-23 12:37   ` [dpdk-dev] [PATCH v5 3/5] drivers: add net as dependency for event drivers Nipun Gupta
2017-10-23  6:24     ` Jerin Jacob
2017-10-23 12:37   ` [dpdk-dev] [PATCH v5 4/5] event/dpaa2: support event eth adapter Nipun Gupta
2017-10-23 12:37   ` [dpdk-dev] [PATCH v5 5/5] event/dpaa2: improve the err handling and log msg Nipun Gupta
2017-10-23 17:49   ` [dpdk-dev] [PATCH v5 1/5] drivers: add queue parameter in event processing callback Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06dd15c2-ed06-2dfc-fa2b-05759c0885f1@intel.com \
    --to=nikhil.rao@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=nipun.gupta@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).