DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Nipun Gupta <nipun.gupta@nxp.com>
Cc: <dev@dpdk.org>, <bruce.richardson@intel.com>,
	<hemant.agrawal@nxp.com>, <gage.eads@intel.com>,
	<harry.van.haaren@intel.com>
Subject: Re: [dpdk-dev] [PATCH] eventdev: update event port link and unlink callbacks
Date: Wed, 8 Feb 2017 20:13:42 +0530	[thread overview]
Message-ID: <20170208144340.GE22978@localhost.localdomain> (raw)
In-Reply-To: <1486407877-4772-1-git-send-email-nipun.gupta@nxp.com>

On Tue, Feb 07, 2017 at 12:34:37AM +0530, Nipun Gupta wrote:
> Added a pointer to the rte_eventdev type in the event port
> link and unlink callbacks. This device shall be used by some
> of the event drivers to fetch queue related information.
> 
> Also, update the skeleton eventdev driver with corresponding changes.
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Applied to dpdk-next-eventdev/master. Thanks.

> ---
>  drivers/event/skeleton/skeleton_eventdev.c | 8 +++++---
>  lib/librte_eventdev/rte_eventdev.c         | 8 ++++----
>  lib/librte_eventdev/rte_eventdev_pmd.h     | 8 ++++++--
>  3 files changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c
> index 085cb86..9330d74 100644
> --- a/drivers/event/skeleton/skeleton_eventdev.c
> +++ b/drivers/event/skeleton/skeleton_eventdev.c
> @@ -287,13 +287,14 @@
>  }
>  
>  static int
> -skeleton_eventdev_port_link(void *port,
> +skeleton_eventdev_port_link(struct rte_eventdev *dev, void *port,
>  			const uint8_t queues[], const uint8_t priorities[],
>  			uint16_t nb_links)
>  {
>  	struct skeleton_port *sp = port;
>  	PMD_DRV_FUNC_TRACE();
>  
> +	RTE_SET_USED(dev);
>  	RTE_SET_USED(sp);
>  	RTE_SET_USED(queues);
>  	RTE_SET_USED(priorities);
> @@ -303,12 +304,13 @@
>  }
>  
>  static int
> -skeleton_eventdev_port_unlink(void *port, uint8_t queues[],
> -				 uint16_t nb_unlinks)
> +skeleton_eventdev_port_unlink(struct rte_eventdev *dev, void *port,
> +				 uint8_t queues[], uint16_t nb_unlinks)
>  {
>  	struct skeleton_port *sp = port;
>  	PMD_DRV_FUNC_TRACE();
>  
> +	RTE_SET_USED(dev);
>  	RTE_SET_USED(sp);
>  	RTE_SET_USED(queues);
>  
> diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
> index c8f3e94..c7452f0 100644
> --- a/lib/librte_eventdev/rte_eventdev.c
> +++ b/lib/librte_eventdev/rte_eventdev.c
> @@ -801,8 +801,8 @@
>  		if (queues[i] >= RTE_EVENT_MAX_QUEUES_PER_DEV)
>  			return -EINVAL;
>  
> -	diag = (*dev->dev_ops->port_link)(dev->data->ports[port_id], queues,
> -						priorities, nb_links);
> +	diag = (*dev->dev_ops->port_link)(dev, dev->data->ports[port_id],
> +						queues, priorities, nb_links);
>  	if (diag < 0)
>  		return diag;
>  
> @@ -846,8 +846,8 @@
>  		if (queues[i] >= RTE_EVENT_MAX_QUEUES_PER_DEV)
>  			return -EINVAL;
>  
> -	diag = (*dev->dev_ops->port_unlink)(dev->data->ports[port_id], queues,
> -					nb_unlinks);
> +	diag = (*dev->dev_ops->port_unlink)(dev, dev->data->ports[port_id],
> +					queues, nb_unlinks);
>  
>  	if (diag < 0)
>  		return diag;
> diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
> index c84c9a2..2e3e5d3 100644
> --- a/lib/librte_eventdev/rte_eventdev_pmd.h
> +++ b/lib/librte_eventdev/rte_eventdev_pmd.h
> @@ -357,6 +357,8 @@ typedef int (*eventdev_port_setup_t)(struct rte_eventdev *dev,
>  /**
>   * Link multiple source event queues to destination event port.
>   *
> + * @param dev
> + *   Event device pointer
>   * @param port
>   *   Event port pointer
>   * @param link
> @@ -372,13 +374,15 @@ typedef int (*eventdev_port_setup_t)(struct rte_eventdev *dev,
>   *   Returns 0 on success.
>   *
>   */
> -typedef int (*eventdev_port_link_t)(void *port,
> +typedef int (*eventdev_port_link_t)(struct rte_eventdev *dev, void *port,
>  		const uint8_t queues[], const uint8_t priorities[],
>  		uint16_t nb_links);
>  
>  /**
>   * Unlink multiple source event queues from destination event port.
>   *
> + * @param dev
> + *   Event device pointer
>   * @param port
>   *   Event port pointer
>   * @param queues
> @@ -390,7 +394,7 @@ typedef int (*eventdev_port_link_t)(void *port,
>   *   Returns 0 on success.
>   *
>   */
> -typedef int (*eventdev_port_unlink_t)(void *port,
> +typedef int (*eventdev_port_unlink_t)(struct rte_eventdev *dev, void *port,
>  		uint8_t queues[], uint16_t nb_unlinks);
>  
>  /**
> -- 
> 1.9.1
> 

      parent reply	other threads:[~2017-02-08 14:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 19:04 Nipun Gupta
2017-02-07  8:18 ` Jerin Jacob
2017-02-08 14:43 ` Jerin Jacob [this message]

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=20170208144340.GE22978@localhost.localdomain \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.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).